GeohashReferenceSystem.
Note that axis order of encode(double, double) method differs.@Deprecated public class GeoHashCoder extends Object implements Serializable
Defined in the sis-storage module
| Modifier and Type | Class and Description |
|---|---|
static class |
GeoHashCoder.Format
Deprecated.
Moved to
GeohashReferenceSystem.Format. |
| Constructor and Description |
|---|
GeoHashCoder()
Deprecated.
Creates a new geohash coder/decoder initialized to the default precision for
GeoHashCoder.Format.BASE32. |
| Modifier and Type | Method and Description |
|---|---|
DirectPosition |
decode(String geohash)
Deprecated.
Decodes the given geohash into a longitude and a latitude.
|
String |
encode(DirectPosition position)
Deprecated.
Encodes the given position into a geohash.
|
String |
encode(double longitude,
double latitude)
Deprecated.
Encodes the given longitude and latitude into a geohash.
|
GeoHashCoder.Format |
getFormat()
Deprecated.
Returns the current encoding/decoding format.
|
int |
getPrecision()
Deprecated.
Returns the length of geohashes strings to be encoded by the
encode(DirectPosition) method. |
void |
setFormat(GeoHashCoder.Format format)
Deprecated.
Sets the encoding/decoding format.
|
void |
setPrecision(int precision)
Deprecated.
Sets the length of geohashes strings to be encoded by the
encode(DirectPosition) method. |
public GeoHashCoder()
GeoHashCoder.Format.BASE32.public GeoHashCoder.Format getFormat()
GeoHashCoder.Format.BASE32.public void setFormat(GeoHashCoder.Format format)
format - the new format.public int getPrecision()
encode(DirectPosition) method.
The default value is 12.public void setPrecision(int precision)
encode(DirectPosition) method.precision - the new length of geohashes strings.public String encode(double longitude, double latitude)
longitude - longitude to encode, as decimal degrees in the [-180 … 180]° range.latitude - latitude to encode, as decimal degrees in the [-90 … 90]° range.public String encode(DirectPosition position)
encode(double, double).
The current implementation does not verify the Coordinate Reference System of the given position. However this may change in future SIS versions.
position - the coordinate to encode.public DirectPosition decode(String geohash) throws ParseException
geohash - geohash string to decode.ParseException - if an error occurred while parsing the given string.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.