Silvio Heuberger | b95c583 | 2008-12-29 15:59:17 +0100 | [diff] [blame] | 1 | java code for geohashes |
Silvio Heuberger | 86a8e9f | 2010-04-06 10:46:49 +0200 | [diff] [blame] | 2 | ======================= |
Silvio Heuberger | b95c583 | 2008-12-29 15:59:17 +0100 | [diff] [blame] | 3 | |
Silvio Heuberger | e7f555d | 2010-03-29 10:30:10 +0200 | [diff] [blame] | 4 | An implementation of Geohashes in pure Java. |
| 5 | The produced hashes, when using character precision (multiples of 5 bits) are compatible |
| 6 | to the reference implementation geohash.org. |
Silvio Heuberger | b95c583 | 2008-12-29 15:59:17 +0100 | [diff] [blame] | 7 | |
Silvio Heuberger | 9dd0da7 | 2010-04-06 09:36:28 +0200 | [diff] [blame] | 8 | You can however also encode Geohashes down to the full available precision of a long i.e. 64 bits. |
| 9 | |
Silvio Heuberger | b95c583 | 2008-12-29 15:59:17 +0100 | [diff] [blame] | 10 | |
Silvio Heuberger | 86a8e9f | 2010-04-06 10:46:49 +0200 | [diff] [blame] | 11 | Building/Testing the code |
| 12 | ------------------------- |
| 13 | |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 14 | The geohash-java code can be built using Apache Ant or Apache Maven. |
| 15 | Ant targets that are available: |
Silvio Heuberger | 86a8e9f | 2010-04-06 10:46:49 +0200 | [diff] [blame] | 16 | |
Silvio Heuberger | 203675f | 2011-01-11 09:12:37 +0100 | [diff] [blame] | 17 | - clean # wash dishes. |
| 18 | - compile # compile the main source code. |
| 19 | - test # (default) run the unit tests. |
| 20 | - jar # pack a jar archive with the compiled class files. |
| 21 | - zip # pack a zip archive with the compiled binaries, source code and all other files. |
Silvio Heuberger | 86a8e9f | 2010-04-06 10:46:49 +0200 | [diff] [blame] | 22 | |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 23 | Maven targets are the usual suspects. |
| 24 | |
| 25 | - compile |
| 26 | - test |
Silvio Heuberger | 203675f | 2011-01-11 09:12:37 +0100 | [diff] [blame] | 27 | - package # pack a versioned jar containing the compiled class files |
Silvio Heuberger | 86a8e9f | 2010-04-06 10:46:49 +0200 | [diff] [blame] | 28 | |
Silvio Heuberger | e7f555d | 2010-03-29 10:30:10 +0200 | [diff] [blame] | 29 | TODO |
| 30 | ---- |
| 31 | |
| 32 | Current development involves getting the following things to run: |
| 33 | |
| 34 | - a method to find the n closest hashes to any given point. |
Silvio Heuberger | e7f555d | 2010-03-29 10:30:10 +0200 | [diff] [blame] | 35 | |
| 36 | |
| 37 | Last important changes |
| 38 | ---------------------- |
| 39 | |
Silvio Heuberger | 7f6afab | 2013-08-23 14:46:36 +0200 | [diff] [blame] | 40 | Version 1.0.8 |
| 41 | ------------- |
| 42 | |
| 43 | - Changed the code in VincentyGeodesy not to stumble over the fact that NaN == NaN will always return false |
| 44 | |
Silvio Heuberger | e72e34c | 2011-07-18 10:58:55 +0200 | [diff] [blame] | 45 | Version 1.0.6 |
| 46 | ------------- |
| 47 | |
| 48 | - Added a small fix that keeps VincentyGeodesy#moveInDirection() from returning wrong values when moving large distances. [submitted by André Kischkel] |
| 49 | |
Silvio Heuberger | d1f443e | 2011-03-15 16:30:01 +0100 | [diff] [blame] | 50 | Version 1.0.5 |
| 51 | ------------- |
| 52 | |
| 53 | - Added next(), next(step) and prev() methods to Geohash. |
| 54 | - Added fromBase32() and toBase32() to TwoGeoHashBoundingBox. |
| 55 | - Cleaned up the entire source tree using clearly defined settings. |
| 56 | |
Silvio Heuberger | 41a5c57 | 2011-01-11 23:24:27 +0100 | [diff] [blame] | 57 | Version 1.0.4 |
| 58 | ------------- |
| 59 | |
| 60 | - Added/fixed the methods toBinaryString() and Geohash.fromBinaryString() that can encode and decode a geohash into a simple String of 0s and 1s. |
| 61 | - Also added test code for those methods. |
| 62 | |
Silvio Heuberger | a3452b4 | 2011-01-11 15:53:52 +0100 | [diff] [blame] | 63 | Version 1.0.3 |
| 64 | ------------- |
| 65 | |
| 66 | - Classes containing data are now Serializable. |
| 67 | |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 68 | Version 1.0.2 |
| 69 | ------------- |
| 70 | |
| 71 | - Merged Kevins [ktcorby] code that yields all the geohashes in a bounding box, at a given resolution. |
Silvio Heuberger | 203675f | 2011-01-11 09:12:37 +0100 | [diff] [blame] | 72 | - Merged Chris' [cchandler] code to encode and decode geohashes from a binary string. |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 73 | |
| 74 | Version 1.0.1 |
| 75 | ------------- |
| 76 | |
| 77 | - Fixed issue #2 from Github: |
Silvio Heuberger | e7f555d | 2010-03-29 10:30:10 +0200 | [diff] [blame] | 78 | - Neighbouring hashes can be calculated by using the getAdjacent() method, which yields a hashes 8 neighbors. |
| 79 | - northern, eastern, western and southern neighbours can be determined using the respective methods. |
| 80 | |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 81 | - Fixed issue #1 from Github: |
Silvio Heuberger | 9dd0da7 | 2010-04-06 09:36:28 +0200 | [diff] [blame] | 82 | - A bug caused different hashes to be yielded sometimes. |
| 83 | |
| 84 | |
| 85 | License |
| 86 | ------- |
| 87 | |
| 88 | This code has been placed under the LGPL. See the LICENSE file for more information. |
| 89 | Please contribute improvements and bug fixes back via github. |