Package org.elasticsearch.common.geo
Class GeoPoint
- java.lang.Object
-
- org.elasticsearch.common.geo.GeoPoint
-
- All Implemented Interfaces:
ToXContent,ToXContentFragment
public final class GeoPoint extends Object implements ToXContentFragment
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doubleassertZValue(boolean ignoreZValue, double zValue)booleanequals(Object o)static GeoPointfromGeohash(long geohashLong)static GeoPointfromGeohash(String geohash)Stringgeohash()StringgetGeohash()doublegetLat()doublegetLon()inthashCode()doublelat()doublelon()GeoPointreset(double lat, double lon)GeoPointresetFromCoordinates(String value, boolean ignoreZValue)GeoPointresetFromGeoHash(long geohashLong)GeoPointresetFromGeoHash(String geohash)GeoPointresetFromIndexableField(IndexableField field)GeoPointresetFromIndexHash(long hash)GeoPointresetFromString(String value)GeoPointresetFromString(String value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint)GeoPointresetLat(double lat)GeoPointresetLon(double lon)StringtoString()XContentBuildertoXContent(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.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
GeoPoint
public GeoPoint()
-
GeoPoint
public GeoPoint(String value)
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
public GeoPoint(GeoPoint template)
-
-
Method Detail
-
reset
public GeoPoint reset(double lat, double lon)
-
resetLat
public GeoPoint resetLat(double lat)
-
resetLon
public GeoPoint resetLon(double lon)
-
resetFromString
public GeoPoint resetFromString(String value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint)
-
resetFromIndexHash
public GeoPoint resetFromIndexHash(long hash)
-
resetFromIndexableField
public GeoPoint resetFromIndexableField(IndexableField field)
-
resetFromGeoHash
public GeoPoint resetFromGeoHash(long geohashLong)
-
lat
public double lat()
-
getLat
public double getLat()
-
lon
public double lon()
-
getLon
public double getLon()
-
geohash
public String geohash()
-
getGeohash
public String getGeohash()
-
fromGeohash
public static GeoPoint fromGeohash(long geohashLong)
-
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)
-
-