Home | Docs | Issue Tracker | FAQ | Download | |
Author: | Thomas Bonfort |
---|---|
Contact: | tbonfort at terriscope.fr |
MapCache allows you to configure how the image should be saved to a cache once it has been requested from a source. The JPEG format should mostly be used for raster imagery, whereas the PNG format is most usefull for vector based imagery where there are large uniform areas.
The JPEG format saves tiles to jpeg, you can configure the JPEG compression level (from 1 to 100) and the colorspace that should be used (rgb or ycbcr)
<format name="myjpeg" type="JPEG">
<quality>85</quality>
<photometric>ycbcr</photometric>
</format>
The PNG format creates PNG images, with optional quantization (reduction of the number of colors to create an 8bit paletted PNG)
<format name="mypng" type="PNG">
<compression>fast</compression>
<colors>256</colors>
</format>
There is a third special format which mixes JPEG and PNG compression depending on the contents of the image. This format allows to create caches for raster imagery using JPEG compression (which is more efficient) on zones with imagery data, and PNG compression (which supports trasnparency) on zones with no imagery or on a boundary between imagery and emptiness.
<format name="mymixed" type="MIXED">
<opaque>myjpeg</opaque>
<transparent>mypng</transparent>
</format>