Opened 11 years ago

Last modified 9 years ago

#2391 closed defect

TopoGeo_AddPolygon splits again on second call — at Initial Version

Reported by: robe Owned by: strk
Priority: medium Milestone: PostGIS 2.2.0
Component: topology Version: 2.1.x
Keywords: Cc:

Description

strk,

Not sure if this is related to issue #2273 I complained about.

I'm running this (I have the postgres.backend issue if you are wondering why I can't upgrade to 2.2.0dev for PostGIS part.

POSTGIS="2.2.0dev r11710" GEOS="3.4.0dev-CAPI-1.8.0 r3846" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER PostgreSQL 9.3beta2, compiled by Visual C++ build 1600, 64-bit

and I tried with my PostgreSQL 9.2 64-bit install too and have the same issue.

Anyway I'm puzzled by this to recreate

run the attached ch08_staging (for the record data is the city boundary file from here http://www.victoria.ca/EN/main/city/open-data-catalogue.html)

SELECT CreateTopology('ch08_topology',4326);
SELECT gid, TopoGeo_AddLineString('ch08_topology', geom) As edge_id 
FROM (SELECT gid, (ST_Dump(geom)).geom 
 FROM ch08_staging.cityboundary
) As f;
-- outputs --
gid | edge_id
1,1

SELECT topologysummary('ch08_topology');

outputs:

                  topologysummary
----------------------------------------------------
 Topology ch08_topology (1), SRID 4326, precision 0+
 1 nodes, 1 edges, 1 faces, 0 topogeoms in 0 layers+

run the add again

SELECT gid, TopoGeo_AddLineString('ch08_topology', geom) As edge_id 
FROM (SELECT gid, (ST_Dump(geom)).geom 
 FROM ch08_staging.cityboundary
) As f;

Get output:

 gid | edge_id
-----+---------
   1 |       1
   1 |       2

Where did edge_id 2 come from.

SELECT topologysummary('ch08_topology');

outputs:

                  topologysummary
----------------------------------------------------
 Topology ch08_topology (1), SRID 4326, precision 0+
 2 nodes, 2 edges, 1 faces, 0 topogeoms in 0 layers+

Is this a bug or just an occupational hazard with tolerances? Unfortunately if I repeat the above exercise with something like I still get an additional split the second call.

SELECT gid, TopoGeo_AddLineString('ch08_topology', geom, 0.0001) As edge_id 
FROM (SELECT gid, (ST_Dump(geom)).geom 
 FROM ch08_staging.cityboundary
) As f;

I've also tested on 2.1.0 and have same issue, but haven't tested on 2.0.

Change History (1)

by robe, 11 years ago

Attachment: ch08_staging.sql added
Note: See TracTickets for help on using tickets.