Class XYPoint


  • public final class XYPoint
    extends XYGeometry
    Represents a point on the earth's surface. You can construct the point directly with double coordinates.

    NOTES:

    1. latitude/longitude values must be in decimal degrees.
    2. For more advanced GeoSpatial indexing and query operations see the spatial-extras module
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float x
      latitude coordinate
      private float y
      longitude coordinate
    • Constructor Summary

      Constructors 
      Constructor Description
      XYPoint​(float x, float y)
      Creates a new Point from the supplied latitude/longitude.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      float getX()
      Returns latitude value at given index
      float getY()
      Returns longitude value at given index
      int hashCode()  
      protected Component2D toComponent2D()
      get a Component2D from the geometry object
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • x

        private final float x
        latitude coordinate
      • y

        private final float y
        longitude coordinate
    • Constructor Detail

      • XYPoint

        public XYPoint​(float x,
                       float y)
        Creates a new Point from the supplied latitude/longitude.
    • Method Detail

      • getX

        public float getX()
        Returns latitude value at given index
      • getY

        public float getY()
        Returns longitude value at given index
      • 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
      • toString

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