[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-69-gf50dcaa

git at osgeo.org git at osgeo.org
Mon Sep 21 07:20:44 PDT 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  f50dcaaaa7a0c77e84076d0543c3c48b3a4d9ad4 (commit)
      from  1e8036c222bf316c7f28a4387f5c8833dff6bd94 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f50dcaaaa7a0c77e84076d0543c3c48b3a4d9ad4
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Sep 21 16:04:04 2020 +0200

    Make topology test less sensible to overlay results order

diff --git a/topology/test/regress/topogeo_addlinestring.sql b/topology/test/regress/topogeo_addlinestring.sql
index 460229a..fc194de 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -10,7 +10,7 @@ SELECT 'max',* from city_data.limits;
 
 -- Check changes since last saving, save more
 -- {
-CREATE OR REPLACE FUNCTION check_changes(lbl text, add_id boolean default true)
+CREATE OR REPLACE FUNCTION check_changes(lbl text)
 RETURNS TABLE (o text)
 AS $$
 DECLARE
@@ -18,12 +18,12 @@ DECLARE
   sql text;
 BEGIN
   -- Check effect on nodes
-  sql :=  'SELECT $1 || ''|N|'' ' || CASE WHEN add_id THEN ' || n.node_id || ''|'' ||
+  sql :=  'SELECT $1 || ''|N|'' ||
         COALESCE(n.containing_face::text,'''') || ''|'' ||
-        ST_AsText(ST_SnapToGrid(n.geom, 0.2))::text ' ELSE '' END || ' as xx
+        ST_AsText(n.geom, 2)::text 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';
+  		ORDER BY n.geom';
 
   FOR rec IN EXECUTE sql USING ( lbl )
   LOOP
@@ -31,15 +31,15 @@ BEGIN
     RETURN NEXT;
   END LOOP;
 
-  -- Check effect on edges (there should be one split)
+  -- Check effect on edges
   sql := 'WITH node_limits AS ( SELECT max FROM city_data.limits WHERE what = ''node''::text ),
        edge_limits AS ( SELECT max FROM city_data.limits WHERE what = ''edge''::text )
-  SELECT $1 || ''|E|'' ' || CASE WHEN add_id THEN ' || e.edge_id || ''|sn'' || e.start_node || ''|en'' || e.end_node::text ' ELSE '' END || ' AS xx ' ||
+  SELECT $1 || ''|E|'' || ST_AsText(e.geom, 2)::text AS xx ' ||
    ' FROM city_data.edge e, node_limits nl, edge_limits el
    WHERE e.start_node > nl.max
       OR e.end_node > nl.max
       OR e.edge_id > el.max
-  ORDER BY e.edge_id;';
+  ORDER BY e.geom;';
 
   FOR rec IN EXECUTE sql USING ( lbl )
   LOOP
@@ -108,18 +108,18 @@ SELECT check_changes('snap_again');
 --       strk fix as you please leter
 --SELECT 'crossover', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(9 18, 9 20, 21 10, 21 7)') ORDER BY 2;
 SELECT 'crossover', COUNT(*) FROM TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(9 18, 9 20, 21 10, 21 7)') AS t;
-SELECT check_changes('crossover', false);
+SELECT check_changes('crossover');
 
 -- TODO: Geos 3.8+ gives different results, so just returning the count of edges instead
 --       strk fix as you please leter
 --SELECT 'crossover_again', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(9 18, 9 20, 21 10, 21 7)') ORDER BY 2;
 SELECT 'crossover_again', COUNT(*) FROM TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(9 18, 9 20, 21 10, 21 7)') AS t;
-SELECT check_changes('crossover_again', false);
+SELECT check_changes('crossover_again');
 
 -- Fully containing
 SELECT 'contains', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(14 34, 13 35, 10 35, 9 35, 7 36)') ORDER BY 2;
 -- answers different between 3.8 and older geos so disabling output of ids and geometry
-SELECT check_changes('contains', false);
+SELECT check_changes('contains');
 
 -- Crossing a node
 SELECT 'nodecross', TopoGeo_addLineString('city_data', 'SRID=4326;LINESTRING(18 37, 22 37)') ORDER BY 2;
@@ -134,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', false);
+SELECT check_changes('#1613.2');
 
 -- Consistency check
 SELECT * FROM ValidateTopology('city_data');
@@ -240,9 +240,8 @@ SELECT '#1706.1', 'E', TopoGeo_AddLineString('city_data',
  'SRID=4326;LINESTRING(20 10, 10 10, 9 12, 10 20)');
 SELECT check_changes('#1706.1');
 
-SELECT '#1706.2', 'E*', TopoGeo_addLineString('city_data',
- 'SRID=4326;LINESTRING(10 0, 10 10, 15 10, 20 10)'
-, 4) ORDER BY 3;
+SELECT '#1706.2', count(*) FROM TopoGeo_addLineString('city_data',
+ 'SRID=4326;LINESTRING(10 0, 10 10, 15 10, 20 10)' , 4);
 SELECT check_changes('#1706.2');
 
 -- Consistency check
@@ -266,7 +265,7 @@ SELECT check_changes('#1714.2');
 SELECT * FROM ValidateTopology('city_data');
 
 -- Cleanups
-DROP FUNCTION check_changes(text,boolean);
+DROP FUNCTION check_changes(text);
 SELECT DropTopology('city_data');
 
 -- See http://trac.osgeo.org/postgis/ticket/3280
@@ -341,7 +340,7 @@ SELECT 't3371.start', topology.CreateTopology('bug3711', 0, 0, true) > 1;
 SELECT 't3371.L1', topology.TopoGeo_AddLineString('bug3711',
 'LINESTRING (618369 4833784 0.88, 618370 4833784 1.93, 618370 4833780 1.90)'
 ::geometry, 0);
-SELECT 't3371.L2', topology.TopoGeo_AddLineString( 'bug3711',
+SELECT 't3371.L2', count(*) FROM topology.TopoGeo_AddLineString( 'bug3711',
 'LINESTRING (618370 4833780 1.92, 618370 4833784 1.90, 618371 4833780 1.93)'
 ::geometry, 0);
 SELECT 't3371.end', topology.DropTopology('bug3711');
@@ -378,7 +377,7 @@ SELECT 't1855_1.end', topology.DropTopology('bug1855');
 SELECT 't1855_2.start', topology.CreateTopology('bug1855') > 0;
 SELECT 't1855_2.0', topology.topogeo_AddLinestring('bug1855',
   'LINESTRING(0 0, 0 100)');
-SELECT 't1855_2.1', topology.topogeo_AddLinestring('bug1855',
+SELECT 't1855_2.1', count(*) FROM topology.topogeo_AddLinestring('bug1855',
   'LINESTRING(10 51, -100 50, 10 49)', 2);
 SELECT 't1855_2.end', topology.DropTopology('bug1855');
 
diff --git a/topology/test/regress/topogeo_addlinestring_expected b/topology/test/regress/topogeo_addlinestring_expected
index 8f75e7c..c760d95 100644
--- a/topology/test/regress/topogeo_addlinestring_expected
+++ b/topology/test/regress/topogeo_addlinestring_expected
@@ -8,171 +8,168 @@ ERROR:  Invalid geometry type (MULTILINESTRING) passed to TopoGeo_AddLinestring,
 ERROR:  Invalid geometry type (POINT) passed to TopoGeo_AddLinestring, expected LINESTRING
 ERROR:  No topology with name "invalid" in topology.topology
 iso_uni|27
-iso_uni|N|23||POINT(36 26)
-iso_uni|N|24||POINT(38 30)
-iso_uni|E|27|sn23|en24
+iso_uni|N||POINT(36 26)
+iso_uni|N||POINT(38 30)
+iso_uni|E|LINESTRING(36 26,38 30)
 iso_f5|28
-iso_f5|N|25||POINT(37 20)
-iso_f5|N|26||POINT(41 16)
-iso_f5|E|28|sn25|en26
+iso_f5|N||POINT(37 20)
+iso_f5|N||POINT(41 16)
+iso_f5|E|LINESTRING(37 20,43 19,41 16)
 iso_ex|27
 iso_ex_tol|27
 noniso_ex|18
 noniso_ex_tol|18
 contained|29
-contained|N|27||POINT(35 8)
-contained|N|28||POINT(35 12)
-contained|E|18|sn10|en27
-contained|E|29|sn27|en28
-contained|E|30|sn28|en13
+contained|N||POINT(35 8)
+contained|N||POINT(35 12)
+contained|E|LINESTRING(35 6,35 8)
+contained|E|LINESTRING(35 8,35 12)
+contained|E|LINESTRING(35 12,35 14)
 overlap|31
 overlap|32
-overlap|N|29||POINT(49 22)
-overlap|N|30||POINT(45 22)
-overlap|E|8|sn18|en30
-overlap|E|31|sn19|en29
-overlap|E|32|sn30|en19
+overlap|N||POINT(45 22)
+overlap|N||POINT(49 22)
+overlap|E|LINESTRING(35 22,45 22)
+overlap|E|LINESTRING(45 22,47 22)
+overlap|E|LINESTRING(47 22,49 22)
 cross|34
 cross|35
-cross|N|31||POINT(49 18)
-cross|N|32||POINT(47 17.6)
-cross|N|33||POINT(44 17)
-cross|E|15|sn12|en32
-cross|E|33|sn32|en19
-cross|E|34|sn31|en32
-cross|E|35|sn32|en33
+cross|N||POINT(44 17)
+cross|N||POINT(47 17.6)
+cross|N||POINT(49 18)
+cross|E|LINESTRING(47 14,47 17.6)
+cross|E|LINESTRING(47 17.6,47 22)
+cross|E|LINESTRING(47 17.6,44 17)
+cross|E|LINESTRING(49 18,47 17.6)
 snap|7
 snap|36
 snap|38
-snap|N|34||POINT(18 22.200000000000003)
-snap|N|35||POINT(22.400000000000002 22)
-snap|N|36||POINT(21.200000000000003 20.400000000000002)
-snap|E|7|sn17|en35
-snap|E|36|sn34|en17
-snap|E|37|sn35|en18
-snap|E|38|sn35|en36
+snap|N||POINT(21.2 20.5)
+snap|N||POINT(22.35 22)
+snap|N||POINT(18 22.2)
+snap|E|LINESTRING(22.35 22,35 22)
+snap|E|LINESTRING(22.35 22,21.2 20.5)
+snap|E|LINESTRING(21 22,22.35 22)
+snap|E|LINESTRING(18 22.2,21 22)
 snap_again|7
 snap_again|36
 snap_again|38
 crossover|4
-crossover|N|
-crossover|N|
-crossover|N|
-crossover|N|
-crossover|N|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
-crossover|E|
+crossover|N||POINT(21 10)
+crossover|N||POINT(16.2 14)
+crossover|N||POINT(21 7)
+crossover|N||POINT(9 20)
+crossover|N||POINT(9 18)
+crossover|E|LINESTRING(9 14,16.2 14)
+crossover|E|LINESTRING(21 7,21 10)
+crossover|E|LINESTRING(16.2 14,21 10)
+crossover|E|LINESTRING(16.2 14,21 14)
+crossover|E|LINESTRING(21 10,21 14)
+crossover|E|LINESTRING(21 6,21 7)
+crossover|E|LINESTRING(9 20,9 22)
+crossover|E|LINESTRING(9 20,16.2 14)
+crossover|E|LINESTRING(9 14,9 18)
+crossover|E|LINESTRING(9 18,9 20)
 crossover_again|4
 contains|25
 contains|46
 contains|47
-contains|N|
-contains|N|
-contains|E|
-contains|E|
+contains|N||POINT(7 36)
+contains|N||POINT(14 34)
+contains|E|LINESTRING(14 34,13 35)
+contains|E|LINESTRING(9 35,7 36)
 nodecross|48
 nodecross|49
-nodecross|N|44||POINT(18 37)
-nodecross|N|45||POINT(22 37)
-nodecross|E|48|sn44|en4
-nodecross|E|49|sn4|en45
+nodecross|N||POINT(22 37)
+nodecross|N||POINT(18 37)
+nodecross|E|LINESTRING(20 37,22 37)
+nodecross|E|LINESTRING(18 37,20 37)
 iso_ex_2segs|28
 #1613.1|50
-#1613.1|N|46||POINT(556267.6 144887)
-#1613.1|N|47||POINT(556267 144887.4)
-#1613.1|E|50|sn46|en47
+#1613.1|N||POINT(556267 144887.4)
+#1613.1|N||POINT(556267.56 144887.07)
+#1613.1|E|LINESTRING(556267.56 144887.07,556267 144887.4)
 #1613.2|52
 #1613.2|53
-#1613.2|N|
-#1613.2|N|
-#1613.2|N|
-#1613.2|E|
-#1613.2|E|
-#1613.2|E|
-#1613.2|E|
+#1613.2|N||POINT(556250 144887)
+#1613.2|N||POINT(556267.56 144887.07)
+#1613.2|N||POINT(556310.04 144887)
+#1613.2|E|LINESTRING(556250 144887,556267 144887.07,556267.56 144887.07)
+#1613.2|E|LINESTRING(556267.56 144887.07,556267 144887.4)
+#1613.2|E|LINESTRING(556267.56 144887.07,556267.56 144887.07)
+#1613.2|E|LINESTRING(556267.56 144887.07,556310.04 144887)
 #1631.1|54
-#1631.1|N|51||POINT(556267.6 144887)
-#1631.1|N|52||POINT(556267.6 144888)
-#1631.1|E|54|sn51|en52
+#1631.1|N||POINT(556267.57 144888)
+#1631.1|N||POINT(556267.56 144887.07)
+#1631.1|E|LINESTRING(556267.56 144887.07,556267.57 144888)
 #1631.2|55
 #1631.2|56
-#1631.2|N|53||POINT(556254.6 144886.6)
-#1631.2|N|54||POINT(556267.6 144887)
-#1631.2|E|55|sn53|en51
-#1631.2|E|56|sn51|en54
+#1631.2|N||POINT(556254.67 144886.62)
+#1631.2|N||POINT(556267.66 144887.07)
+#1631.2|E|LINESTRING(556254.67 144886.62,556267.56 144887.07)
+#1631.2|E|LINESTRING(556267.56 144887.07,556267.66 144887.07)
 #1641.1|57
-#1641.1|N|55||POINT(-0.2 0.4)
-#1641.1|N|56||POINT(0.2 0.4)
-#1641.1|E|57|sn55|en56
+#1641.1|N||POINT(0.14 0.41)
+#1641.1|N||POINT(-0.22 0.47)
+#1641.1|E|LINESTRING(-0.22 0.47,0.14 0.41)
 #1641.2|59
 #1641.2|60
-#1641.2|N|57||POINT(0 0.2)
-#1641.2|N|58||POINT(0 0.4)
-#1641.2|N|59||POINT(0 0.4)
-#1641.2|E|57|sn55|en58
-#1641.2|E|58|sn58|en56
-#1641.2|E|59|sn57|en58
-#1641.2|E|60|sn58|en59
+#1641.2|N||POINT(0.1 0.11)
+#1641.2|N||POINT(-0.06 0.47)
+#1641.2|N||POINT(-0.05 0.44)
+#1641.2|E|LINESTRING(0.1 0.11,-0.05 0.44)
+#1641.2|E|LINESTRING(-0.05 0.44,0.14 0.41)
+#1641.2|E|LINESTRING(-0.05 0.44,-0.06 0.47)
+#1641.2|E|LINESTRING(-0.22 0.47,-0.05 0.44)
 #1641.3|61
-#1641.3|N|60||POINT(-0.2 0.4)
-#1641.3|N|61||POINT(0.2 0.4)
-#1641.3|E|61|sn60|en61
+#1641.3|N||POINT(0.14 0.41)
+#1641.3|N||POINT(-0.22 0.47)
+#1641.3|E|LINESTRING(-0.22 0.47,0.14 0.41)
 #1641.4|63
 #1641.4|64
-#1641.4|N|62||POINT(0 0.2)
-#1641.4|N|63||POINT(0 0.4)
-#1641.4|N|64||POINT(0 0.4)
-#1641.4|E|61|sn60|en63
-#1641.4|E|62|sn63|en61
-#1641.4|E|63|sn62|en63
-#1641.4|E|64|sn63|en64
+#1641.4|N||POINT(0.1 0.11)
+#1641.4|N||POINT(-0.06 0.47)
+#1641.4|N||POINT(-0.05 0.44)
+#1641.4|E|LINESTRING(0.1 0.11,-0.05 0.44)
+#1641.4|E|LINESTRING(-0.05 0.44,0.14 0.41)
+#1641.4|E|LINESTRING(-0.05 0.44,-0.06 0.47)
+#1641.4|E|LINESTRING(-0.22 0.47,-0.05 0.44)
 #1650.1
 #1650.265
-#1650.2|N|65||POINT(0 0)
-#1650.2|N|66||POINT(0 1)
-#1650.2|E|65|sn65|en66
+#1650.2|N||POINT(0 0)
+#1650.2|N||POINT(0 1)
+#1650.2|E|LINESTRING(0 0,0 1)
 #1650.3|65
 #1650.3|66
-#1650.3|N|67||POINT(10 0)
-#1650.3|E|66|sn65|en67
+#1650.3|N||POINT(10 0)
+#1650.3|E|LINESTRING(0 0,10 0)
 #1654.1|N|68
-#1654.1|N|68|0|POINT(0 0)
+#1654.1|N|0|POINT(0 0)
 #1654.2|67
 #1654.2|68
-#1654.2|N|69||POINT(-10 1)
-#1654.2|N|70||POINT(10 1)
-#1654.2|E|67|sn69|en68
-#1654.2|E|68|sn68|en70
+#1654.2|N||POINT(10 1)
+#1654.2|N||POINT(-10 1)
+#1654.2|E|LINESTRING(0 0,10 1)
+#1654.2|E|LINESTRING(-10 1,0 0)
 #1706.1|E|69
-#1706.1|N|71||POINT(20 10)
-#1706.1|N|72||POINT(10 20)
-#1706.1|E|69|sn71|en72
-#1706.2|E*|69
-#1706.2|E*|70
-#1706.2|E*|71
-#1706.2|E*|73
-#1706.2|N|73||POINT(10 0)
-#1706.2|N|74||POINT(10 10)
-#1706.2|N|75||POINT(9 12)
-#1706.2|N|76||POINT(15 10)
-#1706.2|E|69|sn71|en76
-#1706.2|E|70|sn74|en75
-#1706.2|E|71|sn73|en74
-#1706.2|E|72|sn75|en72
-#1706.2|E|73|sn76|en74
+#1706.1|N||POINT(20 10)
+#1706.1|N||POINT(10 20)
+#1706.1|E|LINESTRING(20 10,10 10,9 12,10 20)
+#1706.2|4
+#1706.2|N||POINT(10 0)
+#1706.2|N||POINT(9 12)
+#1706.2|N||POINT(15 10)
+#1706.2|N||POINT(10 10)
+#1706.2|E|LINESTRING(10 0,10 10)
+#1706.2|E|LINESTRING(15 10,10 10)
+#1706.2|E|LINESTRING(10 10,9 12)
+#1706.2|E|LINESTRING(20 10,15 10)
+#1706.2|E|LINESTRING(9 12,10 20)
 #1714.1|N|77
-#1714.1|N|77|0|POINT(10 0)
+#1714.1|N|0|POINT(10 0)
 #1714.2|E*|74
-#1714.2|N|78||POINT(0 20)
-#1714.2|E|74|sn77|en78
+#1714.2|N||POINT(0 20)
+#1714.2|E|LINESTRING(10 0,0 20)
 Topology 'city_data' dropped
 t3280.start|t
 t3280|L11
@@ -196,7 +193,6 @@ t3412.L2|4
 t3412.end|Topology 'bug3412' dropped
 t3371.start|t
 t3371.L1|1
-t3371.L2|3
 t3371.L2|2
 t3371.end|Topology 'bug3711' dropped
 t3838.start|t
@@ -209,8 +205,6 @@ t1855_1.end|Topology 'bug1855' dropped
 t1855_2.start|t
 t1855_2.0|1
 t1855_2.1|3
-t1855_2.1|5
-t1855_2.1|6
 t1855_2.end|Topology 'bug1855' dropped
 t4757.start|t
 t4757.0|1

-----------------------------------------------------------------------

Summary of changes:
 topology/test/regress/topogeo_addlinestring.sql    |  33 ++-
 .../test/regress/topogeo_addlinestring_expected    | 238 ++++++++++-----------
 2 files changed, 132 insertions(+), 139 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list