2017 © Pedro Peláez
 

library osmaths

conversations around the coordinate systems used for Ordnance Survey Open Data only

image

jmbtechnologylimited/osmaths

conversations around the coordinate systems used for Ordnance Survey Open Data only

  • Sunday, April 15, 2018
  • by jarofgreen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,068 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

OSMaths

This is a PHP library for doing the conversations around the coordinate systems used for Ordnance Survey Open Data only., (*1)

Most of the Open Data comes in Easting/Northing. It needs converting to Latitude and Longitude. Further more, this is in OSGB36, and you probably want your Lat/Lng in WGS84, which is the same projection Open Street Map and Google Maps use., (*2)

I am not an expert in mapping systems. I cobbled this together from other sources based on my needs. I would love to retire it if someone else has a PHP library that does this with a permissive license., (*3)

Install via Composer

https://packagist.org/packages/jmbtechnologylimited/osmaths, (*4)

composer require jmbtechnologylimited/osmaths

Use

$en = new EastingNorthing($inEasting, $inNorthing);
$latlng = $en->toLatLngOSGB36()->toLatLngWGS84();
print $latlng->getLat();
print $latlng->getLng();

Code Standards

Every object is immutable, so you can pass around data objects without worrying they will be changed., (*5)

License

BSD License, (*6)

Note this software does not contain any actual data from the Ordnance Survey. You must get that yourself, and agree to their license to., (*7)

Sources and References that have been helpful

  • https://www.ordnancesurvey.co.uk/business-and-government/products/opendata-products.html
  • https://www.ordnancesurvey.co.uk/docs/support/guide-coordinate-systems-great-britain.pdf
  • http://www.movable-type.co.uk/scripts/latlong-gridref.html

The Versions

15/04 2018

dev-master

9999999-dev https://github.com/JMB-Technology-Limited/OSMaths

conversations around the coordinate systems used for Ordnance Survey Open Data only

  Sources   Download

BSD BSD-3-Clause

The Requires

  • php >=5.6.0

 

09/07 2016

v1.0.0

1.0.0.0 https://github.com/JMB-Technology-Limited/OSMaths

conversations around the coordinate systems used for Ordnance Survey Open Data only

  Sources   Download

BSD

The Requires

  • php >=5.3.0