I am trying to convert some points from NAD27 Lambert Conformal Conic (custom projection) to WGS84 using QGIS 2.8.9. I am using the datum transformation parameters for El Salvador published here: http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf

I have created a custom projection using the following proj4 string:

+proj=lcc +lat_1=13.31666666 +lat_2=14.25 +lat_0=13.78333333333333 +lon_0=-89 +x_0=500000 +y_0=295809.184 +k_0=0.999967040 +datum=NAD27 +ellps=clrk66 +units=m +no_defs +towgs84=0,125,194,0,0,0,0

It seems the +towgs84 parameters are not being applied. If I drop the +datum=NAD27 it seems it works. I have seen this suggestion in On the fly transformation From WGS84 to NAD27 with proj4 code, but I don't understand why it works. According to this in Reprojecting between NAD27 and WGS 84 part III, the +datum=nad27 parameter overrides the +towgs84 parameter, so I can use only one of them.

So my question is, can I specify a datum and some transformation parameters to WGS84 in proj4, or I just need to specify the ellipsoid? (Although it's an ellipsoid, not a datum)


You are right that the +datum=nad27 overrides the +towgs84 parameters, but only in that part of the world that is covered by the nad27 transformation grid.

El Salvador is one of the countries in Central America, that has adopted the North American Datum, but is not covered by the grid.

You can load the conus file used for the NAD27 transformation (located in proj/share) into QGIS, and read the extent:

enter image description here

Outside of the coloured area, all shift parameters are set to null. Proj.4 does not see that bound, hence it uses neither the grid nor the +towgs84 in your case.

So you have to add the ellipsoid manually, instead of +datum=nad27.

  • 2
    I would leave your proj4 code as +proj=lcc +lat_1=13.31666666 +lat_2=14.25 +lat_0=13.78333333333333 +lon_0=-89 +x_0=500000 +y_0=295809.184 +k_0=0.999967040 +ellps=clrk66 +units=m +no_defs +towgs84=0,125,194,0,0,0,0 May 9 '16 at 15:56
  • Thanks AndreJ and @Gerardo Jimenez. It seems I have to specify the ellipsoid and not the datum, but a datum it's different from an ellipsoid. Is this covered in the transformation parameters? I think it's more of a proj4 problem for me, the transformation is not so straightforward outside of the grid you mention. It also seems that I need to define a new CRS for all of my shapefiles created in ArcGIS that I want to transform to WS84, because in the .prj file the datum NAD27 is specified. Am I right?
    – Ernesto561
    May 10 '16 at 12:50
  • 1
    The +datum=nad27 is expanded internally as ellipsoid and conus grid file. You only can use the first one, and need the +towgs84 parameter instead of the second. ARCGIS handles datum shifts differently, so you are better off with a custom CRS. But always check that QGIS uses that, and not the standard EPSG code.
    – AndreJ
    May 10 '16 at 13:32
  • 1
    You always specify to WGS84. The software knows what to do for the inverse calculation.
    – AndreJ
    May 11 '16 at 15:59
  • 1
    You must leave the signs +towgs84=0,125,194,0,0,0,0 May 11 '16 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.