]> granicus.if.org Git - postgis/commitdiff
Ensure face splitting algorithm uses the edge index (#2610)
authorSandro Santilli <strk@keybit.net>
Mon, 13 Jan 2014 22:50:30 +0000 (22:50 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 13 Jan 2014 22:50:30 +0000 (22:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12184 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/sqlmm.sql.in

index a7b81f5e233b4d2cb55fa60d743e6a796cadad1f..dbb0a27788768e9fbd29359c4619f98e99d4888d 100644 (file)
@@ -3052,11 +3052,12 @@ BEGIN
        )::text )
     || ') AND ';
   IF ishole THEN sql := sql || 'NOT '; END IF;
-  sql := sql || 'ST_Contains(' || quote_literal(fan.shell::text)
+  sql := sql || '( ' || quote_literal(fan.shell::text)
+    || ' && geom AND _ST_Contains(' || quote_literal(fan.shell::text)
     -- We only need to check a single point, but must not be an endpoint
-    || '::geometry, ST_LineInterpolatePoint(geom, 0.2))';
+    || '::geometry, ST_LineInterpolatePoint(geom, 0.2)) )';
 #ifdef POSTGIS_TOPOLOGY_DEBUG
-  RAISE DEBUG 'Updating edges bounding the old face';
+  RAISE DEBUG 'Updating edges bounding the old face: %', sql;
 #endif
   EXECUTE sql;