# [Proj] OSGB36 to wgs84 decimal

Frank Warmerdam warmerdam at pobox.com
Tue Mar 21 11:55:02 EST 2006

```Philipp H. Mohr wrote:
>> I would also encourage you to be more specific about axis direction.
>> I first assumed you expected the output near 51E, 1N and fairly quickly
>> realized that was crazy for the UK national grid.  But of course you
>> meant 1E, 51N.
>
> Ok, I agree, wasn't sure which way around is the standard - now I know :-)

Phil,

Well, for lat/long values there are various practices, so it is really
helpful to actually append NS and EW indicators to the values.  For
projected coordinates (easting,northing) is by far the most common,
but it doesn't hurt to indicate axis direction there either.

>> But even more perversely you reversed the easting and northing which
>> isn't so obvious from the raw values.  I only determined this by
>> trying them the other way around.   I get:
>>
>>
>> cs2cs +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +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 +to +proj=latlong +ellps=WGS84 +towgs84=0,0,0 +nodefs
>> 615597.12638647 158427.13145307                   (input)
>> 1d5'25.031"E    51d17'2.982"N 44.150              (output)
>>
>> This is reasonably close to your target location but still off by
>> a more than a second.  (BTW your location in DMS is 1d3'59.772"E, 51d17'47.292"N)
>>
>> Is this the difference you are concerned about?
>
>
> I would like to get an accurate conversion which outputs the wgs84
> co-ordinates in decimal degree and not in degree minutes and seconds.

You can use the -f parameter to specify output formatting.

eg.

cs2cs -f '%.8f' +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 +to +proj=latlong +ellps=WGS84 +towgs84=0,0,0 +nodefs
615597.12638647 158427.13145307
1.09028724      51.28416240 44.15014616

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org

```