Expand description
§Geographic coordinates format conversions
Reader
format types can be constructed from string slices, using relaxed
format rules. Latitude magnitudes must not exceed 90°, while longitude
magnitudes are limited to 180°. All minutes and seconds values must be less
than 60. Leading and trailing space characters are trimmed.
Writer
format types are constructed from Reader types. They are used to
display coordinates in formatted output.
§Example
Generate 50°53'39.70''N 10°57'19.23''E
from decimal input:
use coordfmt::{Decimal, DMS};
use std::str::FromStr;
println!("{}", DMS::from_reader(&Decimal::from_str("50.894361, 10.955342").unwrap()));
§Command line interface
See coordfmt(1).
Modules§
- man
- COORDFMT(1)
Structs§
- Coordinates
- Base type.
- DD
Reader
andWriter
for decimal degrees format, e.g50.894361°N 10.955342°E
.- DDM
Reader
andWriter
for degrees, decimal minutes format, e.g50°53.6617'N 10°57.3205'E
.- DMS
Reader
andWriter
for degrees, minutes, seconds format, e.g50°53'39.70''N 10°57'19.23''E
.- Decimal
Reader
andWriter
for decimal format, e.g50.894361, 10.955342
.- FL95
Reader
andWriter
for the fl95 waypoint format, e.gN 50 53.7 E 010 57.3
.- FPL
Writer
for the AIS flight plan waypoint format, e.g5054N01057E
.- ICAO
- Generic
Reader
for ICAO formatsFPL
andNOTAM
. - NOTAM
Writer
for the format used in AIS NOTAMs, e.g505342N 0105718E
.
Enums§
- Error
- Parse and format identifier errors.
Traits§
- Reader
- Parse string slice into
Coordinates
. - Writer
- Formatted output of
Reader
’sCoordinates
.
Functions§
- from_
identifier - Factory function returning a
Writer
implemention pointer for the provided format identifier and the providedReader
. - from_
str - Factory function returning a
Reader
implemention pointer for the provided string slice.