Hi Redoute, Real generators would be a nice feature. Would you please add it to https://github.com/Toblerity/rtree/issues? I'm not sure when I'd be free to tackle it or if I have any C++ skills left, but I don't want to lose track of the idea.
On Sun, Oct 28, 2012 at 11:47 AM, Redoute <[email protected]> wrote: > Thank you, Howard, for giving some background. "Going deep" here is > beyond my skills, I think. > > I now use a simple wrapper function/generator as workaround. It queries > the index with num_results set to powers of ten. Works for me so far: > > def nearestObjects(ix, coord, lenIx): > n1 = min(lenIx, 10) > n2 = 0 > while n1 > n2: > buffer = ix.nearest(coord, n1, objects=True) > for i in xrange(n2): buffer.next() > for x in buffer: yield x > n2 = n1 > n1 = min(lenIx, 10 * n1) > > Redoute > _______________________________________________ > Community mailing list > [email protected] > http://lists.gispython.org/mailman/listinfo/community -- Sean Gillies _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
