[gdal-dev] Overwriting Georeferencing Information of a GeoTIFF file

Benoît Andrieu bea at ixsea.com
Tue May 5 08:31:14 EDT 2009


Hi,

Some times ago, I tried to update the georeferencing information by code but it didn't seem to work.
My solution was to first destroy the informations by using gdal_translate with -co PROFILE=BASELINE
Then to use the new Tiff with a prj file to have a GTiff

PROFILE=[GDALGeoTIFF/GeoTIFF/BASELINE]: Control what non-baseline tags are emitted by GDAL.

    * With GDALGeoTIFF (the default) various GDAL custom tags may be written.
    * With GeoTIFF only GeoTIFF tags will be added to the baseline.
    * With BASELINE no GDAL or GeoTIFF tags will be written. BASELINE is occationally useful when writing files to be read by 
applications intolerant of unrecognised tags.

There could be some better way...

Regards,

Benoît Andrieu
bea at ixsea.com
benoit.andrieu at gmail.com

----- Original Message ----- 
From: "Andreas Neumann" <a.neumann at carto.net>
To: <gdal-dev at lists.osgeo.org>
Sent: Tuesday, May 05, 2009 1:53 PM
Subject: [gdal-dev] Overwriting Georeferencing Information of a GeoTIFF file


> Hi GDAL users/developers,
>
> Is it possible to overwrite georeferencing information of an existing
> geotiff file? For some reasons, some of the files I received have
> georeferencing information in Millimeters instead of Meters. All of my
> data uses meters as units.
>
> I thought that maybe it is possible to create a tfw file and modify the
> tfw file, but since the tiff file also has the original georeferencing
> information in millimeters, the internal georeferencing still takes
> precedence over the external tfw file. Is there some way to force gdal to
> prefer the tfw file?
>
> If not - what else could I do? Write different projection files?
>
> Actually, I don't want to modify the rasters at all, just the
> georeferencing information.
>
> Thanks for any hints,
> Andreas
>
>
> -- 
> Andreas Neumann
> http://www.carto.net/neumann/
> http://www.svgopen.org/
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev 



More information about the gdal-dev mailing list