I have recently got some code working for geograph.co.uk project.
 
It's not polished yet, but does work:
 
(you will just need to change the class definition to remove the 'extends Conversions' which it doesn't need to function)
 
then can just be used:
 
    $conv = new ConversionsLatLong();
    list($e,$n) = $conv->wgs84_to_osgb36($lat,$long);
    list($lat,$long) = $conv->osgb36_to_wgs84($e,$n);
 
there is a utility function to convert easting/northing to grid reference but not the other way yet! (osgb36_to_gridref)
 
Barry
----- Original Message -----
Sent: Tuesday, June 14, 2005 8:05 PM
Subject: [backstage] Converting between easting/northing and long/lat

Hi Guys,
 
On the subject of maps, I was wondering if anyone has any php code to convert between OS grid references or GB OS easting / northings and longitude and lattitudes?
 
Regards,
 
Paul Maunders

Reply via email to