java.lang.Object
org.elasticsearch.common.geo.GeoPoint
- All Implemented Interfaces:
Comparable<SpatialPoint>,SpatialPoint,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, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleassertZValue(boolean ignoreZValue, double zValue) booleanstatic GeoPointfromGeohash(long geohashLong) static GeoPointfromGeohash(String geohash) geohash()longReturn the point in Lucene encoded format used to stored points as doc valuesdoublegetLat()doublegetLon()doublegetX()doublegetY()inthashCode()doublelat()doublelon()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) 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, waitMethods inherited from interface org.elasticsearch.common.geo.SpatialPoint
compareTo, toWKTMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
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
-
resetFromGeoHash
-
resetFromGeoHash
-
lat
public double lat() -
getLat
public double getLat() -
lon
public double lon() -
getLon
public double getLon() -
getX
public double getX()- Specified by:
getXin interfaceSpatialPoint
-
getY
public double getY()- Specified by:
getYin interfaceSpatialPoint
-
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:
toXContentin interfaceToXContent- Throws:
IOException
-
assertZValue
public static double assertZValue(boolean ignoreZValue, double zValue)
-