[postgis-tickets] r16518 - Copy Topology GML regression tests from 2.3 branch
Sandro Santilli
strk at kbt.io
Sun Apr 1 11:45:01 PDT 2018
Author: strk
Date: 2018-04-01 23:45:00 -0700 (Sun, 01 Apr 2018)
New Revision: 16518
Modified:
branches/2.2/topology/test/regress/gml.sql
branches/2.2/topology/test/regress/gml_expected
Log:
Copy Topology GML regression tests from 2.3 branch
Hopefully fixes #4062 in 2.2 branch bringing in controlled order
to make tests behave the same under different PostgreSQL versions
Modified: branches/2.2/topology/test/regress/gml.sql
===================================================================
--- branches/2.2/topology/test/regress/gml.sql 2018-04-02 04:57:28 UTC (rev 16517)
+++ branches/2.2/topology/test/regress/gml.sql 2018-04-02 06:45:00 UTC (rev 16518)
@@ -16,13 +16,13 @@
-- Output again but with no prefix
SELECT feature_name||'-noprefix', topology.AsGML(feature, '')
- FROM features.traffic_signs
+ FROM features.traffic_signs
WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' )
ORDER BY feature_name;
-- Output again with custom prefix
SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm')
- FROM features.traffic_signs
+ FROM features.traffic_signs
WHERE feature_name IN ('S1', 'S2', 'S3', 'S4' )
ORDER BY feature_name;
@@ -29,18 +29,18 @@
-- Again with no prefix, no srsDimension (opt+=2)
-- and swapped lat/lon (opt+=16) and short CRS
SELECT feature_name||'-latlon', topology.AsGML(feature, '', 15, 18)
- FROM features.traffic_signs
+ FROM features.traffic_signs
WHERE feature_name IN ('S4');
---- } Puntual single-element
+--- } Puntual single-element
--- Puntual multi element {
SELECT feature_name||'-noprefix', topology.AsGML(feature, '')
- FROM features.traffic_signs
+ FROM features.traffic_signs
WHERE feature_name IN ('N1N2N3');
---- } Puntual multi-element
+--- } Puntual multi-element
--- Lineal single element {
@@ -52,13 +52,13 @@
-- Output again but with no prefix
SELECT feature_name||'-noprefix', topology.AsGML(feature, '')
- FROM features.city_streets
+ FROM features.city_streets
WHERE feature_name IN ('R3', 'R4' )
ORDER BY feature_name;
-- Output again with custom prefix
SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm')
- FROM features.city_streets
+ FROM features.city_streets
WHERE feature_name IN ('R3', 'R4' )
ORDER BY feature_name;
@@ -74,13 +74,13 @@
-- Output again but with no prefix
SELECT feature_name||'-noprefix', topology.AsGML(feature, '')
- FROM features.city_streets
+ FROM features.city_streets
WHERE feature_name IN ('R1', 'R2' )
ORDER BY feature_name;
-- Output again with custom prefix
SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm')
- FROM features.city_streets
+ FROM features.city_streets
WHERE feature_name IN ('R1', 'R2' )
ORDER BY feature_name;
@@ -104,7 +104,7 @@
FROM features.land_parcels WHERE feature_name IN ('P4', 'P5')
ORDER BY feature_name;
---- } Areal single-element
+--- } Areal single-element
--- Areal multi-element {
@@ -116,17 +116,17 @@
-- Output again but with no prefix
SELECT feature_name||'-noprefix', topology.AsGML(feature, '')
- FROM features.land_parcels
+ FROM features.land_parcels
WHERE feature_name IN ('P1', 'P2', 'P3' )
ORDER BY feature_name;
-- Output again with custom prefix
SELECT feature_name||'-customprefix', topology.AsGML(feature, 'cstm')
- FROM features.land_parcels
+ FROM features.land_parcels
WHERE feature_name IN ('P1', 'P2', 'P3' )
ORDER BY feature_name;
---- } Areal multi-element
+--- } Areal multi-element
--- { Visited table bookkeeping
@@ -136,7 +136,8 @@
-- N5,N6,N7
SELECT feature_name||'-visited', topology.AsGML(feature,
'', 15, 2, 'visited'::regclass) FROM features.city_streets
- WHERE feature_name IN ('R2');
+ WHERE feature_name IN ('R2')
+ ORDER BY feature_name;
-- S1 visits N14
-- S3 visits (N6)
@@ -157,19 +158,28 @@
WHERE feature_name IN ('N1N6N14')
ORDER BY feature_name;
+-- P1 visits F3,F6
+-- F3-> E6,E19,(E9),E21
+-- F6-> (E9),E20,E12,E22
+-- E6-> N16,N17
+-- E19-> (N14),(N17) # N14 visited by S1-visited, N17 by E6 above
+-- E21-> (N15),(N16) # N15 visited by R1-visited, N16 by E6 above
+-- E20-> N9,(N14) # N14 visited by S1-visited
+-- E12-> N8,(N9) # N9 visited by E20 above
+-- E22-> (N8),(N15) # N8 visited above, N15 by R1-visited
+--
-- P2 visits F4,F7
--- E7,E17,E18,E13,E20,E19
--- N17,N18,(N13),N10,N9,(N14),N17
--- P1 visits F3,F6
--- F3-> E6,(E19),(E9),(E21)
--- F4-> E22,(E9),(E20),E12
--- E6-> N16,(N17)
--- E22-> N8,(N15)
--- E12-> (N8),(N9)
+-- F4-> E7,E17,(E10),(E19) # E10 by R1-visited, E19 by P1-visited
+-- F7-> (E10),E18,E13,(E20) # E10 by R1-visited, E20 by P1-visited
+-- E7-> (N17),N18 # N17 visited by P1-visited.E6
+-- E17-> (N13),(N18) # N13 by R1-visited, N18 by E7 above
+-- E18-> N10,(N13) # N13 by R1-visited
+-- E13-> (N9),(N10) # N9 visited by P1-visited.E20, N10 above
+--
SELECT feature_name||'-visited', topology.AsGML(feature,
'', 15, 2, 'visited'::regclass) FROM features.land_parcels
- WHERE feature_name IN ('P1', 'P2')
- ORDER BY feature_name DESC;
+ WHERE feature_name IN ('P1', 'P2')
+ ORDER BY feature_name;
-- F3F4 visits (F3),(F4)
SELECT feature_name||'-visited', topology.AsGML(feature,
@@ -196,7 +206,7 @@
-- Output in GML2
SELECT feature_name||'-gml2' as name, topology.AsGML(feature,'',0,2,NULL,'',2)
- FROM features.city_streets
+ FROM features.city_streets
WHERE feature_name IN ('R1', 'R2', 'R3', 'R4' )
UNION
SELECT feature_name||'-gml2', topology.AsGML(feature,'',0,2,NULL,'',2)
Modified: branches/2.2/topology/test/regress/gml_expected
===================================================================
--- branches/2.2/topology/test/regress/gml_expected 2018-04-02 04:57:28 UTC (rev 16517)
+++ branches/2.2/topology/test/regress/gml_expected 2018-04-02 06:45:00 UTC (rev 16518)
@@ -55,8 +55,8 @@
S3-visited|<TopoPoint><directedNode xlink:href="#N6" /></TopoPoint>
R1-visited|<TopoCurve><directedEdge><Edge id="E9"><directedNode orientation="-"><Node id="N15"/></directedNode><directedNode xlink:href="#N14" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 14 21 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-"><Edge id="E10"><directedNode orientation="-"><Node id="N13"/></directedNode><directedNode xlink:href="#N14" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>35 14 21 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge></TopoCurve>
N1N6N14-visited|<TopoPoint><directedNode><Node id="N1"><pointProperty><Point srsName="EPSG:4326"><pos>8 30</pos></Point></pointProperty></Node></directedNode><directedNode xlink:href="#N6" /><directedNode xlink:href="#N14" /></TopoPoint>
+P1-visited|<TopoSurface><directedFace><Face id="F3"><directedEdge orientation="-"><Edge id="E6"><directedNode orientation="-"><Node id="N16"/></directedNode><directedNode><Node id="N17"/></directedNode><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 22 21 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E19"><directedNode orientation="-" xlink:href="#N14" /><directedNode xlink:href="#N17" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 14 21 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge xlink:href="#E9" /><directedEdge orientation="-"><Edge id="E21"><directedNode orientation="-" xlink:href="#N15" /><directedNode xlink:href="#N16" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 14 9 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></di
rectedEdge></Face></directedFace><directedFace><Face id="F6"><directedEdge orientation="-" xlink:href="#E9" /><directedEdge><Edge id="E20"><directedNode orientation="-"><Node id="N9"/></directedNode><directedNode xlink:href="#N14" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 6 21 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E12"><directedNode orientation="-"><Node id="N8"/></directedNode><directedNode xlink:href="#N9" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 6 21 6</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-"><Edge id="E22"><directedNode orientation="-" xlink:href="#N8" /><directedNode xlink:href="#N15" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 6 9 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></
directedEdge></Face></directedFace></TopoSurface>
P2-visited|<TopoSurface><directedFace><Face id="F4"><directedEdge orientation="-"><Edge id="E7"><directedNode orientation="-" xlink:href="#N17" /><directedNode><Node id="N18"/></directedNode><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 22 35 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E17"><directedNode orientation="-" xlink:href="#N13" /><directedNode xlink:href="#N18" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>35 14 35 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-" xlink:href="#E10" /><directedEdge orientation="-" xlink:href="#E19" /></Face></directedFace><directedFace><Face id="F7"><directedEdge xlink:href="#E10" /><directedEdge><Edge id="E18"><directedNode orientation="-"><Node id="N10"/></directedNode><directedNode xlink:href="#N13" /><curveProperty><Curve srsName
="EPSG:4326"><segments><LineStringSegment><posList>35 6 35 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E13"><directedNode orientation="-" xlink:href="#N9" /><directedNode xlink:href="#N10" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 6 35 6</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-" xlink:href="#E20" /></Face></directedFace></TopoSurface>
-P1-visited|<TopoSurface><directedFace><Face id="F3"><directedEdge orientation="-"><Edge id="E6"><directedNode orientation="-"><Node id="N16"/></directedNode><directedNode><Node id="N17"/></directedNode><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 22 21 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E19"><directedNode orientation="-" xlink:href="#N14" /><directedNode xlink:href="#N17" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 14 21 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge xlink:href="#E9" /><directedEdge orientation="-"><Edge id="E21"><directedNode orientation="-" xlink:href="#N15" /><directedNode xlink:href="#N16" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 14 9 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></di
rectedEdge></Face></directedFace><directedFace><Face id="F6"><directedEdge orientation="-" xlink:href="#E9" /><directedEdge><Edge id="E20"><directedNode orientation="-"><Node id="N9"/></directedNode><directedNode xlink:href="#N14" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>21 6 21 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="E12"><directedNode orientation="-"><Node id="N8"/></directedNode><directedNode xlink:href="#N9" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 6 21 6</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-"><Edge id="E22"><directedNode orientation="-" xlink:href="#N8" /><directedNode xlink:href="#N15" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>9 6 9 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></
directedEdge></Face></directedFace></TopoSurface>
F3F4-visited|<TopoSurface><directedFace xlink:href="#F3" /><directedFace xlink:href="#F4" /></TopoSurface>
E7E8-visited|<TopoCurve><directedEdge xlink:href="#E7" /><directedEdge><Edge id="E8"><directedNode orientation="-" xlink:href="#N18" /><directedNode><Node id="N19"/></directedNode><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>35 22 47 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge></TopoCurve>
P3-visited-idprefix|<TopoSurface><directedFace><Face id="cd-F5"><directedEdge orientation="-" xlink:href="#cd-E8" /><directedEdge><Edge id="cd-E15"><directedNode orientation="-"><Node id="cd-N12"/></directedNode><directedNode xlink:href="#cd-N19" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>47 14 47 22</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="cd-E11"><directedNode orientation="-" xlink:href="#cd-N13" /><directedNode xlink:href="#cd-N12" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>35 14 47 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-" xlink:href="#cd-E17" /></Face></directedFace><directedFace><Face id="cd-F8"><directedEdge orientation="-" xlink:href="#cd-E11" /><directedEdge><Edge id="cd-E16"><directedNode orientation="-"><Node id="cd-N11"/></directedNode><directedNode x
link:href="#cd-N12" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>47 6 47 14</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge><Edge id="cd-E14"><directedNode orientation="-" xlink:href="#cd-N10" /><directedNode xlink:href="#cd-N11" /><curveProperty><Curve srsName="EPSG:4326"><segments><LineStringSegment><posList>35 6 47 6</posList></LineStringSegment></segments></Curve></curveProperty></Edge></directedEdge><directedEdge orientation="-" xlink:href="#cd-E18" /></Face></directedFace></TopoSurface>
More information about the postgis-tickets
mailing list