Mercurial > gemma
diff schema/tap_tests_data.sql @ 5009:e8b2dc771f9e
Store axis as MultiLinestring
MultiLinestrings could already be imported but we stored them as
multiple Linestrings with identical attributes and even stored
Linestrings with self-intersections as multiple single Linestrings
with identical attributes. Avoid both by storing as MultiLinestring.
In passing, removed unnecessary processing steps in the INSERT
statemet for the sys_admin case and ensured that attempts to
convert to valid simple features are made after transformation,
which might lead to invalid features.
Since isrsrange_axis() relies on single Linestrings for linear
referencing, add an extra ST_Dump().
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 11 Mar 2020 17:11:23 +0100 |
parents | b0c974fc7d34 |
children | 4c658a8f34da |
line wrap: on
line diff
--- a/schema/tap_tests_data.sql Wed Mar 11 15:54:37 2020 +0100 +++ b/schema/tap_tests_data.sql Wed Mar 11 17:11:23 2020 +0100 @@ -124,22 +124,23 @@ ); INSERT INTO waterway.waterway_axis (wtwaxs, objnam) VALUES ( - ST_SetSRID(ST_CurveToLine( - 'CIRCULARSTRING(0 0, 0.5 0.5, 0.6 0.4)'), + ST_SetSRID( + ST_Multi(ST_CurveToLine('CIRCULARSTRING(0 0, 0.5 0.5, 0.6 0.4)')), 4326), 'testriver' ), ( - ST_SetSRID(ST_CurveToLine('CIRCULARSTRING(0.6 0.4, 1 0, 1.5 -0.00001)'), + ST_SetSRID( + ST_Multi(ST_CurveToLine('CIRCULARSTRING(0.6 0.4, 1 0, 1.5 -0.00001)')), 4326), 'testriver' ), ( - ST_SetSRID('LINESTRING(0.5 0.5, 1 1)'::geometry, 4326), + ST_SetSRID('MULTILINESTRING((0.5 0.5, 1 1))'::geometry, 4326), 'testriver' ), ( - ST_SetSRID('LINESTRING(1.5 0, 1.55001 0)'::geometry, 4326), + ST_SetSRID('MULTILINESTRING((1.5 0, 1.55001 0))'::geometry, 4326), 'testriver' ), ( - ST_SetSRID('LINESTRING(1.55 0, 2 0)'::geometry, 4326), + ST_SetSRID('MULTILINESTRING((1.55 0, 2 0))'::geometry, 4326), 'testriver' );