Package ucar.visad.display
Class FrontDrawer
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.FrontDrawer
FrontDrawer is the VisAD class for manipulation of fronts. Is was originally
taken from the class visad.bom.FrontDrawer
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
default base scalestatic final String[]
base type to usestatic final String[]
labels for typesstatic final String
identifier for cold frontstatic final String
identifier for convergencestatic final String
identifier for dry linestatic final String
identifier for frontogenesisstatic final String
identifier for frontolysisstatic final String
identifier for isothermsstatic final String
identifier for lifted indexstatic final String
identifier for low level jetstatic final String
identifier for lower level thermal troughstatic final String
identifier for moisturestatic final String
identifier for occluded frontstatic final String
identifier for ridgestatic final String
identifier for stationary frontstatic final String
identifier for thickness ridgestatic final String
identifier for total-totalsstatic final String
identifier for troughstatic final String
identifier for uneven low level jetstatic final String
identifier for upper cold frontstatic final String
identifier for upper level jetstatic final String
identifier for upper level thermal troughstatic final String
identifier for upper warm frontstatic final String
identifier for warm frontstatic final String
identifier for wave linestatic final String[]
all typesFields inherited from class ucar.visad.display.DisplayableData
LINE_WIDTH, MANIPULABLE, renderer, VISIBLE
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
-
Constructor Summary
ConstructorsConstructorDescriptionFrontDrawer
(int fw, String frontType) Create a front drawer with the front typeFrontDrawer
(int fw, String frontType, boolean doColors) Create a front drawer with the front typeFrontDrawer
(FrontDrawer that) Create a front drawer from another instance -
Method Summary
Modifier and TypeMethodDescriptionClone for displaystatic float
curveLength
(float[][] curve, float[] seg_length) Get the curve length; assumes curve is float[2][len] and seg_length is float[len-1]boolean
Get the FlipTheFlip property.static String
Get the label for the typevoid
Initialize the lat/lon scalar mapsmakeFront
(float[][] curve_samples) Make the frontstatic float[][]
resample_curve
(float[][] curve, float increment) Resample curve into segments approximately increment in lengthrobustCurveToFront
(float[][] curve, boolean flip) Robustly make a curve to a frontvoid
Sets the color of the lines for this Displayable.void
Set the curveprotected void
setDisplayMaster
(DisplayMaster master) Set the display mastervoid
setFlipTheFlip
(boolean value) Set the FlipTheFlip property.void
setFrontType
(String type) Set the front typevoid
setLineWidth
(float lineWidth) Set the line widthvoid
setScale
(double baseScale) Set the scalestatic float[][]
smooth_curve
(float[][] curve, int window) Smooth the curveMethods inherited from class ucar.visad.display.DisplayableData
addAction, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setPointSize, setUseFastRendering, setVisible, showme, toString
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
-
Field Details
-
TYPE_COLD_FRONT
identifier for cold front- See Also:
-
TYPE_WARM_FRONT
identifier for warm front- See Also:
-
TYPE_OCCLUDED_FRONT
identifier for occluded front- See Also:
-
TYPE_STATIONARY_FRONT
identifier for stationary front- See Also:
-
TYPE_CONVERGENCE
identifier for convergence- See Also:
-
TYPE_FRONTOGENESIS
identifier for frontogenesis- See Also:
-
TYPE_FRONTOLYSIS
identifier for frontolysis- See Also:
-
TYPE_UPPER_COLD_FRONT
identifier for upper cold front- See Also:
-
TYPE_UPPER_WARM_FRONT
identifier for upper warm front- See Also:
-
TYPE_TROUGH
identifier for trough- See Also:
-
TYPE_RIDGE
identifier for ridge- See Also:
-
TYPE_MOISTURE
identifier for moisture- See Also:
-
TYPE_LOW_LEVEL_JET
identifier for low level jet- See Also:
-
TYPE_UPPER_LEVEL_JET
identifier for upper level jet- See Also:
-
TYPE_DRY_LINE
identifier for dry line- See Also:
-
TYPE_WAVE_LINE
identifier for wave line- See Also:
-
TYPE_TOTAL_TOTALS
identifier for total-totals- See Also:
-
TYPE_LIFTED_INDEX
identifier for lifted index- See Also:
-
TYPE_ISOTHERMS
identifier for isotherms- See Also:
-
TYPE_THICKNESS_RIDGE
identifier for thickness ridge- See Also:
-
TYPE_LOWER_THERMAL_TROUGH
identifier for lower level thermal trough- See Also:
-
TYPE_UPPER_THERMAL_TROUGH
identifier for upper level thermal trough- See Also:
-
TYPE_UNEVEN_LOW_LEVEL_JET
identifier for uneven low level jet- See Also:
-
BASETYPES
base type to use -
TYPES
all types -
LABELS
labels for types -
baseScale
public double baseScaledefault base scale
-
-
Constructor Details
-
FrontDrawer
Create a front drawer with the front type- Parameters:
fw
- window idfrontType
- front type- Throws:
RemoteException
- On badnessVisADException
- On badness
-
FrontDrawer
public FrontDrawer(int fw, String frontType, boolean doColors) throws VisADException, RemoteException Create a front drawer with the front type- Parameters:
fw
- window idfrontType
- front typedoColors
- true to use colors- Throws:
RemoteException
- On badnessVisADException
- On badness
-
FrontDrawer
Create a front drawer from another instance- Parameters:
that
- the other instance- Throws:
RemoteException
- On badnessVisADException
- On badness
-
-
Method Details
-
setColor
Sets the color of the lines for this Displayable.- Overrides:
setColor
in classDisplayable
- Parameters:
color
- color for the line.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setLineWidth
Set the line width- Overrides:
setLineWidth
in classDisplayableData
- Parameters:
lineWidth
- the line width- Throws:
RemoteException
- On badnessVisADException
- On badness
-
cloneForDisplay
Clone for display- Overrides:
cloneForDisplay
in classDisplayableData
- Returns:
- return a clone
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setScale
Set the scale- Parameters:
baseScale
- the base scale- Throws:
RemoteException
- On badnessVisADException
- On badness
-
getLabel
Get the label for the type- Parameters:
type
- the type- Returns:
- the label
-
setFrontType
Set the front type- Parameters:
type
- the type- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setDisplayMaster
Set the display master- Overrides:
setDisplayMaster
in classDisplayable
- Parameters:
master
- the display master- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setCurve
Set the curve- Parameters:
curve
- the curve coordinatescurveTimes
- the curve times- Throws:
RemoteException
- On badnessVisADException
- On badness
-
initLatLonMap
Initialize the lat/lon scalar maps- Throws:
RemoteException
- On badnessVisADException
- On badness
-
makeFront
Make the front- Parameters:
curve_samples
- the front samples (coords,rgb)- Returns:
- a FieldImpl of the front
- Throws:
RemoteException
- On badnessVisADException
- On badness
-
robustCurveToFront
Robustly make a curve to a front- Parameters:
curve
- the curveflip
- true to flip the pips- Returns:
- the resulting front as a FieldImpl
- Throws:
RemoteException
- On badness
-
smooth_curve
public static float[][] smooth_curve(float[][] curve, int window) Smooth the curve- Parameters:
curve
- the curvewindow
- the window id- Returns:
- a smoothed curve
-
resample_curve
public static float[][] resample_curve(float[][] curve, float increment) Resample curve into segments approximately increment in length- Parameters:
curve
- the curveincrement
- the increment- Returns:
- the resampled curve
-
curveLength
public static float curveLength(float[][] curve, float[] seg_length) Get the curve length; assumes curve is float[2][len] and seg_length is float[len-1]- Parameters:
curve
- the curveseg_length
- the segment lengths- Returns:
- the length of the curve
-
setFlipTheFlip
public void setFlipTheFlip(boolean value) Set the FlipTheFlip property. If true then this flips the orientation of the front- Parameters:
value
- The new value for FlipTheFlip
-
getFlipTheFlip
public boolean getFlipTheFlip()Get the FlipTheFlip property.- Returns:
- The FlipTheFlip
-