Package org.elasticsearch.common.geo
Class GeoPoint
org.elasticsearch.common.geo.GeoPoint
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public class GeoPoint
extends
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
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
assertZValue(boolean ignoreZValue, double zValue)
boolean
o)
static GeoPoint
fromGeohash(long geohashLong)
static GeoPoint
geohash)
geohash()
double
getLat()
double
getLon()
int
hashCode()
double
lat()
double
lon()
reset(double lat, double lon)
value, boolean ignoreZValue)
resetFromGeoHash(long geohashLong)
geohash)
resetFromIndexableField(org.apache.lucene.index.IndexableField field)
resetFromIndexHash(long hash)
value)
value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint)
resetLat(double lat)
resetLon(double lon)
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Methods inherited from class java.lang.
, , , , , , ,
Methods 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
public GeoPoint( 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
-
-
Method Details
-
reset
-
resetLat
-
resetLon
-
resetFromString
public value) -
resetFromString
public value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint) -
resetFromCoordinates
public value, boolean ignoreZValue) -
resetFromIndexHash
-
resetFromIndexableField
-
resetFromGeoHash
public geohash) -
resetFromGeoHash
-
lat
public double lat() -
getLat
public double getLat() -
lon
public double lon() -
getLon
public double getLon() -
geohash
public geohash() -
getGeohash
public getGeohash() -
equals
public boolean equals( o)- Overrides:
in class
-
hashCode
public int hashCode()- Overrides:
in class
-
toString
public toString()- Overrides:
in class
-
fromGeohash
public static geohash) -
fromGeohash
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
-
assertZValue
public static double assertZValue(boolean ignoreZValue, double zValue)
-