Skip to content

Comment on Show HN: An API to encode and decode coordinates using Geohashparent

Comments

There are some algorithms that are trivial to implement with Geohashes that are non-trivial with lat-long coordinates. For example, given a set of n points find the k nearest neighbors. To do this with geohash you maintain an ordered list of geohashes, and find k points adjacent in the list. Doing this efficiently with lat-long requires some relatively exotic data structures like an R-tree or k-d-tree.

That is a lossy, incorrect algorithm. Sorry, there is not a continuous mapping from one dimension that covers two dimensions.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.