Wednesday, 30 October 2019

Converting a NAD27 Lambert Conformal Conic custom projection to WGS84 using QGIS


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)



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...