Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. You may have to provide a customer API Key in the URL for each request, as in the case with the OS Maps API. If this were to be used directly in iShare, the key would have to be transferred to the client which could expose it to misuse.

  2. Proxying the basemap through MapProxy allows us to also query it directly with WMS which then means that it should work seamlessly with printing.

Create a cached WMS for Aerial Photography

When you have Aerial Photography (or historic mapping etc.) available as raster images (GeoTIFF or similar) it’s common to configure a MapServer mapfile to read the source data and provide access via WMS; this allows the data to be displayed in iShare Maps/GIS and also desktop clients such as QGIS or MapInfo as a base map.

It’s often desirable to improve performance and reduce server load by caching base map tiles. In the past TileCache has been used to produce a tile cache, MapProxy is now preferred over TileCache as it provides a WMS service compatible with desktop clients, support for other services such as WMTS and support for other tile sources.

Below we will take demonstrate configuring MapProxy to cache aerial photography served via MapServer as a WMS.

Configuration Overview

MapProxy uses a YAML configuration file to define the service - this file will normally be stored with the MapProxy application, for example at D:/\mapproxy/\mapproxy.yaml. Full documentation on configuring the YAML file are at: https://mapproxy.org/docs/latest/configuration.html, and a sample YAML file is attached to this page.

Configuration of MapProxy layers Adding a WMS or WMTS base map in Studio is covered in this section: BaseMaps Details .

...

  • Layers: the layers that are available in the service

  • Caches: where the cache is stored

  • Sources: the source of the data to be cached

  • Grid: the Coordinate Reference System used in the layer, and the scales/resolutions available.

...

  • the syntax and indentation shown in the example file and in the MapProxy documentation should be followed exactly in order to avoid errors

  • any errors will be recorded in the mapproxy.log file, which is normally in the same folder as the mapproxy.yaml file

  • you will need to make sure that any referenced folders are accessible by the MapProxy IIS application pool, and that the MapServer application pool has access to the source data and images

...