proxpero / Geodesy

A Swift implementation of the geohash algorithm.
MIT License
23 stars 10 forks source link

More Helpful docs please #2

Open bbookman opened 6 years ago

bbookman commented 6 years ago

Can you update your documentation with a tiny bit more verbosity? I'd like a few examples in code. Complete code. I don't see exactly how to compare a set of hashes to a hashed single location.

let location: CLLocation = manager.currentLocation
let geohash = location.geohash(precision: 8) // An eight-character geohash of type String
let neighbors = location.neighbors(precision: 8) // An array of nine eight-character strings representing the eight regions surrounding the original region.

I get all that, makes sense. What's next? Iterate through neighbors and check for what ?? Greater than, less than? How does the hashing work here?