LatLong class
Immutable geographic coordinate representing a point on Earth's surface.
This class stores latitude and longitude values in decimal degrees using the WGS84 coordinate system. It provides conversion utilities for microdegrees (degrees * 10^6) and supports parsing from various string formats.
Key features:
- Immutable design for thread safety
- WGS84 coordinate system compliance
- Microdegree conversion for high-precision storage
- String parsing with multiple separator support
- Efficient equality comparison and hashing
- Implemented types
Constructors
Properties
Methods
-
getLatitude(
) → double? - Gets the latitude value in decimal degrees.
-
getLatitudeE6(
) → int - Gets the latitude value in microdegrees.
-
getLongitude(
) → double? - Gets the longitude value in decimal degrees.
-
getLongitudeE6(
) → int - Gets the longitude value in microdegrees.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Calculate the spherical distance from this LatLong to another.
override
Operators
-
operator ==(
Object other) → bool -
Calculate the Euclidean distance from this LatLong to another.
override
Static Properties
- CONVERSION_FACTOR → double
-
Conversion factor from degrees to microdegrees.
final
Static Methods
-
degreesToMicrodegrees(
double coordinate) → int - Converts a coordinate from degrees to microdegrees (degrees × 10^6).
-
fromMicroDegrees(
int latitudeE6, int longitudeE6) → LatLong - Creates a LatLong from microdegree coordinates.
-
fromString(
String latLonString) → LatLong - Parses a LatLong from a string with latitude and longitude values.