]> granicus.if.org Git - postgis/commitdiff
topology.AddEdge: make edge linking self-consistent (each added edge will form a...
authorSandro Santilli <strk@keybit.net>
Thu, 19 May 2011 20:36:47 +0000 (20:36 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 19 May 2011 20:36:47 +0000 (20:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7201 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/populate.sql
topology/test/regress/addedge_expected

index 731f8ffb36baa3dc7524b8f7a6cc64a16da256ae..1f1abc26d16384eaf1c91759e82e94cc9288218c 100644 (file)
@@ -131,7 +131,7 @@ LANGUAGE 'plpgsql' VOLATILE;
 -- node or interects with an existing edge on anything but endnodes.
 --
 -- The newly added edge has "universe" face on both sides
--- and links to itself.
+-- and links to itself as per next left/right edge.
 -- Calling code is expected to do further linking.
 --
 -- 
@@ -276,7 +276,7 @@ BEGIN
                || ')) ,'
 
                -- next_left_edge
-               || edgeid ||','
+               || -edgeid ||','
 
                -- next_right_edge
                || edgeid ||','
index 4c6445ba0362d367bcc692492a9156dd1ec2469b..39be89d6b441b8334fd893f0e0d033a80263432e 100644 (file)
@@ -21,14 +21,14 @@ ERROR:  Edge intersects (not on endpoints) with existing edge 7 at or near point
 ERROR:  Edge intersects (not on endpoints) with existing edge 7 at or near point POINT(8 10)
 ERROR:  Edge intersects (not on endpoints) with existing edge 7 at or near point POINT(10 12)
 #770-1*|7
-1|0|0|1|1|LINESTRING(0 0,8 0)
-2|0|0|2|2|LINESTRING(8 0,8 10)
-3|0|0|3|3|LINESTRING(0 0,0 10)
-4|0|0|4|4|LINESTRING(8 10,0 10)
-5|0|0|5|5|LINESTRING(8 -10,0 -10)
-6|0|0|6|6|LINESTRING(8 -10,4 -20,0 -10)
-7|0|0|7|7|LINESTRING(8 10,10 10,10 12,8 10)
-8|0|0|8|8|LINESTRING(8 10,9 8,10 9,8 10)
+1|0|0|-1|1|LINESTRING(0 0,8 0)
+2|0|0|-2|2|LINESTRING(8 0,8 10)
+3|0|0|-3|3|LINESTRING(0 0,0 10)
+4|0|0|-4|4|LINESTRING(8 10,0 10)
+5|0|0|-5|5|LINESTRING(8 -10,0 -10)
+6|0|0|-6|6|LINESTRING(8 -10,4 -20,0 -10)
+7|0|0|-7|7|LINESTRING(8 10,10 10,10 12,8 10)
+8|0|0|-8|8|LINESTRING(8 10,9 8,10 9,8 10)
 Topology 'tt' dropped
 t
 MiX|1