]> granicus.if.org Git - postgis/commitdiff
Do not consider nodes with the same bounding box as being equal.
authorSandro Santilli <strk@keybit.net>
Sat, 12 Nov 2011 18:20:56 +0000 (18:20 +0000)
committerSandro Santilli <strk@keybit.net>
Sat, 12 Nov 2011 18:20:56 +0000 (18:20 +0000)
Fixes bug #1284. Includes regression test.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8148 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/sqlmm.sql
topology/test/regress/st_createtopogeo.sql
topology/test/regress/st_createtopogeo_expected

index 4f99bd0f175eeebb8822c29d1d1b5bff80fc8b7a..520e74ce4ed6863f269aed7d83db03db0c6e9958 100644 (file)
@@ -4039,7 +4039,7 @@ BEGIN
          )
   FROM (
     SELECT ST_StartPoint(geom) as geom FROM edges
-      UNION
+      UNION ALL
     SELECT ST_EndPoint(geom) FROM edges
   ) as endpoints INTO points;
 
index 23638eb7a253ef3711ff26676eb257169ef785ea..b9131ab48d18e439ee3902d07888273e2d893fbe 100644 (file)
@@ -223,6 +223,30 @@ select * from print_elements_count('T16');
 select * from print_isolated_nodes('T16');
 select null from ( select topology.DropTopology('t') ) as dt;
 
+-- Very close-by nodes created by intersection
+-- See ticket #1284
+select null from ( select topology.CreateTopology('t') > 0 ) as ct;
+select 'T17', st_asewkt(g) FROM (
+SELECT g, topology.st_createtopogeo('t', g) FROM ( SELECT '
+MULTILINESTRING(
+(
+ 832709.937 816560.25,
+ 832705.813 816470.25,
+ 832661.937 816561.875
+),
+(
+ 832705.812 816470.25,
+ 832709.937 816560.25
+),
+(
+ 832661.938 816561.875,
+ 832705.813 816470.25
+))
+'::geometry as g ) as i ) as j;
+select * from print_elements_count('T17');
+select * from print_isolated_nodes('T17');
+select null from ( select topology.DropTopology('t') ) as dt;
+
 -- clean up
 DELETE FROM spatial_ref_sys where srid = 4326;
 DROP FUNCTION print_isolated_nodes(text);
index ca5847bb4098ff225c287bea29961195c1bea62e..da3243ee112dd66c6531621d73c6fff05de5a0fb 100644 (file)
@@ -38,3 +38,5 @@ T15|GEOMETRYCOLLECTION(LINESTRING(-5 -2,0 0),LINESTRING(0 0,10 10),LINESTRING(0
 T15|4 nodes|4 edges|1 faces
 T16|GEOMETRYCOLLECTION(LINESTRING(0 0,10 0),LINESTRING(0 3,20 4),LINESTRING(10 0,20 4))
 T16|4 nodes|3 edges|0 faces
+T17|MULTILINESTRING((832709.937 816560.25,832705.813 816470.25,832661.937 816561.875),(832705.812 816470.25,832709.937 816560.25),(832661.938 816561.875,832705.813 816470.25))
+T17|7 nodes|8 edges|2 faces