Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
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
- data IrishRef = IrishRef {}
- scaleFactor :: Double
- falseOriginLatitude :: Double
- falseOriginLongitude :: Double
- falseOriginEasting :: Double
- falseOriginNorthing :: Double
- mkIrishRef :: Double -> Double -> Except String IrishRef
- mkIrishRef' :: String -> Except String IrishRef
- mkIrishRef'' :: LatLng -> Except String IrishRef
- toSixFigureString :: IrishRef -> String
- toLatLng :: IrishRef -> Except String LatLng
- evalEasting :: Double -> Except String Double
- evalNorthing :: Double -> Except String Double
Documentation
scaleFactor :: Double Source #
:: 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.
:: 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
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.