]> granicus.if.org Git - postgis/commitdiff
Fix #874 by getting back to ST_SharedPaths use. Might try to optimize again in the...
authorSandro Santilli <strk@keybit.net>
Sat, 19 Mar 2011 23:35:21 +0000 (23:35 +0000)
committerSandro Santilli <strk@keybit.net>
Sat, 19 Mar 2011 23:35:21 +0000 (23:35 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6942 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/populate.sql
topology/test/regress/addface.sql

index 11fe4adf6685013b909b11cd3f2c62f0cc9fda51..397e3b476b46bec7e60ec6c52d2e69ef1be15962 100644 (file)
@@ -371,10 +371,8 @@ BEGIN
     LOOP -- {
 
       -- Find the side of the edge on the face
-      right_side := ST_Line_Locate_Point(bounds,
-                ST_Line_Interpolate_Point(rec.geom, 0.2)) <
-              ST_Line_Locate_Point(bounds,
-                ST_Line_Interpolate_Point(rec.geom, 0.8));
+      SELECT DISTINCT (st_dump(st_sharedpaths(rec.geom, bounds))).path[1]
+       = 1 INTO STRICT right_side;
 
       RAISE DEBUG 'Edge % (left:%, right:%) - ring : % - right_side : %',
         rec.edge_id, rec.left_face, rec.right_face, rrec.path, right_side;
index bafb7ee599245661045de5d8cecdeac7b35419cb..c1fea2646e404cc9c665d7a2ac65dee6632f7f7a 100644 (file)
@@ -74,7 +74,7 @@ SELECT 't2.e11',  topology.addEdge('t2', 'LINESTRING(12 2, 12 4, 14 4)');
 
 -- Register left face with two holes
 SELECT 't2.f1',  topology.addFace('t2',
-'POLYGON((0 0,10 0,10 10,0 10,0 0),
+'POLYGON((10 5, 10 10,0 10, 0 0,10 0,10 5),
          (1 1,2 1,2 2,1 2,1 1),
          (3 1,3 2,4 2,4 1,3 1))'
 );