non-tiff (24 bit?) raster layers in 4.10

Rahkonen Jukka Jukka.Rahkonen at MMMTIKE.FI
Tue May 8 23:00:41 PDT 2007


Hi, 


-----Original Message-----
From: Attila Csipa [mailto:plists at prometheus.org.yu]
>> You can also use free demo application kdu_compress (from
>> www.kakadusoftware.com) for compressing geotiffs to jpeg2000.  It transfers
>> all the GeoTiff information inside jpeg2000 file so that also GDAL can use

>I played with this a bit and got fairly interesting results. kdu_compress did 
>work to an extent, but unfortunately gdaladdo refused to create overviews for 
>jp2 and kde_compress only kept the first image if there were multiple no 
>matter what I did, so thay wasn't too useful. Also, the gdal jpeg2000 driver 
>(jasper ? kakadu ?) was for some reason extremely slow (~1 minute to load a 
>5000x5000 file on a 3Ghz Xeon), so overviews are a must. After loosing some 
>time trying to make JPEG overviews natively via gdaladdo, gdal_translate and 
>kdu_compress, in the end I used tiffcp (it actually worked !) with -c jpeg on 
>the uncompressed .jpg.ovr files generated by gdaladdo (which are in fact 
>tiff). The end result is a 1/5 size dataset with reasonable speed and no 
>noticeable detail loss compared to the original geotiff dataset.

Jpeg2000 has enourmous number of creation options.  All compressed jpeg2000 images do not guarantee fast random access to image at different resolutions, which are usually the main needs for geospatial imagery.  Nor can all the drivers handle compressed jpeg2000 in an effective way. You'll have something to compare with if you browse your images with kdu_show browser. Just as an example, here is a parameter set for kdu_compress that should result in pretty fast browseable, in this case lossless jpeg2000 image for you. The resulting image can also be served very well over internet with JPIP server. I believe the most important parameters here are Corder=RPCL witch will help in random access, and CLevels=7 which creates 6 lower resolution levels (overviews) into the code stream. The others are more like fine tuning.  Notice, that because jpeg2000 codestreams behave progressively, building overviews do not increase filesize.  External overviews are not needed with jpeg2000, but with Mapserver they are practical because Mapserver is much faster with tiffs.  

kdu_compress -i infile.tif -o outfile.jp2 -rate - Clevels=7 Clayers=20 Creversible=yes Cycc=no Cprecincts={256,256},{128,128} Corder=RPCL Cblk={32,32} ORGgen_plt=yes ORGgen_tlm=8 ORGtparts=R -cpu 0 -mem

Sorry, but I did not understand this part totally, could you clarify a bit?

>kde_compress only kept the first image if there were multiple no 
>matter what I did

Regards,

-Jukka Rahkonen-



More information about the MapServer-users mailing list