java.lang.Object
org.elasticsearch.common.geo.GeoPoint
- All Implemented Interfaces:
ToXContent
,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
assertZValue
(boolean ignoreZValue, double zValue) boolean
static GeoPoint
fromGeohash
(long geohashLong) static GeoPoint
fromGeohash
(String geohash) geohash()
long
Return the point in Lucene encoded format used to stored points as doc valuesdouble
getLat()
double
getLon()
int
hashCode()
double
lat()
double
lon()
reset
(double lat, double lon) resetFromCoordinates
(String value, boolean ignoreZValue) resetFromEncoded
(long encoded) reset the point using Lucene encoded format used to stored points as doc valuesresetFromGeoHash
(long geohashLong) resetFromGeoHash
(String geohash) resetFromIndexableField
(org.apache.lucene.index.IndexableField field) resetFromIndexHash
(long hash) resetFromString
(String value) resetFromString
(String value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint) resetLat
(double lat) resetLon
(double lon) toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
lat
protected double lat -
lon
protected double lon
-
-
Constructor Details
-
GeoPoint
public GeoPoint() -
GeoPoint
Create a new Geopoint from a string. This String must either be a geohash or a lat-lon tuple.- Parameters:
value
- String to create the point from
-
GeoPoint
public GeoPoint(double lat, double lon) -
GeoPoint
-
-
Method Details
-
reset
-
resetLat
-
resetLon
-
resetFromString
-
resetFromString
public GeoPoint resetFromString(String value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint) -
resetFromCoordinates
-
resetFromIndexHash
-
resetFromIndexableField
-
resetFromGeoHash
-
resetFromGeoHash
-
lat
public double lat() -
getLat
public double getLat() -
lon
public double lon() -
getLon
public double getLon() -
geohash
-
getGeohash
-
getEncoded
public long getEncoded()Return the point in Lucene encoded format used to stored points as doc values -
resetFromEncoded
reset the point using Lucene encoded format used to stored points as doc values -
equals
-
hashCode
public int hashCode() -
toString
-
fromGeohash
-
fromGeohash
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
assertZValue
public static double assertZValue(boolean ignoreZValue, double zValue)
-