algorithmgeolocationgisspace-partitioning

anything better than bounding boxes?


I have a scenario, where I have x million longitude latitude points.

When a new long/lat point is added I want to know efficiently which other points are within a user configured distance parameter, so I can add them to a list.

got anything better than bounding boxes?

I would love to see algorithms, references and a few implementations ;) thank you kindly!


Solution

  • There are quite a few options that are better, mostly based around space partitioning.

    A common, and often very good option (which isn't too tough to implement) is to use a KD-Tree. Quadtrees are easier to implement, but slower for searching. Depending on the distribution of your data, and your requirements, other space partitioning algorithms may perform better, have lower memory requirements, or other issues that are related.