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
    Modifier and Type
    Field
    Description
    protected double
     
    protected double
     

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    GeoPoint​(double lat, double lon)
     
     value)
    Create a new Geopoint from a string.
    GeoPoint​(GeoPoint template)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    assertZValue​(boolean ignoreZValue, double zValue)
     
    boolean
     o)
     
    static GeoPoint
    fromGeohash​(long geohashLong)
     
    static GeoPoint
     geohash)
     
     
     
    double
     
    double
     
    int
     
    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)
     
     
    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

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

      public  value, boolean ignoreZValue, GeoUtils.EffectivePoint effectivePoint)
    • resetFromCoordinates

      public  value, boolean ignoreZValue)
    • resetFromIndexHash

      public GeoPoint resetFromIndexHash(long hash)
    • resetFromIndexableField

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

      public  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  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

      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
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • assertZValue

      public static double assertZValue(boolean ignoreZValue, double zValue)