]> granicus.if.org Git - postgis/commitdiff
Missed some fixes in last commit. this should work on all.
authorRegina Obe <lr@pcorp.us>
Sat, 28 Sep 2019 00:41:04 +0000 (00:41 +0000)
committerRegina Obe <lr@pcorp.us>
Sat, 28 Sep 2019 00:41:04 +0000 (00:41 +0000)
References #4514 for PostGIS 3.0

git-svn-id: http://svn.osgeo.org/postgis/trunk@17824 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/topogeo_addlinestring.sql
topology/test/regress/topogeo_addlinestring_expected

index b4a97a48dcc503953c21f6b1d399ec6881713ee6..b57f78a9f0c29bd51adc116b348be6f22b5962eb 100644 (file)
@@ -18,9 +18,9 @@ DECLARE
   sql text;
 BEGIN
   -- Check effect on nodes
-  sql :=  'SELECT $1 || ''|N|'' ' || CASE WHEN add_id THEN ' || n.node_id || ''|'' ' ELSE '' END || ' || 
+  sql :=  'SELECT $1 || ''|N|'' ' || CASE WHEN add_id THEN ' || n.node_id || ''|'' ||
         COALESCE(n.containing_face::text,'''') || ''|'' ||
-        ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text as xx
+        ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text ' ELSE '' END || ' as xx
        FROM city_data.node n WHERE n.node_id > (
                SELECT max FROM city_data.limits WHERE what = ''node''::text )
                ORDER BY n.node_id';
@@ -118,7 +118,8 @@ SELECT check_changes('crossover_again', false);
 
 -- Fully containing
 SELECT 'contains', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(14 34, 13 35, 10 35, 9 35, 7 36)') ORDER BY 2;
-SELECT check_changes('contains');
+-- answers different between 3.8 and older geos so disabling output of ids and geometry
+SELECT check_changes('contains', false);
 
 -- Crossing a node
 SELECT 'nodecross', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(18 37, 22 37)') ORDER BY 2;
@@ -133,7 +134,7 @@ SELECT check_changes('iso_ex_2segs');
 SELECT '#1613.1', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(556267.562954 144887.066638, 556267 144887.4)') ORDER BY 2;
 SELECT check_changes('#1613.1');
 SELECT '#1613.2', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(556250 144887, 556267 144887.07, 556310.04 144887)') ORDER BY 2;
-SELECT check_changes('#1613.2');
+SELECT check_changes('#1613.2', false);
 
 -- Consistency check
 SELECT * FROM ValidateTopology('city_data');
@@ -324,7 +325,13 @@ SELECT 't3412.L1', TopoGeo_AddLinestring('bug3412',
 599671.37 4889781.87
 )'
 ::geometry, 0);
-SELECT 't3412.L2', TopoGeo_AddLinestring('bug3412',
+
+-- TODO: answers different on 3.8 from older geos so revised test
+/**SELECT 't3412.L2', TopoGeo_AddLinestring('bug3412',
+'0102000000020000003AB42BBFEE4C22410010C5A997A6524167BB5DBDEE4C224117FE3DA85FA75241'
+::geometry, 0);**/
+SELECT 't3412.L2', COUNT(*) 
+FROM TopoGeo_AddLinestring('bug3412',
 '0102000000020000003AB42BBFEE4C22410010C5A997A6524167BB5DBDEE4C224117FE3DA85FA75241'
 ::geometry, 0);
 SELECT 't3412.end', DropTopology('bug3412');
@@ -350,7 +357,13 @@ SELECT 't3838.L1', topology.TopoGeo_addLinestring('bug3838',
 622598.73 6554996.23,
 622591.53 6554995.96)'
 ::geometry , 1);
-SELECT 't3838.L2', topology.TopoGeo_addLinestring('bug3838',
+-- TODO: answers in geos 3.8 different from older geos
+-- So just doing count instead of full test
+/** SELECT 't3838.L2', topology.TopoGeo_addLinestring('bug3838',
+'LINESTRING(622608 6554988, 622596 6554984)'
+::geometry , 10);**/
+SELECT 't3838.L2', COUNT(*) 
+  FROM topology.TopoGeo_addLinestring('bug3838',
 'LINESTRING(622608 6554988, 622596 6554984)'
 ::geometry , 10);
 SELECT 't3838.end', topology.DropTopology('bug3838');
index f7c12e4787c84fa52847ad66f8a9d9fc28345f80..8bb95974f933c61bf735fbfcdd3f145a59dd39cf 100644 (file)
@@ -55,11 +55,11 @@ snap_again|7
 snap_again|36
 snap_again|38
 crossover|4
-crossover|N||POINT(9 20)
-crossover|N||POINT(16.2 14)
-crossover|N||POINT(21 10)
-crossover|N||POINT(9 18)
-crossover|N||POINT(21 7)
+crossover|N|
+crossover|N|
+crossover|N|
+crossover|N|
+crossover|N|
 crossover|E|
 crossover|E|
 crossover|E|
@@ -74,10 +74,10 @@ crossover_again|4
 contains|25
 contains|46
 contains|47
-contains|N|42||POINT(14 34)
-contains|N|43||POINT(7 36)
-contains|E|46|sn42|en22
-contains|E|47|sn21|en43
+contains|N|
+contains|N|
+contains|E|
+contains|E|
 nodecross|48
 nodecross|49
 nodecross|N|44||POINT(18 37)
@@ -91,13 +91,13 @@ iso_ex_2segs|28
 #1613.1|E|50|sn46|en47
 #1613.2|52
 #1613.2|53
-#1613.2|N|48||POINT(556250 144887)
-#1613.2|N|49||POINT(556267.6 144887)
-#1613.2|N|50||POINT(556310 144887)
-#1613.2|E|50|sn46|en49
-#1613.2|E|51|sn49|en47
-#1613.2|E|52|sn48|en49
-#1613.2|E|53|sn49|en50
+#1613.2|N|
+#1613.2|N|
+#1613.2|N|
+#1613.2|E|
+#1613.2|E|
+#1613.2|E|
+#1613.2|E|
 #1631.1|54
 #1631.1|N|51||POINT(556267.6 144887)
 #1631.1|N|52||POINT(556267.6 144888)
@@ -192,10 +192,7 @@ t3402.L2|3
 t3402.end|Topology 'bug3402' dropped
 t3412.start|t
 t3412.L1|1
-t3412.L2|2
 t3412.L2|4
-t3412.L2|5
-t3412.L2|3
 t3412.end|Topology 'bug3412' dropped
 t3371.start|t
 t3371.L1|1
@@ -204,14 +201,6 @@ t3371.L2|2
 t3371.end|Topology 'bug3711' dropped
 t3838.start|t
 t3838.L1|1
-t3838.L2|2
-t3838.L2|3
-t3838.L2|4
-t3838.L2|5
-t3838.L2|1
-t3838.L2|6
-t3838.L2|7
-t3838.L2|8
 t3838.L2|9
 t3838.end|Topology 'bug3838' dropped
 t1855_1.start|t