[gdal-dev] Which Proj.4 transforms are available in GDAL?
Even Rouault
even.rouault at spatialys.com
Fri Sep 1 11:14:33 PDT 2017
> This seems to work arbitrary.
Not really. GDAL is an abstraction of a lot of imperfections, so losses can happen for various
(more or less well documented) reasons each time you export & import.
>
> gdalwarp -overwrite -dstnodata 0 -s_srs EPSG:3857 -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" -of GTiff ElSalvador.png
> ElSalvadorNAD27.tif
> gdalsrsinfo ElSalvadorNAD27.tif >out.txt
>
> does not add an EXTENSION to the WKT, but preserves the TOWGS84 values
>
Yes, the GeoTIFF format isn't WKT based. So the GDAL WKT representation gets translated as
best as possible into GeoTIFF keys, which don't support EXTENSION. TOWGS84 was added as
an extra GeoTIFF key a few years ago by Frank, although not part of the original GeoTIFF
specification.
>
> 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.
>
> gdalsrsinfo "+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"
>
> adds TOWGS84 and EXTENSION.
Yes, you completely stay in GDAL realm here without import/export issues
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170901/5c8cba84/attachment.html>
More information about the gdal-dev
mailing list