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 | |
| 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. |
| 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 |
| 27 | - package |
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 | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 40 | Version 1.0.2 |
| 41 | ------------- |
| 42 | |
| 43 | - Merged Kevins [ktcorby] code that yields all the geohashes in a bounding box, at a given resolution. |
| 44 | - Merged Chris' [cchandler] code to encode and decode geohashes from a binary string. |
| 45 | |
| 46 | Version 1.0.1 |
| 47 | ------------- |
| 48 | |
| 49 | - Fixed issue #2 from Github: |
Silvio Heuberger | e7f555d | 2010-03-29 10:30:10 +0200 | [diff] [blame] | 50 | - Neighbouring hashes can be calculated by using the getAdjacent() method, which yields a hashes 8 neighbors. |
| 51 | - northern, eastern, western and southern neighbours can be determined using the respective methods. |
| 52 | |
Silvio Heuberger | 890565f | 2011-01-08 11:28:44 +0100 | [diff] [blame] | 53 | - Fixed issue #1 from Github: |
Silvio Heuberger | 9dd0da7 | 2010-04-06 09:36:28 +0200 | [diff] [blame] | 54 | - A bug caused different hashes to be yielded sometimes. |
| 55 | |
| 56 | |
| 57 | License |
| 58 | ------- |
| 59 | |
| 60 | This code has been placed under the LGPL. See the LICENSE file for more information. |
| 61 | Please contribute improvements and bug fixes back via github. |