DmsFormat class abstract

A base class for formatters with methods for parsing and formatting degrees/minutes/seconds on latitude, longitude and bearing values.

Sub classes must implement parse, write, writeLat, writeLon, and writeBearing. Such classes could configure parsing and formatting parameters as they like.

This base class provides default implementations for tryParse, format, lat, lon, bearing, and compassPoint.

Implementers

Constructors

DmsFormat()
Default const constructor to allow extending this abstract class.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bearing(double deg) String
Converts a degree value deg to a String representation (deg/min/sec) of the bearing.
compassPoint(double bearing, {CardinalPrecision precision = CardinalPrecision.secondaryIntercardinal}) String
Returns the compass point for bearing on the given precision.
format(double deg, {bool twoDigitDeg = false}) String
Converts the degree value deg to a String representation (deg/min/sec).
lat(double deg) String
Converts a degree value deg to a String representation (deg/min/sec) of the latitude.
lon(double deg) String
Converts a degree value deg to a String representation (deg/min/sec) of the longitude.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String dms) double
Parses a string dms representing degrees/minutes/seconds into a numeric degree value (ie. latitude, longitude or bearing).
toString() String
A string representation of this object.
inherited
tryParse(String dms) double?
Parses a string dms representing degrees/minutes/seconds into a numeric degree value (ie. latitude, longitude or bearing).
write(StringSink buf, double deg, {bool twoDigitDeg = false}) → void
Writes the degree value deg as a String representation (deg/min/sec) to buf.
writeBearing(StringSink buf, double deg) → void
Writes a degree value deg as a String representation (deg/min/sec) of the bearing to buf.
writeLat(StringSink buf, double deg) → void
Writes a degree value deg as a String representation (deg/min/sec) of the latitude to buf.
writeLon(StringSink buf, double deg) → void
Writes a degree value deg as a String representation (deg/min/sec) of the longitude to buf.

Operators

operator ==(Object other) bool
The equality operator.
inherited