public class WindBarbSymbol extends DirectionSymbol
WindBarbSymbol
is a PointFeatureSymbol
that renders a wind barb according to the WMO rules in:
Manual on the Global Data-Processing System, Edition 1992
http://www.wmo.ch/web/www/DPS/Manual/WMO485.pdf
Modifier and Type | Field and Description |
---|---|
static int |
SPEED_KNOTS
The speed units for knots.
|
static int |
SPEED_METERS_PER_SECOND
The speed units for meters per second.
|
feature
Constructor and Description |
---|
WindBarbSymbol(int speedAtt,
int directionAtt,
int speedUnits,
EarthTransform2D trans)
Creates a new wind barb symbol.
|
Modifier and Type | Method and Description |
---|---|
void |
drawVector(java.awt.Graphics gc,
int x,
int y,
double magnitude,
double direction)
Draws a direction symbol with the specified properties.
|
double |
getDirection()
Gets the direction angle of the vector feature.
|
double |
getMagnitude()
Gets the magnitude of the vector feature.
|
static void |
main(java.lang.String[] argv)
Tests this class.
|
convertAngle, draw, getDirectionIsFrom, setDirectionIsFrom
setFeature
public static final int SPEED_KNOTS
public static final int SPEED_METERS_PER_SECOND
public WindBarbSymbol(int speedAtt, int directionAtt, int speedUnits, EarthTransform2D trans)
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.public void drawVector(java.awt.Graphics gc, int x, int y, double magnitude, double direction)
DirectionSymbol
drawVector
in class DirectionSymbol
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.public double getMagnitude()
DirectionSymbol
getMagnitude
in class DirectionSymbol
public double getDirection()
DirectionSymbol
getDirection
in class DirectionSymbol
public static void main(java.lang.String[] argv) throws java.lang.Exception
argv
- the array of command line parameters.java.lang.Exception