public class BoundingBox extends Object
| Constructor and Description |
|---|
BoundingBox()
Constructor
|
BoundingBox(BoundingBox boundingBox)
Constructor
|
BoundingBox(double minLongitude,
double minLatitude,
double maxLongitude,
double maxLatitude)
Constructor
|
BoundingBox(GeometryEnvelope envelope)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
BoundingBox |
boundCoordinates(double maxProjectionLongitude)
Bound the bounding box longitudes within the min and max possible
projection values.
|
BoundingBox |
boundWebMercatorCoordinates()
Bound the bounding box coordinates within Web Mercator range values
|
BoundingBox |
boundWgs84Coordinates()
Bound the bounding box coordinates within WGS84 range values
|
GeometryEnvelope |
buildEnvelope()
Build a Geometry Envelope from the bounding box
|
static GeometryEnvelope |
buildEnvelope(BoundingBox boundingBox)
Build a Geometry Envelope from the bounding box
|
BoundingBox |
complementary(double maxProjectionLongitude)
If the bounding box spans the Anti-Meridian, attempt to get a
complementary bounding box using the max longitude of the unit projection
|
BoundingBox |
complementaryWebMercator()
If the bounding box spans the Anti-Meridian, attempt to get a
complementary Web Mercator bounding box
|
BoundingBox |
complementaryWgs84()
If the bounding box spans the Anti-Meridian, attempt to get a
complementary WGS84 bounding box
|
boolean |
contains(BoundingBox boundingBox)
Determine if inclusively contains the provided bounding box
|
boolean |
equals(Object obj) |
BoundingBox |
expandCoordinates(double maxProjectionLongitude)
Expand the bounding box max longitude above the max possible projection
value if needed to create a bounding box where the max longitude is
numerically larger than the min longitude.
|
BoundingBox |
expandWebMercatorCoordinates()
Expand the bounding box max longitude above the max Web Mercator
projection value if needed to create a bounding box where the max
longitude is numerically larger than the min longitude.
|
BoundingBox |
expandWgs84Coordinates()
Expand the bounding box max longitude above the max WGS84 projection
value if needed to create a bounding box where the max longitude is
numerically larger than the min longitude.
|
double |
getMaxLatitude()
Get the max latitude
|
double |
getMaxLongitude()
Get the max longitude
|
double |
getMinLatitude()
Get the min latitude
|
double |
getMinLongitude()
Get the min longitude
|
int |
hashCode() |
boolean |
intersects(BoundingBox boundingBox)
Determine if intersects with the provided bounding box
|
boolean |
intersects(BoundingBox boundingBox,
boolean allowEmpty)
Determine if intersects with the provided bounding box
|
BoundingBox |
overlap(BoundingBox boundingBox)
Get the overlapping bounding box with the provided bounding box
|
BoundingBox |
overlap(BoundingBox boundingBox,
boolean allowEmpty)
Get the overlapping bounding box with the provided bounding box
|
void |
setMaxLatitude(double maxLatitude)
Set the max latitude
|
void |
setMaxLongitude(double maxLongitude)
Set the max longitude
|
void |
setMinLatitude(double minLatitude)
Set the min latitude
|
void |
setMinLongitude(double minLongitude)
Set the min longitude
|
BoundingBox |
transform(ProjectionTransform transform)
Transform the bounding box using the provided projection transform
|
BoundingBox |
union(BoundingBox boundingBox)
Get the union bounding box with the provided bounding box
|
public BoundingBox()
public BoundingBox(double minLongitude,
double minLatitude,
double maxLongitude,
double maxLatitude)
minLongitude - min longitudeminLatitude - min latitudemaxLongitude - max longitudemaxLatitude - max latitudepublic BoundingBox(BoundingBox boundingBox)
boundingBox - bounding boxpublic BoundingBox(GeometryEnvelope envelope)
envelope - geometry envelopepublic double getMinLongitude()
public void setMinLongitude(double minLongitude)
minLongitude - min longitudepublic double getMaxLongitude()
public void setMaxLongitude(double maxLongitude)
maxLongitude - max longitudepublic double getMinLatitude()
public void setMinLatitude(double minLatitude)
minLatitude - min latitudepublic double getMaxLatitude()
public void setMaxLatitude(double maxLatitude)
maxLatitude - max latitudepublic GeometryEnvelope buildEnvelope()
public static GeometryEnvelope buildEnvelope(BoundingBox boundingBox)
boundingBox - bounding boxpublic BoundingBox complementary(double maxProjectionLongitude)
maxProjectionLongitude - max longitude of the world for the current bounding box unitspublic BoundingBox complementaryWgs84()
public BoundingBox complementaryWebMercator()
public BoundingBox boundCoordinates(double maxProjectionLongitude)
maxProjectionLongitude - max longitude of the world for the current bounding box unitspublic BoundingBox boundWgs84Coordinates()
public BoundingBox boundWebMercatorCoordinates()
public BoundingBox expandCoordinates(double maxProjectionLongitude)
maxProjectionLongitude - max longitude of the world for the current bounding box unitspublic BoundingBox expandWgs84Coordinates()
public BoundingBox expandWebMercatorCoordinates()
public BoundingBox transform(ProjectionTransform transform)
transform - projection transformpublic boolean intersects(BoundingBox boundingBox)
boundingBox - bounding boxpublic boolean intersects(BoundingBox boundingBox, boolean allowEmpty)
boundingBox - bounding boxallowEmpty - allow empty ranges when determining intersectionpublic BoundingBox overlap(BoundingBox boundingBox)
boundingBox - bounding boxpublic BoundingBox overlap(BoundingBox boundingBox, boolean allowEmpty)
boundingBox - bounding boxallowEmpty - allow empty ranges when determining overlappublic BoundingBox union(BoundingBox boundingBox)
boundingBox - bounding boxpublic boolean contains(BoundingBox boundingBox)
boundingBox - bounding boxCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.