Opened 12 years ago
Closed 3 years ago
#2273 closed defect (invalid)
TopoGeo_AddPolygon returns more polygons second call
Reported by: | robe | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | topology | Version: | master |
Keywords: | Cc: |
Description
I'm guessing this ticket might be related to #2175.
I've got data I downloaded from: http://metro.teczno.com/#chennai
and then I prepared a test set (which I'll attach), by doing this:
SELECT gid, geom INTO test_wet FROM (SELECT gid, (ST_Dump(geom)).geom FROM osm_polygon WHERE "natural" IN('wetland', 'water', 'high-water')) As f;
Now creating a topology:
SELECT CreateTopology('test_chennai', 4326); -- first run 40,622ms 455 rows, second run 32,807ms, 614 rows, 3rd run 33,415ms 614 rows SELECT gid, TopoGeo_AddPolygon('test_chennai', geom) As face_id FROM test_wet;
Shouldn't I get the same number of rows on each call and just have the original rows created returned to me or is it an artifact of objects being created and splitting midstream in which case I guess we just need to document the behavior.
I'm running and I thought we used to report topology version
POSTGIS="2.1.0SVN r11252" GEOS="3.4.0dev-CAPI-1.8.0 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER
Attachments (1)
Change History (7)
by , 12 years ago
Attachment: | test_wet.zip added |
---|
comment:1 by , 12 years ago
Component: | postgis → topology |
---|---|
Owner: | changed from | to
comment:2 by , 11 years ago
Milestone: | PostGIS 2.1.0 → PostGIS 2.2.0 |
---|
comment:3 by , 11 years ago
comment:4 by , 9 years ago
Milestone: | PostGIS 2.2.0 → PostGIS Future |
---|
comment:6 by , 3 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I've tried this testcase with current PostGIS version. First run returns 455 rows (which are *faces*) second run returns 614 rows (as all subsequent ones).
Thinking a bit about it I'm not fully surprised, because when a TopoGeometry is initially created may be composed by a single face but upon creating *more* TopoGeometry (subsequent records) the single face may be split into more faces, which is why by the end of the load statement there would be more faces for polygons.
You can see this by querying the number of faces at the end of the first load, without re-loading the data:
SELECT gid, TopoGeo_AddPolygon('test_chennai', geom) As face_id FROM test_wet; -- returns 455 rows SELECT count(*) FROM test_chennai.face where face_id > 0; -- returns 636
For faces no, it shouldn't really be related to #2175. Can you get some stats about the area size of those faces ? There could be a problem of tolerance, maybe ? Reducing the dataset would help further understanding the issue.