Class Circle


  • public final class Circle
    extends LatLonGeometry
    Represents a circle on the earth's surface.

    NOTES:

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

      Fields 
      Modifier and Type Field Description
      private double lat
      Center latitude
      private double lon
      Center longitude
      private double radiusMeters
      radius in meters
    • Constructor Summary

      Constructors 
      Constructor Description
      Circle​(double lat, double lon, double radiusMeters)
      Creates a new circle from the supplied latitude/longitude center and a radius in meters..
    • Field Detail

      • lat

        private final double lat
        Center latitude
      • lon

        private final double lon
        Center longitude
      • radiusMeters

        private final double radiusMeters
        radius in meters
    • Constructor Detail

      • Circle

        public Circle​(double lat,
                      double lon,
                      double radiusMeters)
        Creates a new circle from the supplied latitude/longitude center and a radius in meters..
    • Method Detail

      • getLat

        public double getLat()
        Returns the center's latitude
      • getLon

        public double getLon()
        Returns the center's longitude
      • getRadius

        public double getRadius()
        Returns the radius in meters
      • 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