geohash icon indicating copy to clipboard operation
geohash copied to clipboard

Incorrect geocodes

Open cubitworx opened this issue 6 years ago • 0 comments

This package does not produce correct geohashes. I discovered this by accident when conflicting geohashes were generated for two completely different coordinates.

The following coordinates produce the same geohash:

GeoHash::encode(37.37039206850, 115.37000158600, 0.00000000000001); // uzfxfrurcpzzzxupfrczcpg
GeoHash::encode(37.37039206850, 118.0200207100, 0.00000000000001); // uzfxfrurcpzzzxupfrczcpg

So I proceeded to check these coordinates against http://geohash.co/ & http://geohash.org/ & found that they concurred to a precision of 11 digits; but that the resulting geohashes weren't even close to those generated by this package.

http://geohash.co/ = wwdh971f7cur
http://geohash.org/ = wwdh971f7cux

I subsequently tried several other coordinates & none of them matched those from the above two sites.

I then found the following package which appears to produce the correct results so far https://github.com/laravie/geotools

cubitworx avatar Aug 10 '19 13:08 cubitworx