Package hec.map
Class TransformMapScale
java.lang.Object
hec.map.MapScale
hec.map.TransformMapScale
-
Field Summary
Fields inherited from class hec.map.MapScale
_aniso, _defaultRegionExtents, _origin, _regionExtents, _viewRect, _worldRect, _xscale, _yscale, _zoom -
Constructor Summary
ConstructorsConstructorDescriptionTransformMapScale(MapScale scl, CoordinateReferenceSystem mapScaleCrs, CoordinateReferenceSystem dataCrs) -
Method Summary
Modifier and TypeMethodDescriptionbooleandetermines if the given point in local coordinates is in the current viewing areabooleandetermines if the given point in world coordinates is in the current viewing areadoublereturns the average world to local scaling factorGet a copy of the current originGet a copy of the current region extentsGet a copy of the current view rectangle in local coodinatesGet a copy of the current view rectangle in world coordinatesdoubledoubledoublegetZoom()Get the current zoom factorvoidgrow the map reqion extents to rclocal2WorldTransform(AffineTransform transform) Creates or updates an existing AffineTransform to change from local to world coordinates.voidConverts a point in local coordinates to world coordinates.Converts a LocalRect to a WorldRect, returning a newly allocated WorldRectvoidSet the origin of the map view positionvoidSet the origin of the map view positionvoidSet the map region extentsvoidsetViewRect(LocalRect rc) Set the viewport rectanglevoidset the viewport rectangle to dvoidsetZoom(double z) Set the zoom factorvoidshowAll()zoom out to the world coordinatesprotected WorldPttransformPoint(WorldPt pt, Transform transform) transformRect(WorldRect bounds) protected WorldRecttransformRect(WorldRect bounds, Transform transform) world2LocalTransform(AffineTransform transform) Coordinate conversion routines Creates or updates an existing AffineTransform to change from world to local coordinates.voidConverts a point in world coordinates to local coordinates.Converts a WorldRect to a LocalRect, returning a newly allocated LocalRectConverts a WorldRect to a LocalRect, returning a newly allocated LocalRectvoidzoomByFactor(double factor) Change the zoom scaling by the given factor.booleanZoom in to the given rectangle in local coordinates.booleanMethods inherited from class hec.map.MapScale
computeScaling, e2x, isDefaultRegionExtents, lp2wp, n2y, setDefaultRegionExtents, wp2lp, x2e, y2n
-
Constructor Details
-
TransformMapScale
public TransformMapScale(MapScale scl, CoordinateReferenceSystem mapScaleCrs, CoordinateReferenceSystem dataCrs) throws CRSException - Throws:
CRSException
-
-
Method Details
-
contains
Description copied from class:MapScaledetermines if the given point in world coordinates is in the current viewing area -
contains
Description copied from class:MapScaledetermines if the given point in local coordinates is in the current viewing area -
getAvgW2LScale
public double getAvgW2LScale()Description copied from class:MapScalereturns the average world to local scaling factor- Overrides:
getAvgW2LScalein classMapScale- Returns:
- The average scaling factor
-
getOrigin
Description copied from class:MapScaleGet a copy of the current origin -
getRegionExtents
Description copied from class:MapScaleGet a copy of the current region extents- Overrides:
getRegionExtentsin classMapScale- Returns:
- The current Region Extents
-
getViewRect
Description copied from class:MapScaleGet a copy of the current view rectangle in local coodinates- Overrides:
getViewRectin classMapScale- Returns:
- The current Viewport rectangle
-
getWorldRect
Description copied from class:MapScaleGet a copy of the current view rectangle in world coordinates- Overrides:
getWorldRectin classMapScale- Returns:
- The current Viewport rectangle
-
getXScale
public double getXScale() -
getYScale
public double getYScale() -
getZoom
public double getZoom()Description copied from class:MapScaleGet the current zoom factor -
growRegionExtents
Description copied from class:MapScalegrow the map reqion extents to rc- Overrides:
growRegionExtentsin classMapScale- Parameters:
rc- extents to grow the map region to
-
local2WorldTransform
Description copied from class:MapScaleCreates or updates an existing AffineTransform to change from local to world coordinates.- Overrides:
local2WorldTransformin classMapScale- Parameters:
transform- AffineTransform the transform to adjust. If null, a new transform is created.- Returns:
- AffineTransform
-
lp2wp
Description copied from class:MapScaleConverts a point in local coordinates to world coordinates. -
lr2wr
Description copied from class:MapScaleConverts a LocalRect to a WorldRect, returning a newly allocated WorldRect -
setOrigin
Description copied from class:MapScaleSet the origin of the map view position -
setOrigin
Description copied from class:MapScaleSet the origin of the map view position -
setRegionExtents
Description copied from class:MapScaleSet the map region extents- Overrides:
setRegionExtentsin classMapScale- Parameters:
rc- The new RegionExtents value
-
setViewRect
Description copied from class:MapScaleSet the viewport rectangle- Overrides:
setViewRectin classMapScale- Parameters:
rc- The new Viewport rectangle
-
setViewRect
Description copied from class:MapScaleset the viewport rectangle to d- Overrides:
setViewRectin classMapScale- Parameters:
d- the new viewport rectangle
-
setZoom
public void setZoom(double z) Description copied from class:MapScaleSet the zoom factor -
showAll
public void showAll()Description copied from class:MapScalezoom out to the world coordinates -
world2LocalTransform
Description copied from class:MapScaleCoordinate conversion routines Creates or updates an existing AffineTransform to change from world to local coordinates.- Overrides:
world2LocalTransformin classMapScale- Parameters:
transform- AffineTransform the transform to adjust. If null, a new transform is created.- Returns:
- AffineTransform
-
wp2lp
Description copied from class:MapScaleConverts a point in world coordinates to local coordinates. -
wr2lr
Description copied from class:MapScaleConverts a WorldRect to a LocalRect, returning a newly allocated LocalRect -
wr2lr
Description copied from class:MapScaleConverts a WorldRect to a LocalRect, returning a newly allocated LocalRect -
zoomByFactor
public void zoomByFactor(double factor) Description copied from class:MapScaleChange the zoom scaling by the given factor.- Overrides:
zoomByFactorin classMapScale- Parameters:
factor- the new zoom scaling factor
-
zoomIn
-
zoomIn
Description copied from class:MapScaleZoom in to the given rectangle in local coordinates. -
transformPoint
-
transformRect
-
transformPoint
-
transformRect
-