Package org.apache.lucene.geo
Class Circle
- java.lang.Object
-
- org.apache.lucene.geo.LatLonGeometry
-
- org.apache.lucene.geo.Circle
-
public final class Circle extends LatLonGeometry
Represents a circle on the earth's surface.NOTES:
- Latitude/longitude values must be in decimal degrees.
- Radius must be in meters.
- For more advanced GeoSpatial indexing and query operations see the
spatial-extrasmodule
-
-
Field Summary
Fields Modifier and Type Field Description private doublelatCenter latitudeprivate doublelonCenter longitudeprivate doubleradiusMetersradius 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..
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)doublegetLat()Returns the center's latitudedoublegetLon()Returns the center's longitudedoublegetRadius()Returns the radius in metersinthashCode()protected Component2DtoComponent2D()get aComponent2Dfrom this geometryjava.lang.StringtoString()-
Methods inherited from class org.apache.lucene.geo.LatLonGeometry
create
-
-
-
-
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
-
toComponent2D
protected Component2D toComponent2D()
Description copied from class:LatLonGeometryget aComponent2Dfrom this geometry- Specified by:
toComponent2Din classLatLonGeometry
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-