public abstract class MapBounds
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
MapBounds(org.opengis.referencing.crs.CoordinateReferenceSystem projection)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract MapBounds |
adjustBoundsToNearestScale(ZoomLevels zoomLevels,
double tolerance,
ZoomLevelSnapStrategy zoomLevelSnapStrategy,
boolean geodetic,
java.awt.Rectangle paintArea,
double dpi)
Adjust these bounds so that they are adjusted to the nearest scale in the provided set of scales.
|
abstract MapBounds |
adjustBoundsToRotation(double rotation)
In case a rotation is used for the map, the bounds have to be adjusted so that all
visible parts are rendered.
|
abstract MapBounds |
adjustedEnvelope(java.awt.Rectangle paintArea)
Create a
ReferencedEnvelope representing the bounds. |
boolean |
equals(java.lang.Object o) |
abstract com.vividsolutions.jts.geom.Coordinate |
getCenter()
Get the center.
|
Scale |
getNearestScale(ZoomLevels zoomLevels,
double tolerance,
ZoomLevelSnapStrategy zoomLevelSnapStrategy,
boolean geodetic,
java.awt.Rectangle paintArea,
double dpi)
Get the nearest scale.
|
org.opengis.referencing.crs.CoordinateReferenceSystem |
getProjection()
Get the projection these bounds are calculated in.
|
abstract Scale |
getScale(java.awt.Rectangle paintArea,
double dpi)
Calculate and return the scale of the map bounds.
|
int |
hashCode() |
abstract org.geotools.geometry.jts.ReferencedEnvelope |
toReferencedEnvelope(java.awt.Rectangle paintArea)
Create a
ReferencedEnvelope representing the bounds. |
abstract MapBounds |
zoomOut(double factor)
Zooms-out the bounds by the given factor.
|
abstract MapBounds |
zoomToScale(Scale scale)
Zoom to the given scale.
|
protected MapBounds(org.opengis.referencing.crs.CoordinateReferenceSystem projection)
projection - the projection these bounds are defined in.public abstract org.geotools.geometry.jts.ReferencedEnvelope toReferencedEnvelope(java.awt.Rectangle paintArea)
ReferencedEnvelope representing the bounds.
paintArea - the size of the map that will be drawn (at 72 DPI).public abstract MapBounds adjustedEnvelope(java.awt.Rectangle paintArea)
ReferencedEnvelope representing the bounds.
paintArea - the size of the map that will be drawn.public final org.opengis.referencing.crs.CoordinateReferenceSystem getProjection()
public abstract MapBounds adjustBoundsToNearestScale(ZoomLevels zoomLevels, double tolerance, ZoomLevelSnapStrategy zoomLevelSnapStrategy, boolean geodetic, java.awt.Rectangle paintArea, double dpi)
zoomLevels - the list of Zoom Levelstolerance - the tolerance to use when considering if two values are equal. For example if 12.0 == 12.001.
The tolerance is a percentagezoomLevelSnapStrategy - the strategy to use for snapping to the nearest zoom level.geodetic - snap to geodetic scales.paintArea - the paint area of the map.dpi - the DPI.public Scale getNearestScale(ZoomLevels zoomLevels, double tolerance, ZoomLevelSnapStrategy zoomLevelSnapStrategy, boolean geodetic, java.awt.Rectangle paintArea, double dpi)
zoomLevels - the list of Zoom Levels.tolerance - the tolerance to use when considering if two values are equal.
For example if 12.0 == 12.001.
The tolerance is a percentage.zoomLevelSnapStrategy - the strategy to use for snapping to the nearest zoom level.geodetic - snap to geodetic scales.paintArea - the paint area of the map.dpi - the DPI.public abstract Scale getScale(java.awt.Rectangle paintArea, double dpi)
paintArea - the paint area of the map.dpi - the dpi of the mappublic abstract MapBounds adjustBoundsToRotation(double rotation)
rotation - The rotation of the map in radians.public abstract MapBounds zoomOut(double factor)
factor - The zoom factor.public abstract MapBounds zoomToScale(Scale scale)
scale - The new scale.public abstract com.vividsolutions.jts.geom.Coordinate getCenter()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object