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

GeoHash recombineLatLonBitsToHash miss reset class member point? #11

Closed pigsoldierlu closed 11 years ago

pigsoldierlu commented 11 years ago

If one instance of GeoHash invoke getAdjacent, and then invoke getPoint on the element of the array returned from getAdjacent, it will occur null pointer exception. check the code, find all the element in the array returned from "recombineLatLonBitsToHash" this method, I'm not so sure if it miss the reset to the "point" in the instance of GeoHash.

kungfoo commented 11 years ago

I will add a test case to confirm this.

pigsoldierlu commented 11 years ago

@kungfoo Thanks for your time

kungfoo commented 11 years ago

I just pushed a new version that fixes this, by using the center point of the bounding box of the geohash as 'point'.

Also tagged a new version 1.0.7