Darius
Darius

Reputation: 5259

Efficient way to represent locations, and query based on proximity?

I'm pondering over how to efficiently represent locations in a database, such that given an arbitrary new location, I can efficiently query the database for candidate locations that are within an acceptable proximity threshold to the subject.

Similar things have been asked before, but I haven't found a discussion based on my criteria for the problem domain.

Things to bear in mind:

A couple of first thoughts:

Some optimization ideas to reduce possible candidates quickly:

I'm hoping the answer isn't just raw CPU power, and that there are some approaches I haven't thought of that could help me out?

Thank you

ps. Apologies if I've missed previously asked questions with helpful answers, please let me know below.

Upvotes: 0

Views: 374

Answers (1)

xbob.ym
xbob.ym

Reputation: 521

What about using GeoHash? (refer to http://en.wikipedia.org/wiki/Geohash)

Upvotes: 1

Related Questions