Class WindBarbSymbol

java.lang.Object
jahuwaldt.plot.PlotSymbol
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ColorWindBarbSymbol

public class WindBarbSymbol extends DirectionSymbol
A WindBarbSymbol is a PointFeatureSymbol that renders a wind barb according to the WMO rules. See:
Manual on the Global Data-Processing System, Edition 1992
https://www.wmo.int/pages/prog/www/DPS/Manual/WMO485.pdf
In Appendix II-4 "GRAPHICAL REPRESENTATION OF DATA, ANALYSES AND FORECASTS", the following description may be found concerning wind barb symbols:
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 Details

    • SPEED_KNOTS

      public static final int SPEED_KNOTS
      The speed units for knots.
      See Also:
    • SPEED_METERS_PER_SECOND

      public static final int SPEED_METERS_PER_SECOND
      The speed units for meters per second.
      See Also:
  • Constructor Details

    • WindBarbSymbol

      public WindBarbSymbol(int speedAtt, int directionAtt, int speedUnits, EarthTransform2D trans)
      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, either SPEED_KNOTS or SPEED_METERS_PER_SECOND.
      trans - the earth transform used for converting directions.
  • Method Details

    • drawVector

      public void drawVector(Graphics gc, int x, int y, double magnitude, double direction)
      Description copied from class: DirectionSymbol
      Draws a direction symbol with the specified properties.
      Specified by:
      drawVector in class DirectionSymbol
      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 class DirectionSymbol
    • getDirection

      public double getDirection()
      Description copied from class: DirectionSymbol
      Gets the direction angle of the vector feature.
      Specified by:
      getDirection in class DirectionSymbol
      Returns:
      the direction angle of the vector in radians, clockwise with respect to the graphics x-axis.
    • main

      public static void main(String[] argv) throws Exception
      Tests this class.
      Parameters:
      argv - the array of command line parameters.
      Throws:
      Exception