Mercurial > gemma
diff schema/gemma_tests.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 | d24e951206ca |
children | cf25b23e3eec |
line wrap: on
line diff
--- a/schema/gemma_tests.sql Wed Mar 11 15:54:37 2020 +0100 +++ b/schema/gemma_tests.sql Wed Mar 11 17:11:23 2020 +0100 @@ -26,8 +26,8 @@ SELECT throws_ok($$ INSERT INTO waterway.waterway_axis (wtwaxs, objnam) VALUES - (ST_GeogFromText('LINESTRING(0 0, 1 1)'), 'test'), - (ST_GeogFromText('LINESTRING(0 0, 1 1)'), 'test') + (ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), 'test'), + (ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), 'test') $$, 23505, NULL, 'No duplicate geometries can be inserted into waterway_axis');