[Gdal-dev] Geotiff Key Issue

jclonts jclonts at hot.rr.com
Fri Jul 2 11:37:38 EDT 2004

Hello gdal'ers,

I am trying to use some geotiffs in Oziexplorer which were
generated/transformed by gdal.  There was some discussion on the Ozi-users
list which suggested that the geotiff produced by gdal was providing the key
"ProjFalseOriginLongGeoKey" where it should be providing the key

The gdal code I am using looks about like this:
  a = gdal.Open('a.tif')
  b = gdal.GetDriverByName('GTiff').CreateCopy( 'b.tif', a)

a.tif is a geo tiff that comes from the FAA, works properly in Oziexplorer,
and includes the key ProjNatOriginLongGeoKey.

b.tif is produced with the key ProjFalseOriginLongGeoKey, and does not work
properly in Oziexplorer (nor in some other tools according to my
Oziusers-List source, "J.G.").
I downloaded gdal 1.2.1 and changed the file 

gdal-1.2.1\frmts\gtiff\gt_wkt_srs.cpp, line 1419:

   /* jcc 7/2/04 changed from ProjFalseOriginLongGeoKey */
   GTIFKeySet(psGTIF, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1,
        poSRS->GetProjParm( SRS_PP_CENTRAL_MERIDIAN, 0.0 ) );

It then produced a geotiff which Oziexplorer was happy with.

I don't know much about this stuff but would be happy to convey any
additional info between the Lists to resolve this mis-match.

John Clonts
Temple, Texas

More information about the Gdal-dev mailing list