Search code examples
gisproj4jsproj

PROJ.4 library and OSGB36


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 fill the srcPrj4String and destPrj4String variables, e.g.

string srcPrj4String = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";
string destPrj4String = "+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m";

but I can't figure out the what the destPrj4String should be with OSGB36 - i know the datum should be +datum=OSGB36, but everything I try, doesn't work

Any ideas?

Many thanks in advance

leddy


Solution

  • got it:

    string srcPrj4String = "+proj=longlat +ellps=WGS84 +towgs84=0,0,0 +no_defs";
    string destPrj4String = "+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";
    

    cheers!