Isn't a problem like this usually solved with a two-pass method. The first pass uses the spatial index to eliminate all of the features that could not possibly intersect/touch/etc. And then in the second pass, an actual (more expensive) spatial overlay operation is performed on those candidates to determine their true spatial relationships.
David. On Thu, Oct 28, 2010 at 10:29 AM, Giuseppe Sucameli <sucam...@faunalia.it> wrote: > Hi Stefan, > > On Thu, Oct 28, 2010 at 7:48 AM, Ziegler Stefan <stefan.zieg...@bd.so.ch> > wrote: >> >> thanks for looking into this. Do you think it's worth filling out a bug >> report since the nearestNeighbor method does not the keep the promise or is >> this the normal behaviour of a spatial index based method? > > I think we should fill a bug report because the nearestNeighbor doesn't work > as > expected. > I don't know if the QgsSpatialIndex can be improved to manage complex > geometries, > but AFAICS in the few inline comments within the code, in this moment it > manages only > Points, Lines and Regions (rectangles), so every polygonal geometry must be > converted to Regions. > > This issue could take a lot of time to be fixed, but we can use the ticket > to require > the documentation about the QgsSpatialIndex class. In this moment it's > missing. > > Cheers. > >> _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user