With coverages you can define areas where data is available or where data you are interested in is. MapProxy supports coverages for sources and in the mapproxy-seed tool. Refer to the corresponding section in the documentation.
There are three different ways to describe a coverage.
If you want to use polygons to define a coverage, instead of simple bounding boxes, you will also need Shapely and GEOS. For loading polygons from shapefiles you’ll also need GDAL/OGR.
MapProxy requires Shapely 1.2.0 or later and GEOS 3.1.0 or later.
On Debian:
sudo aptitude install libgeos-dev libgdal-dev
pip install Shapely
All coverages are configured by defining the source of the coverage and the SRS. The configuration of the coverage depends on the type. The SRS can allways be configured with the srs option.
New in version 1.5.0: MapProxy can autodetect the type of the coverage. You can now use coverage instead of the bbox, polygons or ogr_datasource option. The old options are still supported.
For simple box coverages.
Text files with one WKT polygon or multi-polygon per line. You can create your own files or use one of the files we provide for every country. Read the index to find your country.
Any polygon datasource that is supported by OGR (e.g. Shapefile, GeoJSON, PostGIS).
Use the coverage option to define a coverage for a WMS or tile source.
sources:
mywms:
type: wms
req:
url: http://example.com/service?
layers: base
coverage:
bbox: [5, 50, 10, 55]
srs: 'EPSG:4326'
To define a seed-area in the seed.yaml, add the coverage directly to the view.
coverages:
germany:
datasource: 'shps/world_boundaries_m.shp'
where: 'CNTRY_NAME = "Germany"'
srs: 'EPSG:900913'
Here is the same example with a PostGIS source:
coverages:
germany:
datasource: "PG: dbname='db' host='host' user='user'
password='password'"
where: "select * from coverages where country='germany'"
srs: 'EPSG:900913'
And here is an example with a GeoJSON source:
coverages:
germany:
datasource: 'boundary.geojson'
srs: 'EPSG:4326'
See the OGR driver list for all supported formats.