public abstract class MapProjectionDisplay extends NavigatedDisplay
Any displayable data must be able to map to RealType.Latitude, RealType.Longitude and/or RealType.Altitude.
Modifier and Type | Class and Description |
---|---|
protected class |
MapProjectionDisplay.MapProjection3DAdapter
An adapter for visad.georef.MapProjection coordinate systems (ie:
ones with * a reference of Lat/Lon).
|
NavigatedDisplay.VerticalMapSet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CURSOR_BEARING
The name of the bearing from center property.
|
static visad.RealType |
CURSOR_BEARING_TYPE
The bearing from center RealType.
|
static java.lang.String |
CURSOR_RANGE
The name of the range from center property.
|
static visad.RealType |
CURSOR_RANGE_TYPE
The range from center RealType.
|
static boolean |
force2D
flag for forcing 2D
|
BOTTOM_VIEW, BOTTOM_VIEW_NAME, CLIP_BACK_DEFAULT, CLIP_BACK_PERSPECTIVE, CLIP_FRONT_DEFAULT, CLIP_FRONT_PERSPECTIVE, CURSOR_ALTITUDE, CURSOR_LATITUDE, CURSOR_LONGITUDE, defaultClipDistanceBack, defaultClipDistanceFront, EAST_VIEW, EAST_VIEW_NAME, MODE_2D, MODE_2Din3D, MODE_3D, NORTH_VIEW, NORTH_VIEW_NAME, SOUTH_VIEW, SOUTH_VIEW_NAME, TOP_VIEW, TOP_VIEW_NAME, WEST_VIEW, WEST_VIEW_NAME
behavior, defaultMouseFunctions, POINT_MODE
Modifier | Constructor and Description |
---|---|
protected |
MapProjectionDisplay()
Constructs an instance with the specified MapProjection
|
protected |
MapProjectionDisplay(visad.georef.MapProjection projection,
visad.DisplayImpl display)
Constructs an instance with the specified MapProjection
CoordinateSystem and display.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addKeyboardBehavior(visad.KeyboardBehavior behavior)
Add a KeyboardBehavior to this class
|
void |
addVerticalMap(visad.RealType newVertType)
Add a new mapping of this type to the vertical coordinate
|
protected void |
cursorMoved()
Handles a change to the cursor position.
|
void |
destroy()
Destroy this class
|
protected visad.ScalarMap |
getAltitudeMap()
Accessor method for the vertical coordinate ScalarMap (i.e., what
getDisplayAltitudeType is mapped from).
|
visad.Real |
getCursorBearing()
Gets the cursor bearing from center property.
|
visad.Real |
getCursorRange()
Gets the cursor range from center property.
|
visad.DisplayRealType |
getDisplayAltitudeType()
Accessor method for the DisplayAltitudeType (i.e., what
RealType.Altitude is mapped to).
|
visad.CoordinateSystem |
getDisplayCoordinateSystem()
Get the display coordinate system that turns lat/lon/alt to
x/y/z
|
visad.DisplayRealType |
getDisplayLatitudeType()
Accessor method for the DisplayLatitudeType (i.e., what
RealType.Latitude is mapped to).
|
visad.DisplayRealType |
getDisplayLongitudeType()
Accessor method for the DisplayLongitudeType (i.e., what
RealType.Longitude is mapped to).
|
visad.georef.EarthLocation |
getEarthLocation(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Get the earth location from the VisAD xyz coodinates
|
static MapProjectionDisplay |
getInstance(int mode)
Get an instance of a MapProjectionDisplay using the mode specified
and the default projection.
|
static MapProjectionDisplay |
getInstance(visad.georef.MapProjection p,
int mode)
Get an instance of a MapProjectionDisplay using the mode specified
and the MapProjection.
|
static MapProjectionDisplay |
getInstance(visad.georef.MapProjection p,
int mode,
boolean offscreen,
java.awt.Dimension dimension)
Get an instance of a MapProjectionDisplay using the mode specified
and the MapProjection.
|
static MapProjectionDisplay |
getInstance(visad.georef.MapProjection p,
int mode,
boolean offscreen,
java.awt.Dimension dimension,
java.awt.GraphicsDevice screen)
Get an instance of a MapProjectionDisplay using the mode specified
and the MapProjection.
|
LatLonAxisScaleInfo |
getLatScaleInfo()
Gets the lat scale info.
|
LatLonAxisScaleInfo |
getLonScaleInfo()
Gets the lon scale info.
|
visad.georef.MapProjection |
getMapProjection()
Get the MapProjection that defines the xy mapping of this
MapProjectionDisplay.
|
visad.RealTuple |
getSpatialCoordinates(visad.georef.EarthLocation el)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
double[] |
getSpatialCoordinates(visad.georef.EarthLocation el,
double[] xyz,
double altitude)
Returns the spatial (XYZ) coordinates of the particular EarthLocation
|
double[] |
getVerticalRange()
Get the range of the vertical coordinate (Altitude)
|
VertScaleInfo |
getVertScaleInfo()
Gets the vertical scale info.
|
protected void |
init(visad.georef.MapProjection projection,
visad.DisplayImpl display)
Initializes an instance with the specified MapProjection
CoordinateSystem and display.
|
protected void |
initializeClass()
Set up the display.
|
static void |
main(java.lang.String[] args)
test by running java ucar.unidata.view.geoloc.MapProjectionDisplay
|
protected static visad.georef.MapProjection |
makeDefaultMapProjection()
Make the default projection.
|
protected void |
pointerMoved(int x,
int y)
Handles a change in the position of the mouse-pointer.
|
void |
removeVerticalMap(visad.RealType vertType)
Remove a new mapping of this type to the vertical coordinate
|
float[] |
scaleVerticalValues(float[] altValues)
Scale vertical values using the range of the vertical
scalar map.
|
protected void |
setCursorBearing(visad.Real bearing)
Sets the cursor bearing (degrees) from center property.
|
protected void |
setCursorRange(visad.Real range)
Sets the cursor range from center property.
|
void |
setLatScaleInfo(LatLonAxisScaleInfo axisScaleInfo)
Sets the lat scale info.
|
void |
setLonScaleInfo(LatLonAxisScaleInfo axisScaleInfo)
Sets the lon scale info.
|
void |
setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea)
Set the map area from the projection rectangle
|
void |
setMapProjection(visad.georef.MapProjection mapProjection)
Define the map projection using a MapProjection type CoordinateSystem
|
void |
setMapProjection(visad.georef.MapProjection mapProjection,
boolean resetDisplayProjMatrix)
Define the map projection using a MapProjection type CoordinateSystem
|
void |
setMapProjection(ucar.unidata.geoloc.ProjectionImpl projection)
Define the map projection using a Projection interface
|
void |
setMapRegion(visad.Gridded2DSet region)
Set the map region to be displayed.
|
void |
setVerticalRange(double min,
double max)
Set the range of the vertical coordinate
|
void |
setVerticalRangeUnit(visad.Unit newUnit)
Set the Unit of the vertical range
|
void |
setVertScaleInfo(VertScaleInfo vertScaleInfo)
Sets the vertical scale info.
|
void |
setView(int view)
Set the view for 3D.
|
protected void |
updateLocation(visad.georef.EarthLocation el)
Update lat/lon/alt properties with the EarthLocation.
|
animateMatrix, animateMatrix, animateMatrix, animateMatrix, applyRotation, center, center, center, center, centerAndZoom, centerAndZoom, enableClipping, enableRubberBanding, getAnimationStringOn, getAutoRotate, getBottomViewName, getBoxVisible, getCenterPoint, getClipDistanceBack, getClipDistanceFront, getCursorAltitude, getCursorLatitude, getCursorLongitude, getDisplayMode, getEarthLocation, getEarthLocation, getEarthLocation, getEastViewName, getIsAnimating, getLatLonBox, getLatLonBox, getLatLonRect, getNavigationToolBar, getNavigationToolBar, getNorthViewName, getRay, getRayDirection, getRayPositionAtZ, getRotation, getRubberBandBox, getScaledValue, getScalesVisible, getScreenCenter, getScreenCenterBottom, getScreenCenterLeft, getScreenCenterRight, getScreenCenterTop, getScreenCoordinates, getScreenCoordinates, getScreenLowerLeft, getScreenLowerRight, getScreenSidesCoordinates, getScreenUpperLeft, getScreenUpperRight, getSouthViewName, getSpatialCoordinates, getSpatialCoordinatesFromScreen, getSpatialCoordinatesFromScreen, getTopViewName, getVerticalRangeUnit, getVerticalRangeVisible, getView, getVisadBox, getWestViewName, init, isClippingEnabled, isPerspectiveView, moveToScreen, moveToScreen, moveToScreen, resetClipDistance, resetScaleTranslate, rotateFaster, rotateSlower, rotateView, rotateView, screenToEarthLocation, setAnimationStringOn, setAutoRotate, setBoxVisible, setClipDistanceBack, setClipDistanceFront, setCursorAltitude, setCursorLatitude, setCursorLongitude, setCursorStringOn, setForeground, setPerspectiveView, setPolygonOffset, setPolygonOffsetFactor, setRotateDelay, setRotationMultiplierMatrix, setRubberBandBox, setScalesVisible, setVerticalMapUnit, setVerticalRangeVisible, setView
addDisplayable, addDisplayListener, addPropertyChangeListener, addPropertyChangeListener, addScalarMap, addScalarMaps, addVetoableChangeListener, addVetoableChangeListener, buildAnimationSet, dataChange, draw, ensureInactive, equals, finalize, firePropertyChange, firePropertyChange, getAnimationSetFromDisplayables, getAnimationStringVisible, getBackground, getComponent, getDestroyed, getDisplay, getDisplayableCount, getDisplayables, getDisplayables, getDisplayAspect, getDisplayComponent, getDisplayScale, getForeground, getImage, getMouseBehavior, getMouseFunctionMap, getOffscreenDimension, getProjectionMatrix, getSavedProjectionMatrix, getScale, getScreenBounds, getStereoAvailable, getWaitMessageVisible, handleMouseWheelMoved, hashCode, indexOf, init, is3D, isActive, isPointMode, printMatrix, printMe, rebuild, rebuildDisplay, reDisplayAll, removeDisplayable, removeDisplayables, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, removeScalarMaps, removeVetoableChangeListener, removeVetoableChangeListener, replaceScalarMap, reScale, resetMouseFunctions, resetProjection, rotate, rotateX, rotateY, rotateZ, saveCurrentDisplay, saveCurrentDisplay, saveCurrentDisplay, saveProjection, setActive, setAnimation, setAnimationStringVisible, setBackground, setDefaultMouseFunctions, setDisplayables, setDisplayables, setDisplayActive, setDisplayAspect, setDisplayInactive, setEyePosition, setKeyboardBehavior, setKeyboardEventMap, setKeyboardEventMap, setMouseFunctions, setOffscreenDimension, setPointMode, setProjectionMatrix, setRebuildNecessary, setWaitMessageVisible, setWheelEventMap, translate, zoom, zoom
public static final java.lang.String CURSOR_BEARING
public static final java.lang.String CURSOR_RANGE
public static boolean force2D
public static visad.RealType CURSOR_RANGE_TYPE
public static visad.RealType CURSOR_BEARING_TYPE
protected MapProjectionDisplay()
protected MapProjectionDisplay(visad.georef.MapProjection projection, visad.DisplayImpl display) throws visad.VisADException, java.rmi.RemoteException
projection
- map projection CSdisplay
- display to usevisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectprotected void init(visad.georef.MapProjection projection, visad.DisplayImpl display) throws visad.VisADException, java.rmi.RemoteException
projection
- map projection CSdisplay
- display to usevisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectprotected void initializeClass() throws visad.VisADException, java.rmi.RemoteException
initializeClass
in class NavigatedDisplay
java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic static MapProjectionDisplay getInstance(int mode) throws visad.VisADException, java.rmi.RemoteException
mode
- mode to usevisad.VisADException
- problem creating some VisAD objectjava.rmi.RemoteException
- problem creating remote objectpublic static MapProjectionDisplay getInstance(visad.georef.MapProjection p, int mode) throws visad.VisADException, java.rmi.RemoteException
mode
- mode to usep
- initial MapProjection for displayvisad.VisADException
- problem creating some VisAD objectjava.rmi.RemoteException
- problem creating remote objectpublic static MapProjectionDisplay getInstance(visad.georef.MapProjection p, int mode, boolean offscreen, java.awt.Dimension dimension) throws visad.VisADException, java.rmi.RemoteException
p
- map projectionmode
- modeoffscreen
- true if offscreendimension
- dimension of displayjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- problem creating the display or some componentpublic static MapProjectionDisplay getInstance(visad.georef.MapProjection p, int mode, boolean offscreen, java.awt.Dimension dimension, java.awt.GraphicsDevice screen) throws visad.VisADException, java.rmi.RemoteException
p
- map projectionmode
- modeoffscreen
- true if offscreendimension
- dimension of displayscreen
- screen to display it onjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- problem creating the display or some componentpublic void destroy()
destroy
in class NavigatedDisplay
public abstract void addKeyboardBehavior(visad.KeyboardBehavior behavior)
addKeyboardBehavior
in class DisplayMaster
behavior
- behavior to addpublic void addVerticalMap(visad.RealType newVertType) throws visad.VisADException, java.rmi.RemoteException
addVerticalMap
in class NavigatedDisplay
newVertType
- RealType of mapjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void removeVerticalMap(visad.RealType vertType) throws visad.VisADException, java.rmi.RemoteException
removeVerticalMap
in class NavigatedDisplay
vertType
- RealType of mapjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void setVerticalRangeUnit(visad.Unit newUnit) throws visad.VisADException, java.rmi.RemoteException
setVerticalRangeUnit
in class NavigatedDisplay
newUnit
- unit of rangejava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic void setLatScaleInfo(LatLonAxisScaleInfo axisScaleInfo) throws java.rmi.RemoteException, visad.VisADException
axisScaleInfo
- the new lat scale infojava.rmi.RemoteException
- the remote exceptionvisad.VisADException
- the vis ad exceptionpublic void setLonScaleInfo(LatLonAxisScaleInfo axisScaleInfo) throws java.rmi.RemoteException, visad.VisADException
axisScaleInfo
- the new lon scale infojava.rmi.RemoteException
- the remote exceptionvisad.VisADException
- the vis ad exceptionpublic LatLonAxisScaleInfo getLatScaleInfo()
public VertScaleInfo getVertScaleInfo()
public void setVertScaleInfo(VertScaleInfo vertScaleInfo) throws java.rmi.RemoteException, visad.VisADException
vertScaleInfo
- the new vertical scale infojava.rmi.RemoteException
- the remote exceptionvisad.VisADException
- the vis ad exceptionpublic LatLonAxisScaleInfo getLonScaleInfo()
public void setVerticalRange(double min, double max) throws visad.VisADException, java.rmi.RemoteException
setVerticalRange
in class NavigatedDisplay
min
- minimum value for vertical axismax
- maximum value for vertical axisjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic double[] getVerticalRange()
getVerticalRange
in class NavigatedDisplay
protected void setCursorRange(visad.Real range) throws visad.VisADException, java.rmi.RemoteException
range
- The cursor range from center.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic visad.Real getCursorRange()
null
.protected void setCursorBearing(visad.Real bearing) throws visad.VisADException, java.rmi.RemoteException
bearing
- The cursor bearing from center.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problempublic visad.Real getCursorBearing()
null
.public void setView(int view)
NORTH _________ W | | E E | TOP | A S | | S T |_______| T SOUTH
setView
in class NavigatedDisplay
view
- one of the static view fields (NORTH_VIEW, SOUTH_VIEW, ..
etc).public visad.DisplayRealType getDisplayLatitudeType()
getDisplayLatitudeType
in class NavigatedDisplay
public visad.DisplayRealType getDisplayLongitudeType()
getDisplayLongitudeType
in class NavigatedDisplay
public visad.DisplayRealType getDisplayAltitudeType()
getDisplayAltitudeType
in class NavigatedDisplay
protected visad.ScalarMap getAltitudeMap()
getAltitudeMap
in class NavigatedDisplay
public void setMapProjection(ucar.unidata.geoloc.ProjectionImpl projection) throws visad.VisADException, java.rmi.RemoteException
setMapProjection
in class NavigatedDisplay
projection
- Projection to usevisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectpublic void setMapProjection(visad.georef.MapProjection mapProjection) throws visad.VisADException, java.rmi.RemoteException
setMapProjection
in class NavigatedDisplay
mapProjection
- map projection coordinate systemvisad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectpublic void setMapProjection(visad.georef.MapProjection mapProjection, boolean resetDisplayProjMatrix) throws visad.VisADException, java.rmi.RemoteException
mapProjection
- map projection coordinate systemresetDisplayProjMatrix
- yes/no change the current VisAD Display projection matrix
when the map projection is changed.visad.VisADException
- Couldn't create necessary VisAD objectjava.rmi.RemoteException
- Couldn't create a remote objectpublic visad.georef.MapProjection getMapProjection()
public void setMapArea(ucar.unidata.geoloc.ProjectionRect mapArea) throws visad.VisADException, java.rmi.RemoteException
setMapArea
in class NavigatedDisplay
mapArea
- map area as lat/lon linesjava.rmi.RemoteException
- problem setting remote datavisad.VisADException
- problem creating VisAD data objectpublic void setMapRegion(visad.Gridded2DSet region) throws visad.VisADException, java.rmi.RemoteException
region
- Gridded2DSet containing the range of for the axis.visad.VisADException
- invalid domain or null setjava.rmi.RemoteException
- Couldn't create a remote objectpublic float[] scaleVerticalValues(float[] altValues)
altValues
- altitude map valuesprotected void cursorMoved() throws visad.VisADException, java.rmi.RemoteException
cursorMoved
in class NavigatedDisplay
visad.VisADException
- VisAD failure.java.rmi.RemoteException
- Java RMI failure.protected void updateLocation(visad.georef.EarthLocation el) throws visad.VisADException, java.rmi.RemoteException
updateLocation
in class NavigatedDisplay
el
- EarthLocation to use.java.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problemprotected void pointerMoved(int x, int y) throws visad.UnitException, visad.VisADException, java.rmi.RemoteException
pointerMoved
in class NavigatedDisplay
x
- x mouse positiony
- y mouse positionjava.rmi.RemoteException
- Java RMI problemvisad.UnitException
- Unit conversion problemvisad.VisADException
- VisAD problempublic visad.georef.EarthLocation getEarthLocation(double x, double y, double z, boolean setZToZeroIfOverhead)
getEarthLocation
in class NavigatedDisplay
x
- xy
- yz
- zsetZToZeroIfOverhead
- If in the overhead view then set Z to 0public visad.RealTuple getSpatialCoordinates(visad.georef.EarthLocation el)
getSpatialCoordinates
in class NavigatedDisplay
el
- earth location to transformpublic double[] getSpatialCoordinates(visad.georef.EarthLocation el, double[] xyz, double altitude) throws visad.VisADException, java.rmi.RemoteException
getSpatialCoordinates
in class NavigatedDisplay
el
- earth location to transformxyz
- The in value to set. May be null.altitude
- altitude valuejava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problemprotected static visad.georef.MapProjection makeDefaultMapProjection() throws visad.VisADException
visad.VisADException
- couldn't create MapProjectionpublic visad.CoordinateSystem getDisplayCoordinateSystem()
getDisplayCoordinateSystem
in class NavigatedDisplay
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- include an argument for a 3D displayjava.lang.Exception
- problem creating the display