Package org.elasticsearch.common.geo
Class GeoPoint
java.lang.Object
org.elasticsearch.common.geo.GeoPoint
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentFragment
public class GeoPoint
extends Object
implements org.elasticsearch.common.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
FieldsFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleassertZValue(boolean ignoreZValue, double zValue)booleanstatic GeoPointfromGeohash(long geohashLong)static GeoPointfromGeohash(String geohash)geohash()doublegetLat()doublegetLon()inthashCode()doublelat()doublelon()reset(double lat, double lon)resetFromCoordinates(String value, boolean ignoreZValue)resetFromGeoHash(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()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.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
-
equals
-
hashCode
public int hashCode() -
toString
-
fromGeohash
-
fromGeohash
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
assertZValue
public static double assertZValue(boolean ignoreZValue, double zValue)
-