[gdal-dev] Which Proj.4 transforms are available in GDAL?

Andre Joost andre+joost at nurfuerspam.de
Tue Sep 5 07:33:40 PDT 2017


Am 01.09.2017 um 21:05 schrieb Even Rouault:
> On vendredi 1 septembre 2017 20:42:34 CEST Andre Joost wrote:
>> Am 01.09.2017 um 20:14 schrieb Even Rouault:
>>>> ogr2ogr -s_srs EPSG:4326 -t_srs "+proj=lcc +lat_1=13.31666666666667
>>>> +lat_2=14.25 +lat_0=13.783333 +lon_0=-89 +x_0=500000 +y_0=295809.184
>>>> +k_0=0.99996704 +ellps=clrk66 +units=m +no_defs
>>>> +towgs84=0,125,194,0,0,0,0 +wktext" LimitesNAD27.shp dptoA_WGS_1984.shp
>>>> gdalsrsinfo LimitesNAD27.prj >>out.txt
>>>>
>>>> neither saves towgs84 or wktext
>>>
>>> Yes, a .prj file contains a ESRI flavour of WKT, which supports neither
>>> TOWGS84 or EXTENSION, so they get stripped.
>>
>
> And more importantly the original EPSG code is also missing in ESRI WKT.
>
>> So how is a datum shift outside of the EPSG code world supposed to be
>> applied to a shapefile with ogr2ogr?
>
> You have to override the source SRS with -s_srs EPSG:XXXX if you know the code. One could
> potentially improve the situation by trying to match the .prj CRS name with the entries in the
> EPSG database to try recovering which code the ESRI WKT corresponds too (if there's a
> match)
>

The problem is that there is no EPSG code for the projection, and NAD27 
datum is handled badly outside the US and Canada. The country in 
question is El Salvador, where they adopted NAD27, but it's not part of 
the NAD27 datum shift files. EPSG suggests a Ocotepeque datum, which is 
shifted to NAD27.

greetings,
André Joost




More information about the gdal-dev mailing list