kungfoo / geohash-java

Implementation of GeoHashes in java. We try to be/stay compliant to the spec, as far as possible.
Other
982 stars 310 forks source link

Neighbouring NESW GeoHashes #2

Closed markharwood closed 14 years ago

markharwood commented 14 years ago

Would be useful to make "getNorthern/Southern..." methods public BUT unlike other forms of object construction GeoHash neighbour objects aren't initialized with boundingBox pre-calculated so get null for calls to getBoundingBoxPoints()

kungfoo commented 14 years ago

I added code to get all the 8 neighbours of a hash.

markharwood commented 14 years ago

Great stuff. Thanks for this and the geohash.org compatibility fix!

kungfoo commented 14 years ago

I mark this as fixed, as the getAdjacent() method allows you to get all 8 neighbouring hashes. One could argue, that the methods to get a single one should public, i.e. getNorthenNeighbour()

I also added code that ensures that Hashes acquired using the neighbouring-methods have their bounding box values set up properly.