[geos-devel] Strange intersection results in Windows

Laura Marshall lhm at st-andrews.ac.uk
Thu Sep 9 03:09:14 PDT 2021

Dear list,

I use GEOS 3.9.0 via an R library (sf). I have been trying to find the intersection between groups of lines and a polygon / multipolygon.

I have realised that updating the packages on my machine has resulted in some strange intersection results on Windows machines (and only Windows - works on mac and ubuntu). The sf update which introduced the issue was also associated with a change in GEOS versions, upgrading from 3.8.0 to 3.9.0 and the suspicion is that it is something in GEOS rather than the sf R library.

I have searched the tickets but could not see any issues which seem to match what I am seeing.

I attach an image below of the results I am getting with the intersection between the lines and the polygon on my Windows machine. Red lines are the lines which were not considered part of the intersection and the thicker green lines are what was identified as the intersection between the grid of line segments and the polygon. It seems all lines that intersect the polygon boundary are correctly identified but only some lines that are entirely within the polygon boundary are included in the intersection.
I had initially reported this as an issue in sf and there are more examples there: https://github.com/r-spatial/sf/issues/1781

Question 1: Is this a known issue with 3.9.0?

Question 2: Is there an easy way to directly install 3.9.1 on to a Windows machine to test the behaviour with the latest version?

Many thanks for your help,


Dr. L Marshall

Centre for Research into Ecological & Environmental Modelling

University of St. Andrews

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20210909/22c205fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 67355 bytes
Desc: image.png
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20210909/22c205fb/attachment-0001.png>

More information about the geos-devel mailing list