hope you are well
I am trying to convert lat/long coordinates to OSGB36 x and y using the proj.4 library.
Has anyone else successfully done this? I need to f
Googling turns up this from Dr John Stevenson, a Manchester University Earth Science academic - who should get it right if anyone does. Here's a quote.
The problem was that going to OSGB36 requires both a projection and a datum conversion. Prior to October 2007, proj was only carrying out the projection, thus resulting in the large offset. You can check if you have the new version by running 'proj -v' or by looking at your epsg file:
cat /usr/share/proj/epsg | grep -A 1 "British National Grid"
# OSGB 1936 / British National Grid
<27700> +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000
+y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs <>
The new versions have +datum=OSGB36.
If you have an old version, you can correct it by replacing the line with:
+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000
+ellps=airy
+towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894 +units=m
+no_defs <>
A complication is that OSGB36 is slightly distorted with respect to GPS projections (such as WGS84 and ETRS89). This offset is small, and is only important for higher precision surveying. Many searches about OSGB36 offsets bring up pages relating to this. If you want to compensate for this too, you can download a nadgrid file and use it. For my data, this moved the points by about 1 m.