-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contains issue for complex LineStrings #17
Comments
|
I'm seeing odd behaviour elsewhere, where the DE-9IMs are completely different between Shapely and JTS. If broken = A, and contained = B: Shapely: JTS (1.12.0): Furthermore, Within and Contains are all false for all combinations. What's really odd with the JTS result is that the interior ∩ interior result (first position) is '0', meaning only a point interior intersection. This should be a '1' for line, like GEOS/Shapely has it. The expected intersection matrix should be: |
|
What's the GEOS version? |
|
The behaviour is consistent with Shapely versions 1.2.14 to the latest, which have shapely.geos.geos_capi_version (1, 6, 2) to (1, 7, 1) (I'm not sure how to squeeze the GEOS version out of Shapely, only the C API version). Also tested this case with POSTGIS="2.0.0 r9605" / GEOS="3.3.3-CAPI-1.7.4" with same results: returns |
|
Do you mean PostGIS has the same results as JTS, or same results as Shapely? If the latter, we should forward this on to the GEOS tracker (I'm subscribed to that too). |
|
All tested versions of JTS, PostGIS and Shapely have the same results for "Contains". I recall Shapely and PostGIS have the same DE-9IM, thus this suggests issues with GEOS. This issue has been passed to GEOS http://trac.osgeo.org/geos/ticket/572 |
add more ignores
|
FYI, this issue has been filed further upstream with JTS: locationtech/jts#396 |
Add voronoi and delaunay functions
|
This is now fixed by libgeos/geos#937 |
Hi All,
For:
from shapely.geometry import LineString
good1 = LineString([(0,2),(0,0),(2,2)])
good2 = LineString([(2,0),(0,2),(0,0),(2,2)])
broken = LineString([(1,0),(0,2),(0,0),(2,2)])
contained = LineString([(0,0),(2,2)])
print good1.contains(contained), good2.contains(contained), broken.contains(contained)
I get:
True True False
where I would expect:
True True True
I am running: Shapely-1.2.14-py2.6.
Am I overlooking something?
Thanks for your help,
Julia
The text was updated successfully, but these errors were encountered: