[postgis-tickets] r15708 - Restore leftmost edge finding in TopoJSON output

Sandro Santilli strk at kbt.io
Wed Sep 13 06:09:40 PDT 2017


Author: strk
Date: 2017-09-13 06:09:40 -0700 (Wed, 13 Sep 2017)
New Revision: 15708

Modified:
   trunk/topology/sql/export/TopoJSON.sql.in
   trunk/topology/test/regress/topojson_expected
Log:
Restore leftmost edge finding in TopoJSON output

Modified: trunk/topology/sql/export/TopoJSON.sql.in
===================================================================
--- trunk/topology/sql/export/TopoJSON.sql.in	2017-09-13 05:04:44 UTC (rev 15707)
+++ trunk/topology/sql/export/TopoJSON.sql.in	2017-09-13 13:09:40 UTC (rev 15708)
@@ -161,7 +161,7 @@
 ),
 _leftmost_non_dangling_edge AS (
   SELECT e.* FROM _edges e WHERE e.lf != e.rf
-  ORDER BY geom LIMIT 1
+  ORDER BY ST_XMin(geom) LIMIT 1
 ),
 _edgepath AS (
   SELECT

Modified: trunk/topology/test/regress/topojson_expected
===================================================================
--- trunk/topology/test/regress/topojson_expected	2017-09-13 05:04:44 UTC (rev 15707)
+++ trunk/topology/test/regress/topojson_expected	2017-09-13 13:09:40 UTC (rev 15708)
@@ -24,30 +24,30 @@
 L1-vanilla|R4|{ "type": "MultiLineString", "arcs": [[3]]}
 L2-vanilla|R1R2|{ "type": "MultiLineString", "arcs": [[9,-11],[4,-6]]}
 L2-vanilla|R4|{ "type": "MultiLineString", "arcs": [[3]]}
-A1-vanilla|P1|{ "type": "MultiPolygon", "arcs": [[[21,20,5,-19,-20,-12]]]}
-A1-vanilla|P2|{ "type": "MultiPolygon", "arcs": [[[19,18,6,-17,-18,-13]]]}
-A1-vanilla|P3|{ "type": "MultiPolygon", "arcs": [[[17,16,7,-15,-16,-14]]]}
+A1-vanilla|P1|{ "type": "MultiPolygon", "arcs": [[[20,5,-19,-20,-12,21]]]}
+A1-vanilla|P2|{ "type": "MultiPolygon", "arcs": [[[18,6,-17,-18,-13,19]]]}
+A1-vanilla|P3|{ "type": "MultiPolygon", "arcs": [[[16,7,-15,-16,-14,17]]]}
 A1-vanilla|P4|{ "type": "MultiPolygon", "arcs": [[[-2]]]}
-A1-vanilla|P5|{ "type": "MultiPolygon", "arcs": [[[25],[-1]]]}
-A2-vanilla|P1P2|{ "type": "MultiPolygon", "arcs": [[[21,20,5,6,-17,-18,-13,-12]]]}
-A2-vanilla|P3P4|{ "type": "MultiPolygon", "arcs": [[[17,16,7,-15,-16,-14]],[[-2]]]}
+A1-vanilla|P5|{ "type": "MultiPolygon", "arcs": [[[-1],[25]]]}
+A2-vanilla|P1P2|{ "type": "MultiPolygon", "arcs": [[[20,5,6,-17,-18,-13,-12,21]]]}
+A2-vanilla|P3P4|{ "type": "MultiPolygon", "arcs": [[[-2]],[[16,7,-15,-16,-14,17]]]}
 L1-edgemap|R1|{ "type": "MultiLineString", "arcs": [[0,-2]]}
 L1-edgemap|R2|{ "type": "MultiLineString", "arcs": [[2,-4]]}
 L1-edgemap|R3|{ "type": "MultiLineString", "arcs": [[4]]}
 L1-edgemap|R4|{ "type": "MultiLineString", "arcs": [[5]]}
 L2-edgemap|R1R2|{ "type": "MultiLineString", "arcs": [[0,-2],[2,-4]]}
 L2-edgemap|R4|{ "type": "MultiLineString", "arcs": [[4]]}
-A1-edgemap|P1|{ "type": "MultiPolygon", "arcs": [[[5,4,3,-3,-2,-1]]]}
-A1-edgemap|P2|{ "type": "MultiPolygon", "arcs": [[[1,2,9,-9,-8,-7]]]}
-A1-edgemap|P3|{ "type": "MultiPolygon", "arcs": [[[7,8,13,-13,-12,-11]]]}
+A1-edgemap|P1|{ "type": "MultiPolygon", "arcs": [[[5,4,-4,-3,-2,0]]]}
+A1-edgemap|P2|{ "type": "MultiPolygon", "arcs": [[[3,9,-9,-8,-7,2]]]}
+A1-edgemap|P3|{ "type": "MultiPolygon", "arcs": [[[8,13,-13,-12,-11,7]]]}
 A1-edgemap|P4|{ "type": "MultiPolygon", "arcs": [[[-15]]]}
-A1-edgemap|P5|{ "type": "MultiPolygon", "arcs": [[[15],[-17]]]}
-A2-edgemap|P1P2|{ "type": "MultiPolygon", "arcs": [[[7,6,5,4,-4,-3,-2,-1]]]}
-A2-edgemap|P3P4|{ "type": "MultiPolygon", "arcs": [[[2,3,11,-11,-10,-9]],[[-13]]]}
+A1-edgemap|P5|{ "type": "MultiPolygon", "arcs": [[[-16],[16]]]}
+A2-edgemap|P1P2|{ "type": "MultiPolygon", "arcs": [[[7,6,5,-5,-4,-3,-2,0]]]}
+A2-edgemap|P3P4|{ "type": "MultiPolygon", "arcs": [[[-9]],[[4,12,-12,-11,-10,3]]]}
 E32
 E33
 E34
 E35
-A3-vanilla|P6|{ "type": "MultiPolygon", "arcs": [[[30,25],[-33],[1]],[[34],[-34]]]}
+A3-vanilla|P6|{ "type": "MultiPolygon", "arcs": [[[-33],[30,25],[1]],[[-34],[34]]]}
 P1-vanilla|S2|{"type":"MultiPoint","coordinates":[[35,14]]}
 Topology 'city_data' dropped



More information about the postgis-tickets mailing list