---
name: "mapproxy-util-autoconfig"
section: "1"
platform: "linux"
package: "mapproxy"
version: "4.0.2+dfsg-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mapproxy-util-autoconfig"
---

# mapproxy-util-autoconfig(1)

creates MapProxy and MapProxy-seeding configurations

## NAME

mapproxy-util-autoconfig - creates MapProxy and MapProxy-seeding configurations

## SYNOPSIS

FC**mapproxy-util autoconfig**F\[0\]  \[*OPTIONS*\]

## DESCRIPTION

**mapproxy-util autoconfig** creates MapProxy and MapProxy-seeding configurations based on existing WMS capabilities documents.

It creates a FCsourceF\[0\] for each available layer. The source will include a BBOX coverage from the layer extent, FClegendurlF\[0\] for legend graphics, FCfeatureinfoF\[0\] for querlyable layers, scale hints and all detected FCsupported\_srsF\[0\]. It will duplicate the layer tree to the FClayersF\[0\] section of the MapProxy configuration, including the name, title and abstract.

The tool will create a cache for each source layer and FCsupported\_srsF\[0\] if there is a grid configured in your FC**--base**F\[0\] configuration for that SRS.

The MapProxy layers will use the caches when available, otherwise they will use the source directly (cascaded WMS).

**Note**

The tool can help you to create new configations, but it can’t predict how you will use the MapProxy services. The generated configuration can be highly inefficient, especially when multiple layers with separate caches are requested at once. Please make sure you understand the configuration and check the documentation for more options that are useful for your use-cases.

## OPTIONS

- FC**--capabilities**F\[0\] *url\|filename*

  URL or filename of the WMS capabilities document. The tool will add FCREQUESTF\[0\] and FCSERVICEF\[0\] parameters to the URL as necessary.

- FC**--output**F\[0\] *filename*

  Filename for the created MapProxy configuration.

- FC**--output-seed**F\[0\] *filename*

  Filename for the created MapProxy-seeding configuration.

- FC**--force**F\[0\]

  Overwrite any existing configuration with the same output filename.

- FC**--base**F\[0\] *filename*

  Base configuration that should be included in the FC**--output**F\[0\] file with the FCbaseF\[0\] option.

- FC**--overwrite**F\[0\] *filename*, FC**--overwrite-seed**F\[0\] *filename*

  YAML configuration that overwrites configuration options before the generated configuration is written to FC**--output**F\[0\]/FC**--output-seed**F\[0\].

### EXAMPLE

Print configuration on console:

```
FC
mapproxy-util autoconfig \
    --capabilities http://osm.omniscale.net/proxy/service
      F[0]
```

Write MapProxy and MapProxy-seeding configuration to files:

```
FC
mapproxy-util autoconfig \
    --capabilities http://osm.omniscale.net/proxy/service \
    --output mapproxy.yaml \
    --output-seed seed.yaml
      F[0]
```

Write MapProxy configuration with caches for grids from FC*base.yaml*F\[0\]:

```
FC
mapproxy-util autoconfig \
    --capabilities http://osm.omniscale.net/proxy/service \
    --output mapproxy.yaml \
    --base base.yaml
      F[0]
```

## OVERWRITES

It's likely that you need to tweak the created configuration - e.g. to define another coverage, disable featureinfo, etc. You can do this by editing the output file of course, or you can modify the output by defining all changes to an overwrite file. Overwrite files are applied every time you call **mapproxy-util autoconfig**.

Overwrites are YAML files that will be merged with the created configuration file.

The overwrites are applied independently for each FCservicesF\[0\], FCsourcesF\[0\], FCcachesF\[0\] and FClayersF\[0\] section. That means, for example, that you can modify the FCsupported\_srsF\[0\] of a source and the tool will use the updated SRS list to decide which caches will be configured for that source.

### EXAMPLE

Created configuration:

```
FC
sources:
  mysource_wms:
    type: wms
    req:
        url: http://example.org
        layers: a
      F[0]
```

Overwrite file:

```
FC
sources:
  mysource_wms:
    supported_srs: ['EPSG:4326'] # add new value for mysource_wms
    req:
        layers: a,b  # overwrite existing value
        custom_param: 42  #  new value
      F[0]
```

Actual configuration written to FC**--output**F\[0\]:

```
FC
sources:
  mysource_wms:
    type: wms
    supported_srs: ['EPSG:4326']
    req:
        url: http://example.org
        layers: a,b
        custom_param: 42
      F[0]
```

### SPECIAL KEYS

There are a few special keys that you can use in your overwrite file.

- All

  The value of the FC\_\_all\_\_F\[0\] key will be merged into all dictionaries. The following overwrite will add FCsessionidF\[0\] to the FCreqF\[0\] options of all FCsourcesF\[0\]:

  ```
  FC
  sources:
    __all__:
      req:
        sessionid: 123456789
                F[0]
  ```

- Extend

  The values of keys ending with FC\_\_extend\_\_F\[0\] will be added to existing lists.

  To add another SRS for one source:

  ```
  FC
  sources:
      my_wms:
        supported_srs__extend__: ['EPSG:31467']
                F[0]
  ```

- Wildcard

  The values of keys starting or ending with three underscores (FC\_\_\_F\[0\]) will be merged with values where the key matches the suffix or prefix.

  For example, to set FClevelsF\[0\] for FCosm\_webmercatorF\[0\] and FCaerial\_webmercatorF\[0\] and to set FCrefresh\_beforeF\[0\] for FCosm\_webmercatorF\[0\] and FCosm\_utm32F\[0\]:

  ```
  FC
  seeds:
      ____webmercator:
          levels:
            from: 0
            to: 12
      osm____:
          refresh_before:
              days: 5
                F[0]
  ```
