JPG speed /TIF speed

Matthew Perry perrygeo at GMAIL.COM
Sun Mar 26 13:51:00 EST 2006


On 3/26/06, Sašo Celarc <saso.celarc at hermes-plus.si> wrote:
> Does somebody has an explanation of this? My intuition says that jpeg should
> be faster.

jpegs are typically MUCH slower than tiffs because they have to be
completely decompressed before mapserver can access any pixel values.
For larger rasters, this can mean 10+ seconds of decompression just to
be able to access the data wheras the tiff can be scanned and read
immediately and efficiently.

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:

 gdal_translate  -of GTiff -co "TILED=YES" input.tif output.tif
 gdaladdo -r average output.tif 2 4 8 16 32 64 128

It takes alot of disk space but it's orders of magnitude faster.

--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net



More information about the mapserver-users mailing list