geo-index icon indicating copy to clipboard operation
geo-index copied to clipboard

Python: vectorized search (many queries in one go)

Open kylebarron opened this issue 11 months ago • 2 comments

kylebarron avatar Dec 30 '24 01:12 kylebarron

First of all, thanks for creating geo-index! It's so much faster than rtree! Indexing 100k rectangles alone is an order of magnitude faster 🚀

I'm curious if you have a sense how complicated is would be to implement vectorized search? I'd be happy to help. Not sure if you're aiming for it but I found rtree's intersection_v() return type to be elegant (a continuous array if intersecting indices plus an array of counts to figure out which index is associated to which bounding box)

flekschas avatar Apr 17 '25 17:04 flekschas

I don't think it would be particularly complex; the Rust side would be just a for loop.

The only slightly complex part would be designing the right user-facing API. Presumably the result would be an Arrow ListArray, because there'll be a different number of results for each input

kylebarron avatar Apr 17 '25 17:04 kylebarron