diff cmd/octree2contour/store.go @ 919:271561dce2e6

Store contour lines in 2D We have the height as an attribute value and use the lines only for display on a map. There's no need to store height with every vertex additionally.
author Tom Gottfried <tom@intevation.de>
date Thu, 04 Oct 2018 16:32:47 +0200
parents fb9faf2c4f60
children 862cc5ba4d1d
line wrap: on
line diff
--- a/cmd/octree2contour/store.go	Thu Oct 04 12:45:25 2018 +0200
+++ b/cmd/octree2contour/store.go	Thu Oct 04 16:32:47 2018 +0200
@@ -26,15 +26,17 @@
   sr.id,
   $1,
   ST_Transform(
-    ST_Translate(
-      ST_Force3D(
-        ST_CollectionExtract(
-          ST_Force2D(
-            ST_Intersection(
-              ST_Transform(sr.area::geometry, $3::integer),
-              ST_SetSRID(
-                ST_GeomFromWKB($2), $3::integer))), 2)), 0.0, 0.0, $1::numeric),
-  4326)::geography
+    ST_CollectionExtract(
+      ST_Force2D(
+        ST_Intersection(
+          ST_Transform(sr.area::geometry, $3::integer),
+          ST_GeomFromWKB($2, $3::integer)
+        )
+      ),
+      2
+    ),
+    4326
+  )
 FROM waterway.sounding_results sr
 WHERE bottleneck_id = $4 AND date_info = $5
 `