JPG speed /TIF speed
Rahkonen Jukka
Jukka.Rahkonen at MMMTIKE.FI
Mon Mar 27 00:43:09 PST 2006
________________________________
Sean Gillies wrote:
> You might look at ECW compression which is much faster and better
> quality than jpeg. But the typical advice is to simply use
> uncompressed tiffs, internally tiled with overviews:
Or why not to have a try with JPEG 2000 which is ISO standard and behaves like other wavelett based formats like ECW and MrSID? For an easy start you could try to compress for example 10 - 100 images to JPEG 2000 with compression ratio of around 1: 10 or even 1:20 and to make a tileindex for Mapserver. By the way, if you have ESRI world files, they must be named as .wld for tileindex. You should see both a rather good performance and 90 percent savings in disk space (actually more than that, if you otherwise used overviews). It will mean more computing for the server because it must decompress JPEG 2000 streams first but because of internal indexing of JPEG 2000 disk operations will be fast and difference in time needed for the whole process is not that big.
One problem is that JPEG 2000 streams can be created literally in millions of different ways, not all of them offering good spatially random access to data. Therefore I think that using some ready made application developed GIS in mind for compressing could be a good start. One alternative which should give good results is free ECW JPEG 2000 Compressor 7.0 from ER Mapper, but for sure there are others as well. You can use dgal_translate as well, but I have not used it myself and I can not suggest you any parameters. If you would like have a total control on JPEG 2000 compression you can use kdu_compress executable that can be downloaded from www.kakadusoftware.com . Because of those million of parameter combinations you might be a bit confused at the beginning but these parameters have satisfied me with lossless compression of 3-channel images of size 10000 by 10000 pixels:
kdu_compress -i input.tif -o output.jp2 -rate - Clevels=7 Clayers=27 Creversible=yes Cycc=no Cprecincts={256,256},{128,128} Corder=RPCL Cblk={32,32} ORGgen_plt=yes -cpu 0 -mem
For lossy compression "-rate 2.4" instead of "-rate -" would yield 1:10 compressed JPEG 2000 image.
It would be nice if someone, sometime would make a study about most suitable ways to perform JPEG 2000 compression for Mapserver.
Regards,
-Jukka Rahkonen-
More information about the MapServer-users
mailing list