[geos-devel] [GEOS] #741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify distance
GEOS
geos-trac at osgeo.org
Fri Aug 14 14:10:11 PDT 2015
#741: GEOSSimplify() returns empty polygon if inner ring dimension < simplify
distance
------------------------+--------------------------
Reporter: rouault | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.4.3
Component: Default | Version: svn-trunk
Severity: Unassigned | Keywords:
------------------------+--------------------------
Demonstrated with OGR scripting, but the issue is in GEOS
{{{
from osgeo import ogr
ogr_geom = ogr.CreateGeometryFromWkt('POLYGON ((-180 90,180 90,180 -90,180
-90,-180 -90,-180 90),(0 0,0 0.0001,0.0001 0.0001,0 0))')
simple_geom = ogr_geom.Simplify(0.005)
print simple_geom # prints POLYGON EMPTY --> unexpected
ogr_geom = ogr.CreateGeometryFromWkt('POLYGON ((-180 90,180 90,180 -90,180
-90,-180 -90,-180 90),(0 0,0 0.0001,0.0001 0.0001,0 0))')
simple_geom = ogr_geom.Simplify(0.00005) # prints POLYGON ((-180 90,180
90,180 -90,-180 -90,-180 90),(0 0,0.0001 0.0001,0.0 0.0001,0 0)) --> OK
}}}
The above is an artificial example reproducing a real world situation
It seems to be an issue failed simplification of the inner ring.
Reproduced with latest GEOS trunk r4082
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/741>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list