Image Optimisation – Comparison Table

Product File Size  No. Files  Uncompressed  Optimised    Optimised+Overviews  Total Storage
OS VML Col 0.3-10MB  562  184MB      2-30MB  3.12GB
OS VML BW 1-3.5MB  562  184MB 0.3-5MB    0.3-5MB  1.05GB
OS VMD Col 0.2 – 2.2MB 80 67.2MB 0.8 – 2.2MB   1-4.5MB  231MB

There are number of things to look at in terms of optimising images for web mapping:

  1. File size and total storage required
  2. Draw performance
  3. Image quality
Product No. Tiles Tile Dimensions Draw Time Notes
OS 25k raster 80 4000×4000 GIF: 0.3-0.5s Uses external overviews (1/2, 1/4)
OS VectorMap District 80 4000×4000 GIF: 0.3-0.6s Uses external overviews (1/2, 1/4)
OS VectorMap Local 562 7874×7874 GIF: 0.5-0.7s, PNG: 1.0-1.6s GIF twice as fast as PNG

The original supplied image files were variously LZW, CCITTFAX4 and Packbits compressed resulting in minimal file sizes. However, they were not tiled internally and did not contain overviews.  Using gdal_translate and gdaladdo and various creation options the optimised output was only slightly larger than the input files.

Using MapServer and some very unscientific tailing of log files it is apparent that GIF is faster than JPEG and then PNG.  However, image quality improves from GIF to JPEG to PNG.  MapServer uses GD to process the images from the data store and save them in the output folder ready for the client to consume them.

OS 25K 1:12500 GIF
OS 25K 1:12500 GIF
OS 25K 1:12500 JPG
OS 25K 1:12500 JPG
OS 25K 1:12500 PNG
OS 25K 1:12500 PNG
OS VectorMap Local 1:3000 GIF
OS VectorMap Local 1:3000 GIF
OS VectorMap Local 1:3000 JPG
OS VectorMap Local 1:3000 JPG
OS VectorMap Local 1:3000 PNG
OS VectorMap Local 1:3000 PNG
OS VectorMap Local 1:6000 GIF
OS VectorMap Local 1:6000 GIF
OS VectorMap Local 1:6000 JPG
OS VectorMap Local 1:6000 JPG
OS VectorMap Local 1:6000 PNG
OS VectorMap Local 1:6000 PNG

Leave a Reply

Your email address will not be published. Required fields are marked *