Opened 10 years ago

Closed 10 years ago

#4930 closed defect (wontfix)

ogr2ogr: running with simplify flag is creating topology issues.

Reported by: kashmir772 Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.9.1
Severity: normal Keywords: ogr simplify
Cc:

Description

Running ogr2ogr with the simplify flag is creating topology issues. I am seeing overlapping polygons and gaps in the output shapefile. I am running v1.9.1 on a 64 bit build.

Here is the command that I am running. ogr2ogr -overwrite -progress -f "ESRI Shapefile" "input.shp" "output.shp" -nlt POLYGON -simplify 0.00002

Attachments (1)

topoerrors.JPG (23.5 KB ) - added by kashmir772 10 years ago.
screen capture of the topology issues.

Download all attachments as: .zip

Change History (4)

by kashmir772, 10 years ago

Attachment: topoerrors.JPG added

screen capture of the topology issues.

comment:1 by Jukka Rahkonen, 10 years ago

I believe that ogr2ogr is working per feature basis and when it simplifies features it does not care about other features. You must use other tools for simplifying features so that layer topology is preserved. Notice that for example PostGIS ST_SimplifyPreserveTopology is not such a tool. It preserves the topology of features but not the whole layer.

comment:2 by Jukka Rahkonen, 10 years ago

I just found a how-to for avoiding gaps and overlaps http://trac.osgeo.org/postgis/wiki/UsersWikiSimplifyPreserveTopology

comment:3 by Even Rouault, 10 years ago

Resolution: wontfix
Status: newclosed

Jukka is right. I've improved the documentation of -simplify in r25332. I'm thus closing this ticket, since layer topology preservation would be a very different beast, not easily doable with the way OGR works

Note: See TracTickets for help on using tickets.