Last Updated:



TIFF supports the creation of “overviews” within the file, which is basically a downsampled version of the raster data suitable for use at lower resolutions. Use the “gdaladdo” program to add overviews to a TIFF, and MapServer (via GDAL) will automagically choose which downsampled layer to use. Note that overviews significantly increase the disk space required by a TIFF, and in some cases the extra disk reading may offset the performance gained by MapServer not having to resample the image. You’ll just have to try it for yourself and see how it works.

Index de tuiles et tuilage interne

Le tuilage est le plus efficace pour les cas où les requêtes couvrent seulement une très petite aire de l’image.

A tileindex is how one creates an on-the-fly mosaic from many rasters. This is described in the Index de tuiles. That document describes common cases where a tileindex makes sense. In particular, if you have a very large raster and most requests are for a very small spatial area within it, you may want t consider slicing it and tileindexing it.

As an alternative to slicing and mosaicing, TIFFs do support a concept of internal tiling. Like a tileindex, this is mostly effective when the requests are for a small portion of the raster. Internal tiling is done by adding “-co TILED=YES” to gdal_translate, e.g.:

gdal_translate -co TILED=YES original.tif tiled.tif

Formats d’image

The TIFF image format is the fastest to “decipher”, but once you get beyond a certain point, the disk reading (since TIFF is very large) may become slow enough to make it worthwhile to consider other image formats.

Pour les TIFF de tailles supérieurs à 1 GB, les images ECW tendent à être rendues plus rapidement que les TIFF, comme la décompression de de données (CPU et RAM) est plus rapide que la lecture des données non compressées (disque). La contre-partie est que le format ECW n’est pas open-source, et que la licence est souvent chère à acquérir.

Le JPEG2000 est un format d’image très lent, comme l’est le JPEG.

WMS distant

Remote WMS servers are often slow, especially the public ones such as TerraServer or NASA’s Landsat server. There’s nothing you can do about that, except to reconsider when the remote WMS layer should be used.

For example, there may be a different WMS server (or a different set of imagery, or even vector outline maps) suitable for drawing the countries or states to orient the user. You could then have the WMS layer come on at a certain scale, or have the layer always available but turned off so the user can choose when to turn it on.

Voir aussi

Données Raster