Copyright | (c) 2018 Cedric Liegeois |
---|---|
License | BSD3 |
Maintainer | Cedric Liegeois <ofmooseandmen@yahoo.fr> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Geodetic latitude and longitude.
Synopsis
- data LatLong
- latLong :: Angle -> Angle -> LatLong
- latLongE :: Angle -> Angle -> Either String LatLong
- latLongF :: MonadFail m => Angle -> Angle -> m LatLong
- decimalLatLong :: Double -> Double -> LatLong
- decimalLatLongE :: Double -> Double -> Either String LatLong
- decimalLatLongF :: MonadFail m => Double -> Double -> m LatLong
- readLatLong :: String -> LatLong
- readLatLongE :: String -> Either String LatLong
- readLatLongF :: MonadFail m => String -> m LatLong
- toDecimalDegrees' :: LatLong -> (Double, Double)
The LatLong
type
Horizontal position defined by its geodetic latitude and longitude.
Instances
Eq LatLong Source # | |
Read LatLong Source # | See |
Show LatLong Source # | |
ETransform LatLong Source # | |
Defined in Data.Geo.Jord.Transformation | |
NTransform LatLong Source # | |
Defined in Data.Geo.Jord.Transformation | |
ETransform (AngularPosition LatLong) Source # | |
Defined in Data.Geo.Jord.Transformation toEcef :: AngularPosition LatLong -> Earth -> EcefPosition Source # fromEcef :: EcefPosition -> Earth -> AngularPosition LatLong Source # | |
NTransform (AngularPosition LatLong) Source # | |
Smart constructors
read
readLatLong :: String -> LatLong Source #
Obtains a LatLong
from the given string formatted as either:
- DD(MM)(SS)[N|S]DDD(MM)(SS)[E|W] - e.g. 553621N0130002E or 0116S03649E or 47N122W
Angle
[N|S]Angle
[E|W] - e.g. 55°36'21''N 13°0'02''E or 11°16'S 36°49'E or 47°N 122°W
This simply calls read s :: GeoPos
so error
should be handled at the call site.
readLatLongE :: String -> Either String LatLong Source #
Same as readLatLong
but returns a Either
.
readLatLongF :: MonadFail m => String -> m LatLong Source #
Same as readLatLong
but returns a MonadFail
.