Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#6904 closed defect (invalid)

GTIFGetProj4Defn : incomplete proj4 string for Proj4 (version>=4.6)

Reported by: giorgiomugnaini Owned by: warmerdam
Priority: normal Milestone: 1.11.6
Component: default Version: 1.10.0
Severity: blocker Keywords:


The function GTIFGetProj4Defn in geo_normalize.h/geotiff_proj4.c is not able to produce a complete and correct proj4 string.

In particular the lack of suitable code producing "+datum" is manifest examining the code.

Parameter "+datum" is mandatory for Proj version > 4.6 in case of pj_transform() requiring datum shifts. So such function cannot be fruitfully employed with pj_init().

I.e., for an UTM33 tiff the incomplete proj4 string :

+proj=utm +zone=33 +ellps=WGS84 +units=m

will be produced, whereas the correct string should be:

+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m

Change History (2)

comment:1 Changed 3 years ago by Even Rouault

Resolution: invalid
Status: newclosed

This function is indeed in the internal libgeotiff copy of GDAL, but it isn't used by GDAL (it could actually make sense not to compile this file). This should rather be raised as a libgeotiff ticket in

In GDAL world, you can use the OSRExportToProj4() function

comment:2 Changed 3 years ago by giorgiomugnaini

Libgeotiff ticket (related also to listgeo.exe)

Note: See TracTickets for help on using tickets.