diff cmd/octreediff/main.go @ 2583:5c6a7e69b02d

Morphological differences: Store calculated iso-lines in database.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 11 Mar 2019 16:42:38 +0100
parents 647a58ee9ae9
children
line wrap: on
line diff
--- a/cmd/octreediff/main.go	Mon Mar 11 16:36:04 2019 +0100
+++ b/cmd/octreediff/main.go	Mon Mar 11 16:42:38 2019 +0100
@@ -65,47 +65,6 @@
     4326
   )
 `
-	insertContourSQLClipped = `
-WITH joined AS (
-  SELECT
-    sr.area    AS area,
-    sr.date_info AS date_info
-  FROM waterway.sounding_results sr JOIN
-     waterway.bottlenecks bn ON sr.bottleneck_id = bn.id
-  WHERE bn.bottleneck_id = $1
-),
-inter AS (
-  SELECT
-  ST_Buffer(
-    ST_intersection(
-      (SELECT ST_Transform(area::geometry, $2::int) FROM joined WHERE date_info = $3::date),
-      (SELECT ST_Transform(area::geometry, $2::int) FROM joined WHERE date_info = $4::date)
-    ),
-    0.001) AS area
-)
-INSERT INTO diff_contour_lines (
-  height,
-  lines
-)
-SELECT
-  $5,
-  ST_Transform(
-    ST_Multi(
-	  ST_intersection(
-		  ST_CollectionExtract(
-			ST_SimplifyPreserveTopology(
-			  ST_Multi(ST_Collectionextract(
-				ST_MakeValid(ST_GeomFromWKB($6, $2::integer)), 2)),
-			  $7
-			),
-			2
-		  ),
-		area
-	  )
-	),
-    4326
-  )
-  FROM inter`
 )
 
 func check(err error) {