Class Circle
java.lang.Object
org.opensearch.geometry.Circle
- All Implemented Interfaces:
Geometry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare this circle to another circle.doublegetAlt()doublegetLat()doublegetLon()doubledoublegetX()doublegetY()doublegetZ()inthashCode()booleanhasZ()booleanisEmpty()toString()type()<T, E extends Exception>
Tvisit(GeometryVisitor<T, E> visitor) Visit this circle with aGeometryVisitor.
-
Field Details
-
EMPTY
Empty circle : x=0, y=0, z=NaN radius=-1
-
-
Constructor Details
-
Circle
public Circle(double x, double y, double radiusMeters) Create a circle with no altitude.- Parameters:
x- Longitude of the center of the circle in degreesy- Latitude of the center of the circle in degreesradiusMeters- Radius of the circle in meters
-
Circle
public Circle(double x, double y, double z, double radiusMeters) Create a circle with altitude.- Parameters:
x- Longitude of the center of the circle in degreesy- Latitude of the center of the circle in degreesz- Altitude of the center of the circle in metersradiusMeters- Radius of the circle in meters
-
-
Method Details
-
type
- Specified by:
typein interfaceGeometry- Returns:
- The type of this geometry (always
ShapeType.CIRCLE)
-
getY
public double getY()- Returns:
- The y (latitude) of the center of the circle in degrees
-
getX
public double getX()- Returns:
- The x (longitude) of the center of the circle in degrees
-
getRadiusMeters
public double getRadiusMeters()- Returns:
- The radius of the circle in meters
-
getZ
public double getZ()- Returns:
- The altitude of the center of the circle in meters (NaN if irrelevant)
-
getLat
public double getLat()- Returns:
- The latitude (y) of the center of the circle in degrees
-
getLon
public double getLon()- Returns:
- The longitude (x) of the center of the circle in degrees
-
getAlt
public double getAlt()- Returns:
- The altitude (z) of the center of the circle in meters (NaN if irrelevant)
-
equals
-
hashCode
-
visit
Visit this circle with aGeometryVisitor. -
isEmpty
-
toString
-
hasZ
-