# Converting from Eastings and Northings on British Ordnance Survey to WSG84

I am a software developer currently working on a project that relies heavily upon knowing if our position is within a defined region - specified as a polygon using a set of points to define a linear ring.

The points are defined using Eastings and Northings from the British Ordnance Survey OSGB36. We use a nuget (software) package called GeoUK to convert this into a WSG84 latitude and longitude using the code below:

``````public LatitudeLongitude returnLongLat(float flUKx, float flUKy) {

var cartesian = GeoUK.Convert.ToCartesian(new Airy1830(),
new BritishNationalGrid(),
new EastingNorthing(
flUKx,
flUKy));

var wgsCartesian = Transform.Osgb36ToEtrs89(cartesian);
var longlat = GeoUK.Convert.ToLatitudeLongitude(new Wgs84(), wgsCartesian);
return longlat;
}
``````

When we look at the results of this on Google Maps / Earth however, we are noticing errors in the order of up to 5 meters - usually things are a couple of metres off...

I've seen suggestions that this is a just a fact of life with this particular transformation, but that sounds like something of a cop out.

• Google Earth/Maps uses its own kind of coordinate system. Take a look here: gis.stackexchange.com/questions/28018/… Aug 16, 2017 at 8:23
• This page discusses the source of the problem (so helps you understand why it is happening) but gives a solution for ESRI software. How you resolve it in nuget I do know as I've never used that software. Aug 16, 2017 at 9:13
• There is a complex script here but does give good results movable-type.co.uk/scripts/latlong-os-gridref.html
– Mapperz
Aug 16, 2017 at 15:03
• If no datum transformation was occurring, offset should be around 119 m. 5 m sounds like it could be that one of the more inaccurate tfm is being used. Perhaps a 3 parameter one, versus the 7 parameter in the reference that @Mapperz gave. Aug 16, 2017 at 22:53