comparison cmd/octree2contour/store.go @ 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
comparison
equal deleted inserted replaced
919:271561dce2e6 920:862cc5ba4d1d
24 (sounding_result_id, height, lines) 24 (sounding_result_id, height, lines)
25 SELECT 25 SELECT
26 sr.id, 26 sr.id,
27 $1, 27 $1,
28 ST_Transform( 28 ST_Transform(
29 ST_CollectionExtract( 29 ST_Multi(
30 ST_Force2D( 30 ST_CollectionExtract(
31 ST_Intersection( 31 ST_Intersection(
32 ST_Transform(sr.area::geometry, $3::integer), 32 ST_Transform(sr.area::geometry, $3::integer),
33 ST_GeomFromWKB($2, $3::integer) 33 ST_LineMerge(ST_Force2D(ST_GeomFromWKB($2, $3::integer)))
34 ) 34 ),
35 ), 35 2
36 2 36 )
37 ), 37 ),
38 4326 38 4326
39 ) 39 )
40 FROM waterway.sounding_results sr 40 FROM waterway.sounding_results sr
41 WHERE bottleneck_id = $4 AND date_info = $5 41 WHERE bottleneck_id = $4 AND date_info = $5