public abstract class RotationAngle extends java.lang.Object
| Constructor and Description |
|---|
RotationAngle() |
| Modifier and Type | Method and Description |
|---|---|
static RotationAngle |
buildStaticRotation(double angle)
Always returns the fixed
angle. |
static RotationAngle |
buildStaticRotation(java.lang.String string)
Parses the rotation angle from the specified
string. |
static RotationAngle |
buildWayDirectionRotation()
Computes the angle depending on the referencing way segment, or
0 if none exists. |
abstract double |
getRotationAngle(OsmPrimitive p)
Calculates the rotation angle depending on the primitive to displayed.
|
static double |
parseCardinalRotation(java.lang.String cardinal)
Converts an angle diven in cardinal directions to radians.
|
public RotationAngle()
public abstract double getRotationAngle(OsmPrimitive p)
p - primitivepublic static RotationAngle buildStaticRotation(double angle)
angle.angle - anglepublic static RotationAngle buildStaticRotation(java.lang.String string)
string.string - angle as stringpublic static double parseCardinalRotation(java.lang.String cardinal)
n, north, ne, northeast,
e, east, se, southeast, s, south,
sw, southwest, w, west, nw, northwest.cardinal - the angle in cardinal directionspublic static RotationAngle buildWayDirectionRotation()
0 if none exists.