Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
5008:0b97f5301a17 | 5009:e8b2dc771f9e |
---|---|
24 SELECT ok(is_valid_from_item(NULL) IS NULL, | 24 SELECT ok(is_valid_from_item(NULL) IS NULL, |
25 'NULL value is not checked'); | 25 'NULL value is not checked'); |
26 | 26 |
27 SELECT throws_ok($$ | 27 SELECT throws_ok($$ |
28 INSERT INTO waterway.waterway_axis (wtwaxs, objnam) VALUES | 28 INSERT INTO waterway.waterway_axis (wtwaxs, objnam) VALUES |
29 (ST_GeogFromText('LINESTRING(0 0, 1 1)'), 'test'), | 29 (ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), 'test'), |
30 (ST_GeogFromText('LINESTRING(0 0, 1 1)'), 'test') | 30 (ST_GeogFromText('MULTILINESTRING((0 0, 1 1))'), 'test') |
31 $$, | 31 $$, |
32 23505, NULL, | 32 23505, NULL, |
33 'No duplicate geometries can be inserted into waterway_axis'); | 33 'No duplicate geometries can be inserted into waterway_axis'); |
34 | 34 |
35 SELECT throws_ok($$ | 35 SELECT throws_ok($$ |