G. Allegri wrote: > 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): -------------------------^^^^^^^^^^^^^^^^^
p in same 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. Intersect is a different predicate (answers different question) than Contains and Within. I don't understand from the code above what's your goal. Perhaps "which is faster" is just a wrong question. > How would you use them to extract points from the two geometries, > without iteration? Extract? They are predicates. Meaning, all these functions give binary answer (true or false) about relation between two geometries. See samples here: http://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_geos.py Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
