[Gdal-dev] Multichannel JPEG2000 images

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Apr 12 05:03:10 EDT 2007


Lähettäjä: Frank Warmerdam [mailto:warmerdam at pobox.com]

>Rahkonen Jukka wrote:
>> Hi,
>
>>How well does GDAL support multichannel JPEG2000 images?  It seems not to
>>like if some channels have different pixel sizes, but what might happen if I
>>first convert all Landsat bands to have the same pixel size and then
>> compress all the bands to a single JP2 file.  Can I then pick out any three
>> channels I want to composite a colour image?  I would love to try this with
>> Mapserver, so that the user could easily select for example 7-4-2 of 4-3-2
>> band combinations out of the single JPEG2000 image set without a need to
>> make separate physical file sets for each combination.  Another possibility
>> might be to build JPEG2000 jpx-files with several codestreams but I think
>> that at least those are not supported, by GDAL.

>Jukka,

>There are four different JPEG2000 drivers in GDAL, but I *think* they all
>support any number of channels.  Certainly the JP2KAK driver does.  I'm
>not surprised that channels with different resolutions.

>With a 7 band/channel JPEG2000 you should be able to select any desired band
>combination with MapServer using the PROCESSING "BANDS=7,4,2" line in the
>layer.

I made a fast try and I am really surprised!  I just compressed all the bands of an Landsat scene (orthorectified, but having three different pixel sizes) without any preprocessing.  Now I can show whatever three-band combinations with Mapserver, even those with thermal- and Pan-channels together with any of the others  (pixel sizes 57, 14.25 and 28.5, respectively).  It is not very very fast at least with my current compression setttings, but processing time is also very minimal, just compress all the individual bands to one single JPEG2000 file.
 
Original set was separate tif-files zipped to a package.  File size of the zip is 290 MB, while lossless JPEG2000 file is 230 MB, quite a bit lower.  And as I said, now I have all the possible bandcombinations available without any extra work.
 
Thanks Frank for encouragement.
 
-Jukka Rahkonen-




More information about the Gdal-dev mailing list