public class Rectangle extends Object
Modifier and Type | Field and Description |
---|---|
static double |
AXISLAT_ERROR
maximum error from
axisLat(double, double) . |
double |
maxLat
maximum latitude value (in degrees)
|
double |
maxLon
minimum latitude value (in degrees)
|
double |
minLat
maximum longitude value (in degrees)
|
double |
minLon
minimum longitude value (in degrees)
|
Constructor and Description |
---|
Rectangle(double minLat,
double maxLat,
double minLon,
double maxLon)
Constructs a bounding box by first validating the provided latitude and longitude coordinates
|
Modifier and Type | Method and Description |
---|---|
static double |
axisLat(double centerLat,
double radiusMeters)
Calculate the latitude of a circle's intersections with its bbox meridians.
|
boolean |
crossesDateline()
Returns true if this bounding box crosses the dateline
|
boolean |
equals(Object o) |
static Rectangle |
fromPointDistance(double centerLat,
double centerLon,
double radiusMeters)
Compute Bounding Box for a circle using WGS-84 parameters
|
static Rectangle |
fromPolygon(Polygon[] polygons)
Returns the bounding box over an array of polygons
|
int |
hashCode() |
String |
toString() |
public final double minLat
public final double minLon
public final double maxLat
public final double maxLon
public static final double AXISLAT_ERROR
axisLat(double, double)
. logic must be prepared to handle thispublic Rectangle(double minLat, double maxLat, double minLon, double maxLon)
public boolean crossesDateline()
public static Rectangle fromPointDistance(double centerLat, double centerLon, double radiusMeters)
public static double axisLat(double centerLat, double radiusMeters)
NOTE: the returned value will be +/- AXISLAT_ERROR
of the actual value.
centerLat
- The latitude of the circle centerradiusMeters
- The radius of the circle in meterspublic static Rectangle fromPolygon(Polygon[] polygons)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.