geodetics-2.0.0: Terrestrial coordinate systems and geodetic calculations.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Geodetics.PolarStereographic

Synopsis

Documentation

data Pole Source #

Polar stereographic grids are defined for true origins at the north and south poles.

Constructors

NorthPole 
SouthPole 

Instances

Instances details
Bounded Pole Source # 
Instance details

Defined in Geodetics.PolarStereographic

Enum Pole Source # 
Instance details

Defined in Geodetics.PolarStereographic

Methods

succ :: Pole -> Pole #

pred :: Pole -> Pole #

toEnum :: Int -> Pole #

fromEnum :: Pole -> Int #

enumFrom :: Pole -> [Pole] #

enumFromThen :: Pole -> Pole -> [Pole] #

enumFromTo :: Pole -> Pole -> [Pole] #

enumFromThenTo :: Pole -> Pole -> Pole -> [Pole] #

Show Pole Source # 
Instance details

Defined in Geodetics.PolarStereographic

Methods

showsPrec :: Int -> Pole -> ShowS #

show :: Pole -> String #

showList :: [Pole] -> ShowS #

Eq Pole Source # 
Instance details

Defined in Geodetics.PolarStereographic

Methods

(==) :: Pole -> Pole -> Bool #

(/=) :: Pole -> Pole -> Bool #

Ord Pole Source # 
Instance details

Defined in Geodetics.PolarStereographic

Methods

compare :: Pole -> Pole -> Ordering #

(<) :: Pole -> Pole -> Bool #

(<=) :: Pole -> Pole -> Bool #

(>) :: Pole -> Pole -> Bool #

(>=) :: Pole -> Pole -> Bool #

max :: Pole -> Pole -> Pole #

min :: Pole -> Pole -> Pole #

data PolarStereographic e Source #

Polar Stereographic Grids

Formulae are taken from The Universal Grids: Univerersal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS) DMA Technical Manual 8358.2, Defense Mapping Agency, Fairfax, VA. https://apps.dtic.mil/sti/tr/pdf/ADA266497.pdf

When working with polar grids all directions are relative to the grid rather than the actual pole. So in the Arctic "North" on the Universal Polar Stereographic grid means towards the Bering Sea rather than towards the North Pole.

mkGridPolarStereographic Source #

Arguments

:: Ellipsoid e 
=> Pole

True origin at north or south pole.

-> e

The ellipsoid used for the projection.

-> GridOffset

Vector from true origin to the false origin.

-> Double

Scale factor.

-> PolarStereographic e 

type UpsGrid = PolarStereographic WGS84 Source #

The Universal Polar Stereographic (UPS) grids for north and south poles.

upsNorth :: UpsGrid Source #

UPS grid for the North Pole.

upsSouth :: UpsGrid Source #

UPS grid for the South Pole.

fromUpsGridReference :: Pole -> String -> Either [String] (GridPoint UpsGrid) Source #

Convert a grid reference into a UPS grid location.

There doesn't appear to be any conventional representation for polar grid references, so this is an attempt to cover as many bases as possible. It takes an Easting followed by a Northing with spaces in between. Both can have optional units of m or km, and be optionally followed by an "N" or "E" as appropriate.

The choice of pole is provided in an extra argument rather than within the string because humans will normally assume this from the context and so not provide it.

If the string cannot be parsed then one or more error messages are returned.

parseUpsGridReference :: forall s (m :: Type -> Type) u. Stream s m Char => Pole -> ParsecT s u m (GridPoint UpsGrid) Source #

toUpsGridReference Source #

Arguments

:: Maybe GridUnit

Include explicit units in the output. Nothing means meters without units.

-> Bool

Include "E" and "N" in the output.

-> Int

Digits of resolution. 0 = 1m resolution, 1 = 10m, 2 = 100m etc. (-2) = 1cm.

-> GridPoint UpsGrid 
-> String