comparison cmd/octree2contour/store.go @ 736:34ea9d5df653

Fixed problem with unique constraint for countour lines.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 24 Sep 2018 11:24:42 +0200
parents 83a9f04f1759
children fb9faf2c4f60
comparison
equal deleted inserted replaced
735:83a9f04f1759 736:34ea9d5df653
19 FROM waterway.sounding_results 19 FROM waterway.sounding_results
20 WHERE bottleneck_id = $1 AND date_info = $2) 20 WHERE bottleneck_id = $1 AND date_info = $2)
21 ` 21 `
22 insertSQL = ` 22 insertSQL = `
23 INSERT INTO waterway.sounding_results_contour_lines 23 INSERT INTO waterway.sounding_results_contour_lines
24 (sounding_result_id, height, lines)
24 SELECT 25 SELECT
25 sounding_result_id, 26 id,
26 $1, 27 $1,
27 ST_Transform(ST_SetSRID(ST_GeomFromWKB($2), $3), 4326)::geography 28 ST_Transform(ST_SetSRID(ST_GeomFromWKB($2), $3), 4326)::geography
28 FROM waterway.sounding_results 29 FROM waterway.sounding_results
29 WHERE bottleneck_id = $4 AND date_info = $5 30 WHERE bottleneck_id = $4 AND date_info = $5
30 ` 31 `