[geos-devel] [GEOS] #841: Regression in prepared polygons contains
GEOS
geos-trac at osgeo.org
Wed Sep 6 09:20:04 PDT 2017
#841: Regression in prepared polygons contains
------------------------+-------------------------------
Reporter: sgillies | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.6.3
Component: Default | Version: 3.6.2
Severity: Unassigned | Keywords: prepared contains
------------------------+-------------------------------
Shapely users have found a regression in the contains predicate of a
prepared polygon: https://github.com/Toblerity/Shapely/issues/519
With GEOS 3.4.2 we see the following:
{{{
>>> from shapely.geometry import Point, Polygon
>>> import shapely.prepared
>>> point = Point(0.95, 0.05)
>>> geom = Polygon([(0, 0), (1, 0), (0, 1), (0, 0)])
>>> shapely.geos.geos_version
(3, 4, 2)
>>> shapely.prepared.prep(geom).contains(point)
True
>>> geom.contains(point)
True
}}}
With GEOS version 3.5.1 and newer we observe
{{{
>>> shapely.prepared.prep(geom).contains(point)
False
>>> geom.contains(point)
True
}}}
--
Ticket URL: <https://trac.osgeo.org/geos/ticket/841>
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