Mercurial > gemma
changeset 4686:1d6f28e45696
morphology: Doing ST_SimplifyPreserveTopology before ST_MakeValid when storing geometries to database speeds things up ... a lot.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 16 Oct 2019 11:51:53 +0200 |
parents | 7a9388943840 |
children | f73868037365 |
files | pkg/controllers/diff.go pkg/imports/sr.go |
diffstat | 2 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/diff.go Wed Oct 16 11:07:59 2019 +0200 +++ b/pkg/controllers/diff.go Wed Oct 16 11:51:53 2019 +0200 @@ -85,10 +85,13 @@ ST_Transform( ST_Multi( ST_CollectionExtract( - ST_SimplifyPreserveTopology( - ST_Multi(ST_Collectionextract( - ST_MakeValid(ST_GeomFromWKB($4, $3::integer)), 3)), - $5 + ST_MakeValid( + ST_Multi( + ST_Collectionextract( + ST_SimplifyPreserveTopology(ST_GeomFromWKB($4, $3::integer), $5), + 3 + ) + ) ), 3 )
--- a/pkg/imports/sr.go Wed Oct 16 11:07:59 2019 +0200 +++ b/pkg/imports/sr.go Wed Oct 16 11:51:53 2019 +0200 @@ -175,10 +175,13 @@ ST_Transform( ST_Multi( ST_CollectionExtract( - ST_SimplifyPreserveTopology( - ST_Multi(ST_Collectionextract( - ST_MakeValid(ST_GeomFromWKB($4, $3::integer)), 3)), - $5 + ST_MakeValid( + ST_Multi( + ST_Collectionextract( + ST_SimplifyPreserveTopology(ST_GeomFromWKB($4, $3::integer), $5), + 3 + ) + ) ), 3 )