[gdal-dev] gdal_translate
Frank Warmerdam
warmerdam at pobox.com
Wed Jan 6 15:15:25 EST 2010
Greg Coats wrote:
> image_in1.tif is a .tif without georeferencing info. image_in2.tif is a .tif with georeferencing info. What do I add to the gdal_translate command below so that the output image_out3.tif, whose pixels will be identical to the pixels in image_in1.tif, will include the georeferencing info in image_in2.tif?
> gdal_translate -ot Byte -of GTiff image_in1.tif image_out3.tif
>
Greg,
gdal_translate will not do what you want unassisted.
But you could do:
gdal_translate -of VRT image_in2.tif georef.vrt
then edit georef.vrt and change all occurances of "image_in2.tif" to
"image_in1.tif" and then do:
gdal_translate georef.vrt -ot Byte image_out.tif
I am assuming that image_in1.tif and image_in2.tif are of the same
configuration (size, number of bands, etc).
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list