public final class CenterScaleMapBounds extends MapBounds
| Constructor and Description |
|---|
CenterScaleMapBounds(org.opengis.referencing.crs.CoordinateReferenceSystem projection,
double centerX,
double centerY,
Scale scale)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
MapBounds |
adjustedEnvelope(java.awt.Rectangle paintArea)
Create a
ReferencedEnvelope representing the bounds. |
boolean |
equals(java.lang.Object o) |
Scale |
getScaleDenominator(java.awt.Rectangle paintArea,
double dpi)
Calculate and return the scale of the map bounds.
|
int |
hashCode() |
org.geotools.geometry.jts.ReferencedEnvelope |
toReferencedEnvelope(java.awt.Rectangle paintArea,
double dpi)
Create a
ReferencedEnvelope representing the bounds. |
java.lang.String |
toString() |
CenterScaleMapBounds |
zoomOut(double factor)
Zooms-out the bounds by the given factor.
|
MapBounds |
zoomToScale(double newScale)
Zoom to the given scale.
|
getGeodeticScaleDenominator, getProjectionpublic CenterScaleMapBounds(org.opengis.referencing.crs.CoordinateReferenceSystem projection,
double centerX,
double centerY,
Scale scale)
projection - the projection these bounds are defined in.centerX - the x coordinate of the center point.centerY - the y coordinate of the center point.scale - the scale of the mappublic org.geotools.geometry.jts.ReferencedEnvelope toReferencedEnvelope(java.awt.Rectangle paintArea,
double dpi)
MapBoundsReferencedEnvelope representing the bounds.
toReferencedEnvelope in class MapBoundspaintArea - the size of the map that will be drawn.dpi - the dpi of the mappublic MapBounds adjustedEnvelope(java.awt.Rectangle paintArea)
MapBoundsReferencedEnvelope representing the bounds.
adjustedEnvelope in class MapBoundspaintArea - the size of the map that will be drawn.public MapBounds adjustBoundsToNearestScale(ZoomLevels zoomLevels, double tolerance, ZoomLevelSnapStrategy zoomLevelSnapStrategy, boolean geodetic, java.awt.Rectangle paintArea, double dpi)
MapBoundsadjustBoundsToNearestScale in class MapBoundszoomLevels - 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 of the mappublic Scale getScaleDenominator(java.awt.Rectangle paintArea, double dpi)
MapBoundsgetScaleDenominator in class MapBoundspaintArea - the paint area of the map.dpi - the dpi of the mappublic MapBounds adjustBoundsToRotation(double rotation)
MapBoundsadjustBoundsToRotation in class MapBoundsrotation - The rotation of the map in radians.public CenterScaleMapBounds zoomOut(double factor)
MapBoundspublic MapBounds zoomToScale(double newScale)
MapBoundszoomToScale in class MapBoundsnewScale - The new scale.public java.lang.String toString()
toString in class java.lang.Object