Skip to main content
4 events
when toggle format what by license comment
Apr 24, 2020 at 17:01 vote accept jbx
May 2, 2019 at 17:57 comment added dr_jts You can use the same approach as in [gis.stackexchange.com/questions/158635] but use a KDtree. As for rebuilding a tree on each query, that is going to be slower than simply iterating over all data items.
May 2, 2019 at 7:59 comment added jbx I do have a function (I had ported it from JS that I found somewhere on a question here) that calculates distance using the earth radius etc. (I think it assumes the Earth is a sphere) so I think that is not a problem. Assuming that is available, can you update your answer with the right steps (just pseudo code) to find the nearest features of interest from a KDTree? Otherwise what if I built the STRtree from scratch from the data I have available each time I have a new query would that be a bad idea? (I have only a few thousand features of interest)
Apr 30, 2019 at 17:32 history answered dr_jts CC BY-SA 4.0