public class NWSMultiLine
extends java.lang.Object
implements java.io.Serializable
The first two bytes are space and '}'. The next byte is a code for the type of data to plot:
letter | color | line type | meaning |
---|---|---|---|
a | red | solid | tornado warning |
b | red | dashed | tornado watch |
c | red | double-dashed | |
d | yellow | solid | severe thunderstorm warning |
e | yellow | dashed | severe thunderstorm watch |
f | yellow | double-dashed | |
g | blue | solid | test warning |
h | blue | dashed | test watch |
i | blue | double-dashed | |
j | green | solid | |
k | green | dashed | mesoscale discussion area |
l | green | double-dashed | |
m | orange | wide solid | Aloha circle for YAAC |
n | orange | wide dashed | incomplete Aloha circle for YAAC |
The next byte indicates the type of figure:
character | meaning |
---|---|
0 | closed polygon |
1 | line segment |
The next byte indicates the scale value for the offsets relative to the record's position values.
Scale character (ascii value) = (integer(log to base 10 of the scale factor relative to .0001 degree) X 20 ) + 33
For more information, see https://www.aprs-is.net/WX/MultilineProtocol.aspx
Note that NWSMultiLine does not work for polygons and polylines spanning the International Date Line.
Modifier and Type | Field and Description |
---|---|
java.lang.Integer |
argb
Color code to override the color inferred from the
dataType field. |
char |
dataType
The extracted data type for the MultiLine polygon.
|
int[] |
lats
Array of decoded latitudes in millionths of degrees North,
|
char |
lineType
Indicates whether closed polygon or open polyline.
|
int[] |
lons
Array of decoded longitudes in millionths of degrees East.
|
char |
scale
Scale factor character.
|
Modifier | Constructor and Description |
---|---|
protected |
NWSMultiLine() |
|
NWSMultiLine(double[] lats,
double[] lons,
boolean isClosed)
Create an NWSMultiLine data structure from a set of latitude/longitude points.
|
Modifier and Type | Method and Description |
---|---|
static NWSMultiLine |
extract(PositionMessage pm,
byte[] body,
int offset)
Extract an NWSMultiLine from the specified position in a PositionMessage's comment.
|
ObjectReport |
generateMessage(java.lang.String name,
char symTableId,
char symbolCode,
java.lang.String freeText)
Create an ObjectReport containing the encoding of this NWSMultiLine.
|
boolean |
isClosed()
Test whether this is a polyline or polygon.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public char dataType
public char lineType
public char scale
public int[] lats
public int[] lons
public java.lang.Integer argb
dataType
field.
This is to make generic shape rendering accessible to YAAC extensions.protected NWSMultiLine()
public NWSMultiLine(double[] lats, double[] lons, boolean isClosed)
lats
- array of latitudes in fractional degrees Northlons
- array of longitudes in fractional degrees EastisClosed
- boolean true if this is for a closed polygon, false for open polylinepublic static NWSMultiLine extract(PositionMessage pm, byte[] body, int offset)
pm
- PositionMessage to extract reference latitude and longitude frombody
- byte array of AX.25 message bodyoffset
- starting position in body array where NWSMultiLine encoding beginspublic boolean isClosed()
public ObjectReport generateMessage(java.lang.String name, char symTableId, char symbolCode, java.lang.String freeText)
name
- name to assign to the ObjectsymTableId
- APRS symbol table ID (or overlay character) to associate with the ObjectsymbolCode
- APRS symbol code to associated with the ObjectfreeText
- free-text comment to append to the Object reportpublic java.lang.String toString()
toString
in class java.lang.Object