changeset 920:862cc5ba4d1d

Merge contour lines Lines have been stored as multilinestrings comprised of adjacent 2-vertex linestrings. Merging these to longer linestrings will allow further processing such as simplification.
author Tom Gottfried <tom@intevation.de>
date Thu, 04 Oct 2018 17:46:59 +0200
parents 271561dce2e6
children 52cb0b82b490
files cmd/octree2contour/store.go
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/octree2contour/store.go	Thu Oct 04 16:32:47 2018 +0200
+++ b/cmd/octree2contour/store.go	Thu Oct 04 17:46:59 2018 +0200
@@ -26,14 +26,14 @@
   sr.id,
   $1,
   ST_Transform(
-    ST_CollectionExtract(
-      ST_Force2D(
+    ST_Multi(
+      ST_CollectionExtract(
         ST_Intersection(
           ST_Transform(sr.area::geometry, $3::integer),
-          ST_GeomFromWKB($2, $3::integer)
-        )
-      ),
-      2
+          ST_LineMerge(ST_Force2D(ST_GeomFromWKB($2, $3::integer)))
+        ),
+        2
+      )
     ),
     4326
   )