A GeoHash module. This is a port of node-geohash (https://github.com/sunng87/node-geohash).
| Modifiers | Name | Description |
|---|---|---|
static enum |
GeoHash.Direction |
A Direction enum used when calculating neighbors |
| Constructor and description |
|---|
GeoHash
()Create a new GeoHash |
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.util.List<java.lang.String> |
bboxes(Bounds bounds)Calculate all of the hash strings in a Bounds |
|
java.util.List<java.lang.String> |
bboxes(Bounds bounds, int numberOfChars)Calculate all of the hash strings in a Bounds |
|
java.util.List<java.lang.Long> |
bboxesLong(Bounds bounds)Calculate all of the hash longs in a Bounds |
|
java.util.List<java.lang.Long> |
bboxesLong(Bounds bounds, int bitDepth)Calculate all of the hash longs in a Bounds |
|
Point |
decode(java.lang.String hashString)Decode a Point from the hash string |
|
Point |
decode(long hashLong)Decode a Point from a hash long |
|
Bounds |
decodeBounds(java.lang.String hashString)Decode a Bounds from a hash string |
|
Bounds |
decodeBounds(long hashLong)Decode a Bounds from a hash long using 52 as the bit depth |
|
Bounds |
decodeBounds(long hashLong, int bitDepth)Decode a Bounds from as hash long |
|
java.lang.String |
encode(Point pt)Encode a Point as a hash string that is 9 characters long |
|
java.lang.String |
encode(Point pt, boolean autoEncode)Encode a Point as a hash string |
|
java.lang.String |
encode(Point pt, int numberOfChars)Encode a Point as a hash string |
|
long |
encodeLong(Point pt)Encode a Point as a hash long using 52 as the bit depth |
|
long |
encodeLong(Point pt, int bitDepth)Encode a Point as a hash long |
|
java.lang.String |
neighbor(java.lang.String hashString, GeoHash.Direction direction)Calculate the neighbor of a hash string for the given direction |
|
java.lang.String |
neighbor(java.lang.String hashString, GeoHash.Direction direction, int numberOfChars)Calculate the neighbor of a hash string for the given direction |
|
java.lang.String |
neighbor(java.lang.String hashString, int lonStep, int latStep, int numberOfChars)Calculate the neighbor of a hash string with a number of steps in the latitude and longitude directions. |
|
long |
neighbor(long hashLong, GeoHash.Direction direction)Calculate the neighbor of a hash long in the given Direction |
|
long |
neighbor(long hashLong, GeoHash.Direction direction, int bitDepth)Calculate the neighbor of a hash long in the given Direction |
|
long |
neighbor(long hashLong, int lonStep, int latStep, int bitDepth)Calculate the neighbor of a hash long with a number of steps in the latitude and longitude directions. |
|
java.util.Map<Direction, java.lang.String> |
neighbors(java.lang.String hashString)Calculate all of the surrounding neighbors of the given hash string |
|
java.util.Map<Direction, java.lang.String> |
neighbors(java.lang.String hashString, int numberOfChar)Calculate all of the surrounding neighbors of the given hash string |
|
java.util.Map<Direction, java.lang.Long> |
neighbors(long hashLong)Calculate all of the surrounding neighbors of the given hash long |
|
java.util.Map<Direction, java.lang.Long> |
neighbors(long hashLong, int bitDepth)Calculate all of the surrounding neighbors of the given hash long |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Calculate all of the hash strings in a Bounds
bounds - The BoundsCalculate all of the hash strings in a Bounds
bounds - The BoundsnumberOfChars - The number of characters to use while encodingCalculate all of the hash longs in a Bounds
bounds - The BoundsCalculate all of the hash longs in a Bounds
bounds - The BoundsDecode a Point from the hash string
hashString - The hash stringDecode a Point from a hash long
hashLong - The hash longDecode a Bounds from a hash string
hashString - The hash stringDecode a Bounds from a hash long using 52 as the bit depth
hashLong - The hash longDecode a Bounds from as hash long
hashLong - The hash longbitDepth - The bit depthEncode a Point as a hash string that is 9 characters long
pt - The PointEncode a Point as a hash string
pt - The PointautoEncode - Whether to auto encode or not. If false, encode using 9 characters, else calculate
the number of characters.Encode a Point as a hash string
pt - The PointnumberOfChars - The number of charactersEncode a Point as a hash long using 52 as the bit depth
pt - The PointEncode a Point as a hash long
pt - The PointbitDepth - The bit depthCalculate the neighbor of a hash string for the given direction
hashString - The hash stringdirection - The DirectionCalculate the neighbor of a hash string for the given direction
hashString - The hash stringdirection - The DirectionnumberOfChars - The number of characters to use while encodingCalculate the neighbor of a hash string with a number of steps in the latitude and longitude directions.
hashString - The hash stringlonStep - The number of steps along the longitude axislatStep - The number of steps along the latitude axisnumberOfChars - The number of characters to use while encodingCalculate the neighbor of a hash long in the given Direction
hashLong - The hash longdirection - The DirectionCalculate the neighbor of a hash long in the given Direction
hashLong - The hash longdirection - The DirectionbitDepth - The bit depth to use while encodingCalculate the neighbor of a hash long with a number of steps in the latitude and longitude directions.
hashLong - The hash longlonStep - The number of steps along the longitude axislatStep - The number of steps along the latitude axisbitDepth - The bit depth to use while encodingCalculate all of the surrounding neighbors of the given hash string
hashString - The hash stringCalculate all of the surrounding neighbors of the given hash string
hashString - The hash stringnumberOfChar - The number of characters to use while encodingCalculate all of the surrounding neighbors of the given hash long
hashLong - The hash longCalculate all of the surrounding neighbors of the given hash long
hashLong - The hash longbitDepth - The bit depth to use while encoding