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
FieldsModifier and TypeFieldDescriptionstatic final intThe speed units for knots.static final intThe speed units for meters per second.Fields inherited from class noaa.coastwatch.render.PointFeatureSymbol
feature -
Constructor Summary
ConstructorsConstructorDescriptionWindBarbSymbol(int speedAtt, int directionAtt, int speedUnits, EarthTransform2D trans) Creates a new wind barb symbol. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawVector(Graphics gc, int x, int y, double magnitude, double direction) Draws a direction symbol with the specified properties.doubleGets the direction angle of the vector feature.doubleGets the magnitude of the vector feature.static voidTests this class.Methods inherited from class noaa.coastwatch.render.DirectionSymbol
convertAngle, draw, getDirectionIsFrom, setDirectionIsFromMethods inherited from class noaa.coastwatch.render.PointFeatureSymbol
setFeatureMethods 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_KNOTSorSPEED_METERS_PER_SECOND.trans- the earth transform used for converting directions.
-
-
Method Details
-
drawVector
Description copied from class:DirectionSymbolDraws a direction symbol with the specified properties.- Specified by:
drawVectorin 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:DirectionSymbolGets the magnitude of the vector feature.- Specified by:
getMagnitudein classDirectionSymbol
-
getDirection
public double getDirection()Description copied from class:DirectionSymbolGets the direction angle of the vector feature.- Specified by:
getDirectionin 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
-