public class GeoHashUtils extends Object
| Constructor and Description |
|---|
GeoHashUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
decode(String geohash)
Decode the given geohash into a latitude and longitude.
|
static double[] |
decodeAndRound(String geohash)
Decodes the given geohash into a latitude and longitude.
|
static String |
encode(double latitude,
double longitude)
Encodes the given latitude and longitude into a geohash code.
|
static String |
getAdjacent(String geohash,
String... directions)
Gets the adjacent from the given directions.
|
static String |
getAdjacent(String geohash,
String direction)
Gets the adjacent from the given direction.
|
static List<String> |
getAllAdjacentAreasList(String geohash)
Gets the all adjacent areas list.
|
static Map<String,String> |
getAllAdjacentAreasMap(String geohash)
Gets the geohash cells around the given geohash cell.
|
static FirstAndSecondRingRegion |
getFirstAndSecondRingRegion(String geohash) |
static FirstRingRegion |
getFirstRingRegion(String geohash)
Gets the geohash cells around the given geohash cell as a GeoHashRegion object.
|
static double |
getLatitude(String geohash)
Gets the latitude from the given geohash value.
|
static double |
getLongitude(String geohash)
Gets the longitude from the given geohash value.
|
static Map<String,String> |
getTwentyFiveAreasMap(String geohash)
Gets the eight cells around the given geohash cell so the first ring inclusive the given
geohash cell and cells from the second ring.
|
static void |
main(String[] args)
The main method.
|
public static double[] decode(String geohash)
geohash - the geohashpublic static double[] decodeAndRound(String geohash)
geohash - the geohashpublic static String encode(double latitude, double longitude)
latitude - the latitudelongitude - the longitudepublic static String getAdjacent(String geohash, String direction)
geohash - the geohashdirection - the directionpublic static String getAdjacent(String geohash, String... directions)
geohash - the geohashdirections - the directionspublic static List<String> getAllAdjacentAreasList(String geohash)
geohash - the geohashpublic static Map<String,String> getAllAdjacentAreasMap(String geohash)
geohash - the geohashpublic static FirstAndSecondRingRegion getFirstAndSecondRingRegion(String geohash)
public static FirstRingRegion getFirstRingRegion(String geohash)
geohash - the geohashpublic static double getLatitude(String geohash)
geohash - the geohashpublic static double getLongitude(String geohash)
geohash - the geohashpublic static Map<String,String> getTwentyFiveAreasMap(String geohash)
geohash - the geohashpublic static void main(String[] args)
args - the argumentsCopyright © 2010–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.