jord-2.0.0.0: Geographical Position Calculations

Copyright(c) 2020 Cedric Liegeois
LicenseBSD3
MaintainerCedric Liegeois <ofmooseandmen@yahoo.fr>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Geo.Jord.LatLong

Description

Parsers and formatter of latitudes & longitudes.

Synopsis

Documentation

isValidLatLong :: Model a => Angle -> Angle -> a -> Bool Source #

isValidLatLong lat lon m determines whether the given latitude & longitude are both valid for model m.

isValidLat :: Angle -> Bool Source #

isValidLat lat determines whether the given latitude is valid - i.e. in range [-90°, 90°].

isValidLong :: Model a => Angle -> a -> Bool Source #

isValidLong lon m determines whether the given longitude is valid for model m.

  • If longitude range is L180: in range [-180°, 180°]
  • If longitude range is L360: in range [0°, 360°]

latLongDms :: Model a => a -> ReadP (Angle, Angle) Source #

latitude and longitude reader. Formats:

  • 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

latLongDmsCompact :: Model a => a -> ReadP (Angle, Angle) Source #

reads latitude and longitude in DD(D)MMSS.

latLongDmsSymbols :: Model a => a -> ReadP (Angle, Angle) Source #

reads (latitude, longitude) from a human friendly text - see Angle.

showLatLong :: (Angle, Angle) -> String Source #

Show a (latitude, longitude) pair as DMS - e.g. 55°36'21''N,13°0'2''E.