hcoord-1.0.0.0: Easily convert between latitude/longitude, UTM and OSGB.

Safe HaskellSafe
LanguageHaskell2010

IrishRef

Description

To represent an Irish National Grid reference.

Projection: Transverse Mercator Reference ellipsoid: Modified Airy Units: metres Origin: 53°30'N, 8°W False co-ordinates of origin: 200000m east, 250000m north

Synopsis

Documentation

data IrishRef Source #

Constructors

IrishRef 

Fields

  • easting :: Double

    The easting in metres relative to the origin of the British National Grid.

  • northing :: Double

    The northing in metres relative to the origin of the British National Grid.

  • datum :: Datum
     

mkIrishRef Source #

Arguments

:: Double

The easting in metres. Must be greater than or equal to 0.0 and less than 400000.0.

-> Double

The northing in metres. Must be greater than or equal to 0.0 and less than or equal to 500000.0.

-> Except String IrishRef

Throws an exception if either the easting or the northing are invalid.

Create a new Ordnance Survey grid reference using a given easting and northing. The easting and northing must be in metres and must be relative to the origin of the British National Grid.

mkIrishRef' Source #

Arguments

:: String

A String representing a six-figure Ordnance Survey grid reference in the form XY123456.

-> Except String IrishRef

Throws an exception if ref is not of the form XY123456.

Take a string formatted as a six-figure OS grid reference (e.g. TG514131) and create a new OSRef object that represents that grid reference. The first character must be H, N, S, O or T. The second character can be any uppercase character from A through Z excluding I.

mkIrishRef'' :: LatLng -> Except String IrishRef Source #

Create an IrishRef object from the given latitude and longitude.

toSixFigureString :: IrishRef -> String Source #

Return a String representation of this Irish grid reference using the six-figure notation in the form X123456

toLatLng Source #

Arguments

:: IrishRef 
-> Except String LatLng

To represent Irish grid reference using the Ireland 1965 datum.

Convert this Irish grid reference to a latitude/longitude pair using the Ireland 1965 datum. Note that, the LatLng object may need to be converted to the WGS84 datum depending on the application.

evalEasting Source #

Arguments

:: Double

The easting in metres. Must be greater than or equal to 0.0 and less than 400000.0.

-> Except String Double

Throws an Exception if the easting is invalid.

Validate the easting.

evalNorthing Source #

Arguments

:: Double

The northing in metres. Must be greater than or equal to 0.0 and less than or equal to 500000.0.

-> Except String Double

Throws an Exception if the northing is invalid.

Validate the northing.