Opened 2 years ago

Closed 2 years ago

Last modified 2 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:
Cc:

Description

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 2 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 https://trac.osgeo.org/geotiff/newticket

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

comment:2 Changed 2 years ago by giorgiomugnaini

Libgeotiff ticket (related also to listgeo.exe)

https://trac.osgeo.org/geotiff/ticket/84

Note: See TracTickets for help on using tickets.