public class GeoCircleFactory extends Object
Modifier and Type | Method and Description |
---|---|
static GeoCircle |
makeExactGeoCircle(PlanetModel planetModel,
double latitude,
double longitude,
double radius,
double accuracy)
Create an GeoCircle from a center, a radius and a desired accuracy.
|
static GeoCircle |
makeGeoCircle(PlanetModel planetModel,
double latitude,
double longitude,
double cutoffAngle)
Create a GeoCircle from a center and a cutoff angle.
|
public static GeoCircle makeGeoCircle(PlanetModel planetModel, double latitude, double longitude, double cutoffAngle)
planetModel
- is the planet model.latitude
- is the center latitude.longitude
- is the center longitude.cutoffAngle
- is the cutoff angle.public static GeoCircle makeExactGeoCircle(PlanetModel planetModel, double latitude, double longitude, double radius, double accuracy)
The accuracy of the circle is defined as the maximum linear distance between any point on the surface circle and planes that describe the circle. Therefore, with planet model WSG84, since the radius of earth is 6,371,000 meters, an accuracy of 1e-6 corresponds to 6.3 meters. For an accuracy of 1.0 meters, the accuracy value would be 1.6e-7. The maximum accuracy possible is 1e-12.
Note that this method may thrown an IllegalArgumentException if the circle being specified cannot be represented by plane approximation given the planet model provided.
planetModel
- is the planet model.latitude
- is the center latitude.longitude
- is the center longitude.radius
- is the radius surface distance.accuracy
- is the maximum linear distance between the circle approximation and the real circle,
as computed using the Vincenty formula.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.