Skip to main content

Module coordinate

Module coordinate 

Source
Expand description

Shared latitude/longitude coordinate parsing.

Enums§

CoordinateError
Errors produced while parsing a JSON coordinate pair.

Functions§

coordinate_to_json
Convert one validated coordinate to canonical [lat,lon] JSON.
coordinates_to_json
Convert coordinates to their canonical JSON array representation.
parse_coordinate
Parse one JSON [lat,lon] pair with finite and range checks.
validate_coordinate
Validate a latitude/longitude pair parsed from a compatible string format.

Type Aliases§

Coordinate
A coordinate in API order: latitude, then longitude.