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
  • Field Details

    • lat

      protected double lat
    • lon

      protected double lon
  • Constructor Details

    • 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 Details

    • 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)
    • resetFromString

      public GeoPoint resetFromString(String value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint)
    • resetFromCoordinates

      public GeoPoint resetFromCoordinates(String value, boolean ignoreZValue)
    • resetFromIndexHash

      public GeoPoint resetFromIndexHash(long hash)
    • resetFromIndexableField

      public GeoPoint resetFromIndexableField(org.apache.lucene.index.IndexableField field)
    • resetFromGeoHash

      public GeoPoint resetFromGeoHash(String geohash)
    • 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()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromGeohash

      public static GeoPoint fromGeohash(String geohash)
    • fromGeohash

      public static GeoPoint fromGeohash(long geohashLong)
    • 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:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • assertZValue

      public static double assertZValue(boolean ignoreZValue, double zValue)