diff pkg/imports/st.go @ 2248:cce158db02b0

Input area as multipolygons to generate area from stretch Doing so is more resilient against invalid geometries and gives more plausible results if tributaries are involved (i.e. does not include the adjacent area of the tributary in the result).
author Tom Gottfried <tom@intevation.de>
date Wed, 13 Feb 2019 16:48:52 +0100
parents 97bba8b51b9c
children c5bbe2409a52
line wrap: on
line diff
--- a/pkg/imports/st.go	Wed Feb 13 16:41:00 2019 +0100
+++ b/pkg/imports/st.go	Wed Feb 13 16:48:52 2019 +0100
@@ -100,7 +100,7 @@
   (SELECT r FROM r),
   ISRSrange_area(
     (SELECT r FROM r),
-    (SELECT ST_Union(CAST(area AS geometry))
+    (SELECT ST_Collect(CAST(area AS geometry))
       FROM waterway.waterway_area)),
   $12,
   $13,