java.lang.Object | |
↳ | com.carto.core.MapBounds |
A container class that defines an axis aligned cuboid on the map using minimum and maximum map positions.
Valid ranges for map bounds depend on the projection used.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MapBounds()
Constructs an empty MapBounds object.
| |||||||||||
MapBounds(MapPos min, MapPos max)
Constructs a MapBounds object from a minimum and maximum map position.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
contains(MapBounds bounds)
Tests whether this map bounds object contains a another map bounds object.
| ||||||||||
boolean |
contains(MapPos pos)
Tests whether this map bounds object contains a map position.
| ||||||||||
synchronized void | delete() | ||||||||||
boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
MapPos |
getCenter()
Calculates the center map position of this map envelope object.
| ||||||||||
MapVec |
getDelta()
Calculates the difference vector between the maximum and minimum map positions of this map bounds object.
| ||||||||||
MapPos |
getMax()
Returns the maximum (north east) map position of this map envelope object.
| ||||||||||
MapPos |
getMin()
Returns the minimum (south west) map position of this map envelope object.
| ||||||||||
int |
hashCode()
Returns the hash value of this object.
| ||||||||||
boolean |
intersects(MapBounds bounds)
Tests whether this map bounds object intersects with a another map bounds object.
| ||||||||||
void |
shrinkToIntersection(MapBounds bounds)
Shrinks this map bounds object to the intersection of this bounds and given bounds object.
| ||||||||||
String |
toString()
Creates a string representation of this map bounds object, useful for logging.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs an empty MapBounds object. The coordinates of the minimum map position will be
set to positive infinity and the coordinates of the maximum map position will be
set to negative infinity.
Constructs a MapBounds object from a minimum and maximum map position. If a coordinate of the
minimum map positon is larger than the same coordinate of the maximum map position then those
coordinates will be swapped.
min | The minimum map position (south-west). |
---|---|
max | The maximum map position (north-east). |
Tests whether this map bounds object contains a another map bounds object.
bounds | The other map bounds object. |
---|
Tests whether this map bounds object contains a map position.
pos | The map position. |
---|
Checks if this object is equal to the specified object.
obj | The reference object. |
---|
Calculates the center map position of this map envelope object.
Calculates the difference vector between the maximum and minimum map positions of this map bounds object.
Returns the maximum (north east) map position of this map envelope object.
Returns the minimum (south west) map position of this map envelope object.
Returns the hash value of this object.
Tests whether this map bounds object intersects with a another map bounds object.
bounds | The other map bounds object. |
---|
Shrinks this map bounds object to the intersection of this bounds and given bounds object.
bounds | The other map bounds object. |
---|
Creates a string representation of this map bounds object, useful for logging.