[gdal-dev] Re: How to create a fake GeoTIFF for GeoJP2

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sat May 12 15:54:07 EDT 2012


Frank Warmerdam <warmerdam <at> pobox.com> writes:


> >
> > gdal_translate -srswin 0 0 1 1 original.tif to_be_embedded.tif?
> >
> > This is the gdalinfo from a geotiff that I took out from the UUID box of a
> > GeoJP2 image. It seems to be exactly just the topleft pixel of the image.
> 
> Jukka,
> 
> Yes, this should do what you need as the top left pixel of original.tif
> contains the georeferencing for your whole output image.  If you are
> actually compressing original.tif to jpeg2000 then you likely want to do:
> 
>    gdal_translate -outsize 1 1 original.tif to_be_embedded.tif
> 
> This will give you a 1x1 pixel geotiff that represents the whole area of
> the source image.

Thanks Frank, 

I believe that for correct georeferencing the pixel size must not change from
the original and therefore I will need to use -srswin 0 0 1 1 for this use case.
Now I have all that I need for a little test.

-Jukka-





More information about the gdal-dev mailing list