Package it.tidalwave.mapviewer
Class MapArea
java.lang.Object
it.tidalwave.mapviewer.MapArea
A rectangular area on the map.
- Author:
- Fabrizio Giudici
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this area contains the given area.boolean
contains
(MapCoordinates coordinates) Returnstrue
if this area contains the given coordinates.Returns the center of this area.boolean
Returnstrue
if this area spans across the Greenwich antimeridian (180° W).static MapArea
of
(double north, double east, double south, double west) Returns a new area.toString()
-
Constructor Details
-
MapArea
public MapArea()
-
-
Method Details
-
of
Returns a new area..- Parameters:
north
- the north limiteast
- the east limitsouth
- the south limitwest
- the west limit- Returns:
- a new area
- Throws:
IllegalArgumentException
- when the values are unfeasible
-
getCenter
Returns the center of this area..- Returns:
- the center of this area
-
isAcrossGreenwichAntimeridian
public boolean isAcrossGreenwichAntimeridian()Returnstrue
if this area spans across the Greenwich antimeridian (180° W)..- Returns:
true
if this area spans across the Greenwich antimeridian (180° W)
-
contains
Returnstrue
if this area contains the given coordinates..- Parameters:
coordinates
- the coordinates- Returns:
true
if this area contains the given coordinates
-
contains
Returnstrue
if this area contains the given area..- Parameters:
that
- the area to compare- Returns:
true
if this area contains the given area
-
toString
-