[Gdal-dev] tiff to jp2ecw

Frank Warmerdam warmerdam at pobox.com
Fri Jun 2 10:25:06 EDT 2006


Mark Overmeer wrote:
> * Mark Overmeer (mark at overmeer.net) [060529 17:18]:
> 
>> * Frank Warmerdam (warmerdam at pobox.com) [060529 14:30]:
>>>> (1) the input.tif (geotiff) contains 6 images, created with
>>>>       geotifcp [123456].tif input.tif
>>>>     however, the resulting output.jp2 contains only one image (the first)
>>> Basically GDAL treats GeoTIFF as a one-image-per-file format.
>>> If you wanted the six images treated as bands of a single image then
>>> you could use a different mechanism to merge the bands. Let me know if
>>> that was your desire.
>> Yes, that is (probably) what I need.  Six bands in one image of six images
>> in one file.... probably both work.  How can I achieve the former?
> 
> This seems to me as quite a common request: I have 9 seperate GTiff bands
> of a LandSat scene and need to repack them into three jpeg2000 files
> where equally sized bands are packed into one jpeg2000 (to be accessed
> with ERmapper)
> 
> I have tried different paths without success. Anyone with an example script?

Mark,

You can use the gdal_merge.py script to "stack" files into a multi-band
file.

eg.

gdal_merge -separate -o stack.tif band1.tif band2.tif band3.tif

The -separate tells the script to put each file into it's own band.

There is also a "Compose Dataset" tool in OpenEV (in the Image menu)
that apparently does this process, though I haven't used this myself yet.

Both are available in FWTools builds.

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    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list