On Thu, Jun 25, 2020 at 2:55 AM Nyall Dawson <nyall.daw...@gmail.com> wrote:
> Hi list! > > I've a situation where I've got ~millions of lines (each consisting of > a single segment only) which I need to intersect against a complex > polygon. > > Trying the naive way of multiple calls to GEOSIntersection_r gives > predictably horrendous performance. Is there a better way I can > approach this situation using the GEOS c api? > There's an algorithm in PDAL that does this for point-in-polygon, but all the guts are there to do segment intersections. You're welcome to take it and modify to your liking: https://github.com/PDAL/PDAL/tree/master/filters/private/pnp How much better it would from a more brute-force approach depends a lot on the data. -- Andrew Bell andrew.bell...@gmail.com
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel