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[] lats, double[] lons)  
        Line​(double[] lats, double[] lons, double[] alts)  
    • 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()  
      boolean hasAlt()  
      int hashCode()  
      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
    • Field Detail

      • EMPTY

        public static final Line EMPTY
    • Constructor Detail

      • Line

        protected Line()
      • Line

        public Line​(double[] lats,
                    double[] lons)
      • Line

        public Line​(double[] lats,
                    double[] lons,
                    double[] alts)
    • Method Detail

      • length

        public int length()
      • 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
      • hasAlt

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

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