Package org.apache.lucene.geo
Class Circle
java.lang.Object
org.apache.lucene.geo.LatLonGeometry
org.apache.lucene.geo.Circle
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-extras
module
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
Center latitudeprivate final double
Center longitudeprivate final double
radius in meters -
Constructor Summary
ConstructorsConstructorDescriptionCircle
(double lat, double lon, double radiusMeters) Creates a new circle from the supplied latitude/longitude center and a radius in meters.. -
Method Summary
Modifier and TypeMethodDescriptionboolean
double
getLat()
Returns the center's latitudedouble
getLon()
Returns the center's longitudedouble
Returns the radius in metersint
hashCode()
protected Component2D
get aComponent2D
from this geometrytoString()
Methods inherited from class org.apache.lucene.geo.LatLonGeometry
create
-
Field Details
-
lat
private final double latCenter latitude -
lon
private final double lonCenter longitude -
radiusMeters
private final double radiusMetersradius in meters
-
-
Constructor Details
-
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 Details
-
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
Description copied from class:LatLonGeometry
get aComponent2D
from this geometry- Specified by:
toComponent2D
in classLatLonGeometry
-
equals
-
hashCode
public int hashCode() -
toString
-