0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Converts between Ordnance Survey National Grid easting-northing coordinates and GPS latitude-longitude coordinates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

NationalGrid

NationalGrid is a Ruby binding to OSTN02C, which converts between National Grid easting-northing coordinates (OSGB36) and GPS latitude-longitude coordinates (ETRS89) using the OSTN02 transformation.

Installation

Add this line to your application's Gemfile:

gem 'national_grid'

And then execute:

$ bundle

Or install it yourself as:

$ gem install national_grid

Usage

require "national_grid"

NationalGrid::EastingNorthing.new(362269.979, 169978.688, 54.467).to_latitude_longitude
# => #<NationalGrid::LatitudeLongitude:0x3ff8f955f0b4 latitude=51.427547 longitude=-2.544076 elevation=104.018>

NationalGrid::LatitudeLongitude.new(53.779110, -3.040455, 64.940).to_easting_northing
# => #<NationalGrid::EastingNorthing:0x3ff8f995f04c easting=331534.545 northing=431920.763 elevation=12.636>