Mercurial > gemma
annotate schema/isrs_tests.sql @ 3561:453f15ba8030
Improve error handling in area generation
Instead of hitting a NOT NULL constraint later on, raise an error
if no candidate area for cutting is found.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 31 May 2019 16:58:42 +0200 |
parents | d316a6e41f54 |
children | 4c585b5d4fe8 |
rev | line source |
---|---|
1298
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
1 -- This is Free Software under GNU Affero General Public License v >= 3.0 |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
2 -- without warranty, see README.md and license for details. |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
3 |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
4 -- SPDX-License-Identifier: AGPL-3.0-or-later |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
5 -- License-Filename: LICENSES/AGPL-3.0.txt |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
6 |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
7 -- Copyright (C) 2018, 2019 by via donau |
1298
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
8 -- – Österreichische Wasserstraßen-Gesellschaft mbH |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
9 -- Software engineering by Intevation GmbH |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
10 |
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
11 -- Author(s): |
1301
2304778c4432
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1298
diff
changeset
|
12 -- * Tom Gottfried <tom@intevation.de> |
1298
6590208e3ee1
add headers for licensing to some schema files
Fadi Abbud <fadi.abbud@intevation.de>
parents:
578
diff
changeset
|
13 |
569
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 -- |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 -- pgTAP test script for ISRS location code types and functions |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 -- |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 SELECT results_eq($$ |
578
61af85a432bf
Fix extraction of object reference code
Tom Gottfried <tom@intevation.de>
parents:
569
diff
changeset
|
19 SELECT isrs_fromText('DEBON03901G007906548') |
569
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 $$, |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 $$ |
578
61af85a432bf
Fix extraction of object reference code
Tom Gottfried <tom@intevation.de>
parents:
569
diff
changeset
|
22 SELECT CAST(('DE', 'BON', '03901', 'G0079', 6548) AS isrs) |
569
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
23 $$, |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 'Correct ISRS text input gives respective ISRS location code'); |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
25 |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 SELECT throws_ok($$ |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 SELECT isrs_fromText('DEUXXX039000000005023') |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 $$, |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
29 22023, NULL, |
ad07846b09d1
Add function to construct isrs from text
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
30 'ISRS text input needs to have correct length'); |
1629
9d51f022b8ee
Introduce SQL function to clip an area to a stretch
Tom Gottfried <tom@intevation.de>
parents:
1301
diff
changeset
|
31 |
9d51f022b8ee
Introduce SQL function to clip an area to a stretch
Tom Gottfried <tom@intevation.de>
parents:
1301
diff
changeset
|
32 SELECT ok( |
2081
40711ca3aa19
Add function to get text representation of location code
Tom Gottfried <tom@intevation.de>
parents:
1983
diff
changeset
|
33 'DEBON03901G007906548' = isrs_asText(isrs_fromText('DEBON03901G007906548')) |
40711ca3aa19
Add function to get text representation of location code
Tom Gottfried <tom@intevation.de>
parents:
1983
diff
changeset
|
34 , |
40711ca3aa19
Add function to get text representation of location code
Tom Gottfried <tom@intevation.de>
parents:
1983
diff
changeset
|
35 'isrs_asText() is the inverse of isrs_fromText()'); |
40711ca3aa19
Add function to get text representation of location code
Tom Gottfried <tom@intevation.de>
parents:
1983
diff
changeset
|
36 |
2535
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
37 SELECT throws_ok($$ |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
38 SELECT ISRSrange_points(isrsrange( |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
39 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
40 ('AT', 'XXX', '00001', '00000', 99999)::isrs)) |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
41 $$, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
42 'P0002', NULL, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
43 'ISRSrange_points fails if not both distance marks can be found'); |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
44 |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
45 SELECT throws_ok($$ |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
46 SELECT ISRSrange_axis(isrsrange( |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
47 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
48 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
49 0) |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
50 $$, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
51 'P0002', NULL, |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
52 'ISRSrange_axis fails if no contiguous axis can be constructed'); |
73c8762cee60
Stretch area generation: Throw errors instead of returning NULL
Tom Gottfried <tom@intevation.de>
parents:
2453
diff
changeset
|
53 |
2081
40711ca3aa19
Add function to get text representation of location code
Tom Gottfried <tom@intevation.de>
parents:
1983
diff
changeset
|
54 SELECT ok( |
2688
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
55 ST_IsSimple(ISRSrange_axis(isrsrange( |
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
56 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
57 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
58 5)), |
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
59 'ISRSrange_axis returns a valid simple feature'); |
d316a6e41f54
Test if overlapping axis chunks are sewed together correctly
Tom Gottfried <tom@intevation.de>
parents:
2563
diff
changeset
|
60 |
3561
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
61 SELECT throws_ok($$ |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
62 SELECT ISRSrange_area('LINESTRING(0 0, 1 1)', NULL) |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
63 $$, |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
64 'P0002', NULL, |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
65 'ISRSrange_area fails if no input area is given'); |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
66 |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
67 SELECT throws_ok($$ |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
68 SELECT ISRSrange_area(ISRSrange_axis(isrsrange( |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
69 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
70 ('AT', 'XXX', '00001', '00000', 1)::isrs), |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
71 5), |
3561
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
72 ST_SetSRID('POLYGON((0 1, 0 2, 1 2, 1 1, 0 1))'::geometry, 4326)) |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
73 $$, |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
74 'P0002', NULL, |
453f15ba8030
Improve error handling in area generation
Tom Gottfried <tom@intevation.de>
parents:
2688
diff
changeset
|
75 'ISRSrange_area fails, if given area does not intersect with axis'); |
1629
9d51f022b8ee
Introduce SQL function to clip an area to a stretch
Tom Gottfried <tom@intevation.de>
parents:
1301
diff
changeset
|
76 |
2453 | 77 SELECT results_eq($$ |
78 SELECT every(ST_DWithin( | |
79 ST_Boundary(ISRSrange_area( | |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
80 ISRSrange_axis(isrsrange( |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
81 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
82 ('AT', 'XXX', '00001', '00000', 1)::isrs), |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
83 5), |
2453 | 84 (SELECT ST_Collect(CAST(area AS geometry)) |
85 FROM waterway.waterway_area))), | |
86 geom, | |
87 1)) | |
88 FROM waterway.distance_marks_virtual | |
89 WHERE location_code IN( | |
90 ('AT', 'XXX', '00001', '00000', 0)::isrs, | |
91 ('AT', 'XXX', '00001', '00000', 1)::isrs) | |
92 $$, | |
93 $$ | |
94 SELECT true | |
95 $$, | |
1629
9d51f022b8ee
Introduce SQL function to clip an area to a stretch
Tom Gottfried <tom@intevation.de>
parents:
1301
diff
changeset
|
96 'Resulting polygon almost ST_Touches points corresponding to stretch'); |
1983
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
97 |
2398
8481e6266691
Fix corner case in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2232
diff
changeset
|
98 \set test_area 'POLYGON((-1 1, 2 1, 2 -1, -1 -1, -1 1))' |
1983
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
99 SELECT ok( |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
100 2 = ST_NumGeometries( |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
101 ISRSrange_area( |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
102 ISRSrange_axis(isrsrange( |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
103 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
104 ('AT', 'XXX', '00001', '00000', 1)::isrs), |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
105 5), |
1983
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
106 ST_SetSRID(ST_Collect( |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
107 ST_Translate(:'test_area', |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
108 (ST_XMax(:'test_area'::geometry) |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
109 - ST_XMin(:'test_area'::geometry))/2 |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
110 + 0.1, 0), |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
111 ST_Translate(:'test_area', |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
112 -((ST_XMax(:'test_area'::geometry) |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
113 - ST_XMin(:'test_area'::geometry))/2 |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
114 + 0.1), 0)), |
f9f1babe52ae
Fix area generation from multipolygon input
Tom Gottfried <tom@intevation.de>
parents:
1629
diff
changeset
|
115 4326))), |
2232
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
116 'Two polygons intersecting the axis lead to two polygons in result'); |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
117 |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
118 SELECT ok( |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
119 1 = ST_NumGeometries( |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
120 ISRSrange_area( |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
121 ISRSrange_axis(isrsrange( |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
122 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
123 ('AT', 'XXX', '00001', '00000', 1)::isrs), |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
124 5), |
2232
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
125 ST_SetSRID(ST_Collect( |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
126 ST_Translate(:'test_area', |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
127 (ST_XMax(:'test_area'::geometry) |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
128 - ST_XMin(:'test_area'::geometry))/3, |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
129 0), |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
130 ST_Translate(:'test_area', |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
131 -((ST_XMax(:'test_area'::geometry) |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
132 - ST_XMin(:'test_area'::geometry))/3), |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
133 0)), |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
134 4326))), |
7936b46a88d4
Handle invalid multipolygons in area generation from stretch
Tom Gottfried <tom@intevation.de>
parents:
2081
diff
changeset
|
135 'Self-intersecting multipolygon leads to one polygon in result'); |
2431
48495bd3081d
Construct stretch area between distance marks also from non-contiguous axis
Tom Gottfried <tom@intevation.de>
parents:
2398
diff
changeset
|
136 |
2453 | 137 SELECT results_eq($$ |
138 SELECT every(ST_DWithin( | |
139 ST_Boundary(ISRSrange_area( | |
2563
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
140 ISRSrange_axis(isrsrange( |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
141 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
142 ('AT', 'XXX', '00001', '00000', 2)::isrs), |
dc4fae4bdb8f
Expose axis snapping tolerance to users
Tom Gottfried <tom@intevation.de>
parents:
2535
diff
changeset
|
143 5), |
2453 | 144 (SELECT ST_Collect(CAST(area AS geometry)) |
145 FROM waterway.waterway_area))), | |
146 geom, | |
147 1)) | |
148 FROM waterway.distance_marks_virtual | |
149 WHERE location_code IN( | |
2431
48495bd3081d
Construct stretch area between distance marks also from non-contiguous axis
Tom Gottfried <tom@intevation.de>
parents:
2398
diff
changeset
|
150 ('AT', 'XXX', '00001', '00000', 0)::isrs, |
2453 | 151 ('AT', 'XXX', '00001', '00000', 2)::isrs) |
152 $$, | |
153 $$ | |
154 SELECT true | |
155 $$, | |
2431
48495bd3081d
Construct stretch area between distance marks also from non-contiguous axis
Tom Gottfried <tom@intevation.de>
parents:
2398
diff
changeset
|
156 'Area generated from non-matching distance mark and non-contiguous axis'); |