Package noaa.coastwatch.render
Class WindBarbSymbol
java.lang.Object
jahuwaldt.plot.PlotSymbol
noaa.coastwatch.render.PointFeatureSymbol
noaa.coastwatch.render.DirectionSymbol
noaa.coastwatch.render.WindBarbSymbol
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ColorWindBarbSymbol
A
WindBarbSymbol
is a PointFeatureSymbol
that renders a wind barb according to the WMO rules. See:
Manual on the Global Data-Processing System, Edition 1992In Appendix II-4 "GRAPHICAL REPRESENTATION OF DATA, ANALYSES AND FORECASTS", the following description may be found concerning wind barb symbols:
https://www.wmo.int/pages/prog/www/DPS/Manual/WMO485.pdf
ddff: True direction, in tens of degrees, from which wind is blowing (dd) and wind speed in units indicated by iw (ff).
Wind is represented by barbs and solid pennants in black, the full barbs representing 5 m s-1 or 10 knots, the half barbs representing 2.5 m s-1 or 5 knots and the solid pennant representing 25 m s-1 or 50 knots.
The wind shaft in black is directed along the axis of the wind towards the centre of the station circle and stops at its circumference.
All pennants and barbs lie to the left of the wind shaft in the northern hemisphere and to the right of the wind shaft in the southern hemisphere.
Barbs are at an angle of approximately 120° from the wind shaft. Pennants are triangles with their bases on the wind shaft.
A calm should be indicated by a circle drawn around the station circle: (diagram of two concentric circles).
Missing wind speed should be indicated by placing an "x" at the end of the wind shaft in lieu of the wind barbs. Wind direction is indicated in the usual manner, e.g. x---o. When the wind direction is missing, no wind should be plotted.
- Since:
- 3.2.0
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The speed units for knots.static final int
The speed units for meters per second.Fields inherited from class noaa.coastwatch.render.PointFeatureSymbol
feature
-
Constructor Summary
ConstructorDescriptionWindBarbSymbol
(int speedAtt, int directionAtt, int speedUnits, EarthTransform2D trans) Creates a new wind barb symbol. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawVector
(Graphics gc, int x, int y, double magnitude, double direction) Draws a direction symbol with the specified properties.double
Gets the direction angle of the vector feature.double
Gets the magnitude of the vector feature.static void
Tests this class.Methods inherited from class noaa.coastwatch.render.DirectionSymbol
convertAngle, draw, getDirectionIsFrom, setDirectionIsFrom
Methods inherited from class noaa.coastwatch.render.PointFeatureSymbol
setFeature
Methods inherited from class jahuwaldt.plot.PlotSymbol
clone, getBorderColor, getFillColor, getSize, setBorderColor, setFillColor, setSize
-
Field Details
-
SPEED_KNOTS
public static final int SPEED_KNOTSThe speed units for knots.- See Also:
-
SPEED_METERS_PER_SECOND
public static final int SPEED_METERS_PER_SECONDThe speed units for meters per second.- See Also:
-
-
Constructor Details
-
WindBarbSymbol
Creates a new wind barb symbol.- Parameters:
speedAtt
- the feature attribute for wind speed.directionAtt
- the feature attribute for wind direction.speedUnits
- the units of speed, eitherSPEED_KNOTS
orSPEED_METERS_PER_SECOND
.trans
- the earth transform used for converting directions.
-
-
Method Details
-
drawVector
Description copied from class:DirectionSymbol
Draws a direction symbol with the specified properties.- Specified by:
drawVector
in classDirectionSymbol
- Parameters:
gc
- the graphics context for drawing.x
- the x position of the base.y
- the y position of the base.magnitude
- the magnitude of the vector.direction
- the direction angle of the vector in radians, clockwise with respect to the graphics x-axis.
-
getMagnitude
public double getMagnitude()Description copied from class:DirectionSymbol
Gets the magnitude of the vector feature.- Specified by:
getMagnitude
in classDirectionSymbol
-
getDirection
public double getDirection()Description copied from class:DirectionSymbol
Gets the direction angle of the vector feature.- Specified by:
getDirection
in classDirectionSymbol
- Returns:
- the direction angle of the vector in radians, clockwise with respect to the graphics x-axis.
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-