[gdal-dev] best method to check points in polygon?

Mateusz Loskot mateusz at loskot.net
Wed May 6 12:41:37 EDT 2009


G. Allegri wrote:
> I need to check "points in polygon" over various thousands of points
> and regional scale polygons. A for loop iteration + intersect() over
> the points geometries is absolutely inefficient.

What you you need is OGRGeometry::Within or OGRGeometry::Contains,
not intersect.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the gdal-dev mailing list