| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An implementation of Geohashes in pure Java. The produced hashes, when using character precision (multiples of 5 bits) are compatible to the reference implementation geohash.org.
You can however also encode Geohashes down to the full available precision of a long i.e. 64 bits.
As of today, new releases are made available via maven Central. Thus you can use the artifacts in various build systems like maven, ivy, gradle, sbt and many more.
Find the current versions here:
http://search.maven.org/#search|ga|1|g%3A%22ch.hsr%22%20AND%20a%3A%22geohash%22
The geohash-java code can be built using Apache Maven.
Maven targets are the usual suspects.
- clean - compile - test - package # pack a versioned jar containing the compiled class files
| geohash length | lat bits | lng bits | lat error | lng error | ~km error |
|---|---|---|---|---|---|
| 1 | 2 | 3 | ±23 | ±23 | ±2500 |
| 2 | 5 | 5 | ±2.8 | ±5.6 | ±630 |
| 3 | 7 | 8 | ±0.70 | ±0.70 | ±78 |
| 4 | 10 | 10 | ±0.087 | ±0.18 | ±20 |
| 5 | 12 | 13 | ±0.022 | ±0.022 | ±2.4 |
| 6 | 15 | 15 | ±0.0027 | ±0.0055 | ±0.61 |
| 7 | 17 | 18 | ±0.00068 | ±0.00068 | ±0.076 |
| 8 | 20 | 20 | ±0.000085 | ±0.00017 | ±0.019 |
This branch ditches 1.6 compatibility. If you need that look at the release-1.0 branch and artifacts in maven central. I will backport important bugfixes to the release-1.0 branch.
Current development involves getting the following things to run:
This version adds support to expand BoundingBox to include another Wgs84Point. It also merges a bunch of fixes in bounding box iterators.
This version adds support for BoundingBoxes to go over the 180 meridian, which enables searching and querying by covering them with Geohashes. This was a much requested feature that made it into the library now, but depending on how you construct BoundingBoxes and how you use the library, this is a breaking change.
In this version you need to provide latitude and longitude to BoundingBox in a specific order for this wo work:
new BoundingBox(south, north, west, east);This breaking change enables creating bounding boxes that go over the 180 meridian which can then be used in coverage queries.
This version also changes the toString() implementation of GeoHash to always include leading zeroes, so if your code actually relies on that, you will also need to change things downstream that potentially use a prefix query for matching points in a GeoHashs BoundingBox.
Fo now, we will continue to backport other fixes to the 1.3.x branch, so you can keep on using that version as well.
This version switches the license over to Apache Software License 2.0
Important fix 398d048b66e8cff1e5df8aa1a4bdc4c37ca70070 ord() would return negative longs, which is plain wrong.
Thanks to Graham Dennis and aborochoff for pointing it out.
Also: Raise source level to 1.7.
Merge this fix https://github.com/0mok/geohash-java/commit/12550a392ea974cf75c81fce2bd21fe1535715a1 It causes compareTo() of geohashes to behave similarly as comaring their base32 encoded strings
toBase32() now throws an exception if the hash precision is not a multiple of 5.
Finally realeased to maven central.
Fixed issue #2 from Github:
Fixed issue #1 from Github:
This code has been placed under the Apache License 2.0. See the LICENSE file for more information. Please contribute improvements and bug fixes back via github.
| Back | FazBrowse Home | New Git URL |