Class Circle

java.lang.Object
com.graphhopper.util.shapes.Circle
All Implemented Interfaces:
Shape

public class Circle extends Object implements Shape
Author:
Peter Karich
  • Field Details

    • radiusInMeter

      public final double radiusInMeter
  • Constructor Details

    • Circle

      public Circle(double lat, double lon, double radiusInMeter)
    • Circle

      public Circle(double lat, double lon, double radiusInMeter, DistanceCalc calc)
  • Method Details

    • getLat

      public double getLat()
    • getLon

      public double getLon()
    • contains

      public boolean contains(double lat1, double lon1)
      Specified by:
      contains in interface Shape
      Returns:
      true only if lat and lon are inside (or on the edge) of this shape
    • getBounds

      public BBox getBounds()
      Specified by:
      getBounds in interface Shape
      Returns:
      the minimal rectangular bounding box of this shape
    • intersects

      public boolean intersects(PointList pointList)
      Specified by:
      intersects in interface Shape
    • intersects

      public boolean intersects(BBox b)
    • contains

      public boolean contains(BBox b)
    • contains

      public boolean contains(Circle c)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object