Polygon Intersection with Line | Python Shapely
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Track title: CC I Beethoven Sonata No 31 in A Flat M
--
Chapters
00:00 Question
02:54 Accepted answer (Score 4)
03:47 Thank you
--
Full question
https://stackoverflow.com/questions/1444...
Accepted answer links:
[deep inside this C++ library]: http://svn.osgeo.org/geos/trunk/src/prec.../
http://lists.gispython.org/pipermail/com...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #line #polygon #intersection #shapely
#avk47
--
Track title: CC I Beethoven Sonata No 31 in A Flat M
--
Chapters
00:00 Question
02:54 Accepted answer (Score 4)
03:47 Thank you
--
Full question
https://stackoverflow.com/questions/1444...
Accepted answer links:
[deep inside this C++ library]: http://svn.osgeo.org/geos/trunk/src/prec.../
http://lists.gispython.org/pipermail/com...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #line #polygon #intersection #shapely
#avk47
ACCEPTED ANSWER
Score 5
Shapely is built on top of a C wrapper around the C++ GEOS library. Somewhere deep inside this C++ library sit the Precision classes which handle roundoff errors. I think we may conclude that your version of Shapely, and the geos libraries, handle this case differently. Unfortunately the code that accesses the precision model is not available in the C api, and therefore neither in Shapely. See http://lists.gispython.org/pipermail/community/2011-February/002898.html
Changing to a higher version of geos might solve your issue, though. It works fine on my machine with shapely 1.2.16 and libgeos 3.3.5-CAPI-1.7.5.