This module provides a basic data structure to represent locations as a pair of latitude/longitude variables.
Split coordinate component parts Sign is either -1 or 1 and all other components are positive
A list of (x, y) coordinates
Create location from lat/lng values
Create location from lat/lng values
Format a decimal latitude or longitude coordinate
coordToString -45.5 "N" "S" ==> "45°30'00.00\"S"Google Maps URL associated with the given location
Extract coordinate parts from float
Distance between two points, in meters.
Uses the great circle distance (https://en.wikipedia.org/wiki/Great-circle_distance)
This approximates the Earth by a sphere, which in most occasions is good enough.
Converts Coord to float
We can move points specifying variations in lat/lon Angles, Meters or in Coords
Move point east by given longitude cooordinates (in degrees, minutes, seconds, milliseconds)
Move point west by given longitude cooordinates (in degrees, minutes, seconds, milliseconds)
Move point south by given latitude cooordinates (in degrees, minutes, seconds, milliseconds)
Move point south by given latitude cooordinates (in degrees, minutes, seconds, milliseconds)
Make a chain of transformations in the given point
Each transformation is typically an operation like moveNorth (meters 5)
Return a list of partial applications.
Example: chain loc [ move (meters 60) (meters 10) , northByCoords 0 0 1 256 , westBy (Angle.degrees 180) ]
Create linear path starting at the given LatLng point
The conversion assumes the earth is locally flat, i.e., it gives good results for nearby points and poor conversions if distances are comensuarable to Earth radius.
Convert Polyline into path, taking the center point as the origin.
Convert Polyline into path
Works like pathFrom, but uses the first element of list as the origin reference
A Point with latitude/longitude coordinates