A coordinate conversion library in elm.
{ a : Basics.Float, fi : Basics.Float }
Spheroid is represented by major Axis (a) and inverse Flattening (fi)
( Spheroid -> Projected2 -> Geographic2
, Spheroid -> Geographic2 -> Projected2
)
Projection is represented by a projection to and from geographic coordinates.
( Spheroid -> x -> Geocentric
, Spheroid -> Geocentric -> x
)
CoordinateSystem is represented a conversion to and from Geocentric coordinates.
{ x : Basics.Float
, y : Basics.Float
, z : Basics.Float
}
Geocentric is represented by x, y, and z coordinates.
{ lon : Basics.Float
, lat : Basics.Float
, h : Basics.Float
}
Geographic is represented by longitude, latitude and height coordinates.
{ lon : Basics.Float
, lat : Basics.Float
}
Geographic2 is represented by longitude and latitude coordinate.
{ east : Basics.Float
, north : Basics.Float
, h : Basics.Float
}
Projected is represented by eastern, northern and height coordinates.
{ east : Basics.Float
, north : Basics.Float
}
Projected2 is represented by eastern and northern coordinate.
convert : CoordinateSystem x -> CoordinateSystem y -> Spheroid -> x -> y
convert converts coordinates from one CoordinateSystem to another.
normalizeLongitude : Basics.Float -> Basics.Float
normalizeLongitude converts longitude coordinate into the range between 180 and -180 degrees.
geocentric : CoordinateSystem Geocentric
geocentric is a CoordinateSystem that do nothing.
geographic : CoordinateSystem Geographic
geographic is a CoordinateSystem that can convert geographic coordinates to geocentric and vice versa.
projected : Projection -> CoordinateSystem Projected
projected takes a projection and returns a CoordinateSystem.
webMercator : Projection
webMercator is a Projection that converts web mercator coordinates to geographic and vice versa.
transverseMercator : TransverseMercator -> Projection
transverseMercator is a Projection that converts transverse mercator coordinates to geographic and vice versa.