Hi Mateusz. At now I do the following: for g in self._selectionGeometries: for i in range(self._centroids.GetGeometryCount()): p = self._centroids.GetGeometryRef(i) if p.Intersect(p): indexes.append(i)
which is not the faster code on the earth! But it's faster then asserting Contains or Within, at least from my test. How would you use them to extract points from the two geometries, without iteration? 2009/5/6 Mateusz Loskot <mate...@loskot.net>: > 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 > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev