I can't really say much on the accuracy of the easting/northing to lat/long conversion, but it seems quite accurate and appears to be reversible (converting backwards and forwards doesn't introduce 'drift') - in one direction the iterative process is used.

However the conversion between osgb36 and wgs84 lat/long uses the Hermert Datum Transformation. This is typically accurate to about 7 meters across the GB mainland. If interested can dig out maps detailing the drift.

There is roughly equivalent to that as performed in a GPSr but gives slightly different results. (being optimised for small cpu usage)

There is a more detailed Datum transformation available from the OS, which promises sub cm accuracy but this is huge and cumbersome, involving a large lookup table.

Hope that helps,

Barry


----- Original Message ----- From: "Matthew Hurst" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 16, 2005 6:23 PM
Subject: Re: [backstage] Converting between easting/northing and long/lat


This is great - I have been looking for exactly the same thing to deal
with UK data.
Can you comment on the accuracy of the conversion? My understanding is that
the operation (at least as described in OS literature) is an iterative
one, so precision may
well be dependant on cpu time.

MattH

On 6/16/05, Barry Hunter <[EMAIL PROTECTED]> wrote:

I have recently got some code working for geograph.co.uk project.

It's not polished yet, but does work:
http://cvs.sourceforge.net/viewcvs.py/geograph/geograph/libs/geograph/conversionslatlong.class.php?rev=1.1&sortby=date&view=log

(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 ----- From: Paul Maunders
To: [email protected]
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