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

toBinaryString() does not always work. #7

Closed kungfoo closed 13 years ago

kungfoo commented 13 years ago

While creating a unit test for toBinaryString() and fromBinaryString() I just found, that the current implementation of toBinaryString() does not work in some corner cases. For instance:

The Geohash:

(-89.9945068359375,-180.0) -> (-90.0,-179.989013671875) -> 000000

causes it to throw an StringIndexOutOfBoundsException.

I will have to reimplement toBinaryString().

kungfoo commented 13 years ago

This has been fixed in 1.0.4.