Class Line

  • All Implemented Interfaces:
    Geometry
    Direct Known Subclasses:
    LinearRing

    public class Line
    extends java.lang.Object
    implements Geometry
    Represents a Line on the earth's surface in lat/lon decimal degrees and optional altitude in meters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Line EMPTY  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Line()  
        Line​(double[] x, double[] y)  
        Line​(double[] x, double[] y, double[] z)  
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      double getAlt​(int i)  
      double[] getAlts()  
      double getLat​(int i)  
      double[] getLats()  
      double getLon​(int i)  
      double[] getLons()  
      double[] getX()  
      double getX​(int i)  
      double[] getY()  
      double getY​(int i)  
      double[] getZ()  
      double getZ​(int i)  
      int hashCode()  
      boolean hasZ()  
      boolean isEmpty()  
      int length()  
      java.lang.String toString()  
      ShapeType type()  
      <T,​E extends java.lang.Exception>
      T
      visit​(GeometryVisitor<T,​E> visitor)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.elasticsearch.geometry.Geometry

        hasAlt
    • Field Detail

      • EMPTY

        public static final Line EMPTY
    • Constructor Detail

      • Line

        protected Line()
      • Line

        public Line​(double[] x,
                    double[] y)
      • Line

        public Line​(double[] x,
                    double[] y,
                    double[] z)
    • Method Detail

      • length

        public int length()
      • getY

        public double getY​(int i)
      • getX

        public double getX​(int i)
      • getZ

        public double getZ​(int i)
      • getY

        public double[] getY()
      • getX

        public double[] getX()
      • getZ

        public double[] getZ()
      • getLat

        public double getLat​(int i)
      • getLon

        public double getLon​(int i)
      • getAlt

        public double getAlt​(int i)
      • getLats

        public double[] getLats()
      • getLons

        public double[] getLons()
      • getAlts

        public double[] getAlts()
      • visit

        public <T,​E extends java.lang.Exception> T visit​(GeometryVisitor<T,​E> visitor)
                                                        throws E extends java.lang.Exception
        Specified by:
        visit in interface Geometry
        Throws:
        E extends java.lang.Exception
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Geometry
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • hasZ

        public boolean hasZ()
        Specified by:
        hasZ in interface Geometry
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object