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 TypeMethodDescriptionboolean
determines if the given point in local coordinates is in the current viewing areaboolean
determines if the given point in world coordinates is in the current viewing areadouble
returns 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 coordinatesdouble
double
double
getZoom()
Get the current zoom factorvoid
grow the map reqion extents to rclocal2WorldTransform
(AffineTransform transform) Creates or updates an existing AffineTransform to change from local to world coordinates.void
Converts a point in local coordinates to world coordinates.Converts a LocalRect to a WorldRect, returning a newly allocated WorldRectvoid
Set the origin of the map view positionvoid
Set the origin of the map view positionvoid
Set the map region extentsvoid
setViewRect
(LocalRect rc) Set the viewport rectanglevoid
set the viewport rectangle to dvoid
setZoom
(double z) Set the zoom factorvoid
showAll()
zoom out to the world coordinatesprotected WorldPt
transformPoint
(WorldPt pt, Transform transform) transformRect
(WorldRect bounds) protected WorldRect
transformRect
(WorldRect bounds, Transform transform) world2LocalTransform
(AffineTransform transform) Coordinate conversion routines Creates or updates an existing AffineTransform to change from world to local coordinates.void
Converts 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 LocalRectvoid
zoomByFactor
(double factor) Change the zoom scaling by the given factor.boolean
Zoom in to the given rectangle in local coordinates.boolean
Methods 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:MapScale
determines if the given point in world coordinates is in the current viewing area -
contains
Description copied from class:MapScale
determines if the given point in local coordinates is in the current viewing area -
getAvgW2LScale
public double getAvgW2LScale()Description copied from class:MapScale
returns the average world to local scaling factor- Overrides:
getAvgW2LScale
in classMapScale
- Returns:
- The average scaling factor
-
getOrigin
Description copied from class:MapScale
Get a copy of the current origin -
getRegionExtents
Description copied from class:MapScale
Get a copy of the current region extents- Overrides:
getRegionExtents
in classMapScale
- Returns:
- The current Region Extents
-
getViewRect
Description copied from class:MapScale
Get a copy of the current view rectangle in local coodinates- Overrides:
getViewRect
in classMapScale
- Returns:
- The current Viewport rectangle
-
getWorldRect
Description copied from class:MapScale
Get a copy of the current view rectangle in world coordinates- Overrides:
getWorldRect
in classMapScale
- Returns:
- The current Viewport rectangle
-
getXScale
public double getXScale() -
getYScale
public double getYScale() -
getZoom
public double getZoom()Description copied from class:MapScale
Get the current zoom factor -
growRegionExtents
Description copied from class:MapScale
grow the map reqion extents to rc- Overrides:
growRegionExtents
in classMapScale
- Parameters:
rc
- extents to grow the map region to
-
local2WorldTransform
Description copied from class:MapScale
Creates or updates an existing AffineTransform to change from local to world coordinates.- Overrides:
local2WorldTransform
in classMapScale
- Parameters:
transform
- AffineTransform the transform to adjust. If null, a new transform is created.- Returns:
- AffineTransform
-
lp2wp
Description copied from class:MapScale
Converts a point in local coordinates to world coordinates. -
lr2wr
Description copied from class:MapScale
Converts a LocalRect to a WorldRect, returning a newly allocated WorldRect -
setOrigin
Description copied from class:MapScale
Set the origin of the map view position -
setOrigin
Description copied from class:MapScale
Set the origin of the map view position -
setRegionExtents
Description copied from class:MapScale
Set the map region extents- Overrides:
setRegionExtents
in classMapScale
- Parameters:
rc
- The new RegionExtents value
-
setViewRect
Description copied from class:MapScale
Set the viewport rectangle- Overrides:
setViewRect
in classMapScale
- Parameters:
rc
- The new Viewport rectangle
-
setViewRect
Description copied from class:MapScale
set the viewport rectangle to d- Overrides:
setViewRect
in classMapScale
- Parameters:
d
- the new viewport rectangle
-
setZoom
public void setZoom(double z) Description copied from class:MapScale
Set the zoom factor -
showAll
public void showAll()Description copied from class:MapScale
zoom out to the world coordinates -
world2LocalTransform
Description copied from class:MapScale
Coordinate conversion routines Creates or updates an existing AffineTransform to change from world to local coordinates.- Overrides:
world2LocalTransform
in classMapScale
- Parameters:
transform
- AffineTransform the transform to adjust. If null, a new transform is created.- Returns:
- AffineTransform
-
wp2lp
Description copied from class:MapScale
Converts a point in world coordinates to local coordinates. -
wr2lr
Description copied from class:MapScale
Converts a WorldRect to a LocalRect, returning a newly allocated LocalRect -
wr2lr
Description copied from class:MapScale
Converts a WorldRect to a LocalRect, returning a newly allocated LocalRect -
zoomByFactor
public void zoomByFactor(double factor) Description copied from class:MapScale
Change the zoom scaling by the given factor.- Overrides:
zoomByFactor
in classMapScale
- Parameters:
factor
- the new zoom scaling factor
-
zoomIn
-
zoomIn
Description copied from class:MapScale
Zoom in to the given rectangle in local coordinates. -
transformPoint
-
transformRect
-
transformPoint
-
transformRect
-