[geos-devel] finding intersection of LineString and large list of Polygon's

TazMainiac TazMainiac at gmail.com
Tue Feb 28 07:30:09 PST 2017


Hi,

  I'm not sure if this is the right mailing list for this or not - let me
know if I should post somewhere else.

  I'm using GEOS (3.5.0) via the Django (1.6.7) Python wrappers.  Under
Cygwin currently but will be on Linux later.

  I have a large list (1000's) of Polygons some of which overlap.  What is
the most efficient way to find which polygons in the list intersect with a
LineString?

  I would have thought that turning the list of Polygon's into a
MultiPolygon, then calling MultiPolygon.intersection with the line segment
would give me the polygon that the line segment intersected on.  This does
work, but it just returns the line segment itself.  I'm trying to go the
other way.

  I was hoping for a faster mechanism than just iterating over the original
polygon list and calling intersect's on each.

  I'm new to GEOS so please forgive me if I'm using incorrect terminology.

Thanks,
Taz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20170228/8c68d52a/attachment.html>


More information about the geos-devel mailing list