[SciPy-user] efficient "inside polygon" test for an array??

Tim Michelsen timmichelsen@gmx-topmail...
Mon Feb 4 18:23:01 CST 2008


Pierre GM schrieb:
> On Monday 04 February 2008 10:56:45 Eric Emsellem wrote:
>> I have a polygon (defined by 4 vertices) and I wish to have an efficient
>> way of selecting the points which are inside this polygon.
> 
> Eric,
> It might be overkill, but have you considered gdal (http://gdal.org/) ? It is 
> a very useful tool to manipulate geometries. In particular, it has functions 
> to compute the intersection between polygons.
You may also want to take a look at:
Shapely 1.0 - Geospatial geometries, predicates, and operations
http://pypi.python.org/pypi/Shapely


If you need more GIS and Geo related tools look at:
the Python category at FreeGIS:
http://freegis.org/database/?cat=21

Kind regards,
Timmie



More information about the SciPy-user mailing list