/usr/share/doc/mapproxy/html/mapproxy_util_autoconfig.html is in mapproxy-doc 1.9.0-3+deb9u1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mapproxy-util autoconfig — MapProxy 1.8.2a0 Docs</title>
<link rel="stylesheet" href="_static/basic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/mapproxy.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.8.2a0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="top" title="MapProxy 1.8.2a0 Docs" href="index.html" />
<link rel="next" title="Deployment" href="deployment.html" />
<link rel="prev" title="mapproxy-util" href="mapproxy_util.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body role="document">
<div id="navbar" class="navbar navbar-default ">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.html" class="pull-left"><img src="_static/logo.png" height="50">
</a>
<a class="navbar-brand" href="index.html">
<span>
MapProxy</span>
<span>1.8.2a0</span>
</a>
</div>
<div class="collapse navbar-collapse nav-collapse">
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="install_windows.html">Installation on Windows</a></li>
<li class="toctree-l1"><a class="reference internal" href="install_osgeo4w.html">Installation on OSGeo4W</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="services.html">Services</a></li>
<li class="toctree-l1"><a class="reference internal" href="sources.html">Sources</a></li>
<li class="toctree-l1"><a class="reference internal" href="caches.html">Caches</a></li>
<li class="toctree-l1"><a class="reference internal" href="seed.html">Seeding</a></li>
<li class="toctree-l1"><a class="reference internal" href="coverages.html">Coverages</a></li>
<li class="toctree-l1"><a class="reference internal" href="mapproxy_util.html">mapproxy-util</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">mapproxy-util autoconfig</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#options">Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="#overwrites">Overwrites</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="deployment.html">Deployment</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuration_examples.html">Configuration examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="inspire.html">INSPIRE View Service</a></li>
<li class="toctree-l1"><a class="reference internal" href="labeling.html">WMS Labeling</a></li>
<li class="toctree-l1"><a class="reference internal" href="auth.html">Authentication and Authorization</a></li>
<li class="toctree-l1"><a class="reference internal" href="decorate_img.html">Decorate Image</a></li>
<li class="toctree-l1"><a class="reference internal" href="development.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="mapproxy_2.html">MapProxy 2.0</a></li>
</ul>
</div>
</div>
<div class="col-md-8">
<div class="section" id="mapproxy-util-autoconfig">
<span id="id1"></span><h1>mapproxy-util autoconfig<a class="headerlink" href="#mapproxy-util-autoconfig" title="Permalink to this headline">¶</a></h1>
<p>The <code class="docutils literal"><span class="pre">autoconfig</span></code> sub-command of <code class="docutils literal"><span class="pre">mapproxy-util</span></code> creates MapProxy and MapProxy-seeding configurations based on existing WMS capabilities documents.</p>
<p>It creates a <code class="docutils literal"><span class="pre">source</span></code> for each available layer. The source will include a BBOX coverage from the layer extent, <code class="docutils literal"><span class="pre">legendurl</span></code> for legend graphics, <code class="docutils literal"><span class="pre">featureinfo</span></code> for querlyable layers, scale hints and all detected <code class="docutils literal"><span class="pre">supported_srs</span></code>. It will duplicate the layer tree to the <code class="docutils literal"><span class="pre">layers</span></code> section of the MapProxy configuration, including the name, title and abstract.</p>
<p>The tool will create a cache for each source layer and <code class="docutils literal"><span class="pre">supported_srs</span></code> _if_ there is a grid configured in your <code class="docutils literal"><span class="pre">--base</span></code> configuration for that SRS.</p>
<p>The MapProxy layers will use the caches when available, otherwise they will use the source directly (cascaded WMS).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">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.</p>
</div>
<div class="section" id="options">
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--capabilities">
<code class="descname">--capabilities</code><code class="descclassname"> <url|filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--capabilities" title="Permalink to this definition">¶</a></dt>
<dd><p>URL or filename of the WMS capabilities document. The tool will add <cite>REQUEST</cite> and <cite>SERVICE</cite> parameters to the URL as necessary.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--output">
<code class="descname">--output</code><code class="descclassname"> <filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--output" title="Permalink to this definition">¶</a></dt>
<dd><p>Filename for the created MapProxy configuration.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--output-seed">
<code class="descname">--output-seed</code><code class="descclassname"> <filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--output-seed" title="Permalink to this definition">¶</a></dt>
<dd><p>Filename for the created MapProxy-seeding configuration.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--force">
<code class="descname">--force</code><code class="descclassname"></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--force" title="Permalink to this definition">¶</a></dt>
<dd><p>Overwrite any existing configuration with the same output filename.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--base">
<code class="descname">--base</code><code class="descclassname"> <filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--base" title="Permalink to this definition">¶</a></dt>
<dd><p>Base configuration that should be included in the <code class="docutils literal"><span class="pre">--output</span></code> file with the <code class="docutils literal"><span class="pre">base</span></code> option.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--overwrite">
<code class="descname">--overwrite</code><code class="descclassname"> <filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--overwrite" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-mapproxy-util-autoconfig--overwrite-seed">
<code class="descname">--overwrite-seed</code><code class="descclassname"> <filename></code><a class="headerlink" href="#cmdoption-mapproxy-util-autoconfig--overwrite-seed" title="Permalink to this definition">¶</a></dt>
<dd><p>YAML configuration that overwrites configuration optoins before the generated configuration is written to <code class="docutils literal"><span class="pre">--output</span></code>/<code class="docutils literal"><span class="pre">--output-seed</span></code>.</p>
</dd></dl>
<div class="section" id="example">
<h3>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h3>
<p>Print configuration on console:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mapproxy</span><span class="o">-</span><span class="n">util</span> <span class="n">autoconfig</span> \
<span class="o">--</span><span class="n">capabilities</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">osm</span><span class="o">.</span><span class="n">omniscale</span><span class="o">.</span><span class="n">net</span><span class="o">/</span><span class="n">proxy</span><span class="o">/</span><span class="n">service</span>
</pre></div>
</div>
<p>Write MapProxy and MapProxy-seeding configuration to files:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mapproxy</span><span class="o">-</span><span class="n">util</span> <span class="n">autoconfig</span> \
<span class="o">--</span><span class="n">capabilities</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">osm</span><span class="o">.</span><span class="n">omniscale</span><span class="o">.</span><span class="n">net</span><span class="o">/</span><span class="n">proxy</span><span class="o">/</span><span class="n">service</span> \
<span class="o">--</span><span class="n">output</span> <span class="n">mapproxy</span><span class="o">.</span><span class="n">yaml</span> \
<span class="o">--</span><span class="n">output</span><span class="o">-</span><span class="n">seed</span> <span class="n">seed</span><span class="o">.</span><span class="n">yaml</span>
</pre></div>
</div>
<p>Write MapProxy configuration with caches for grids from <code class="docutils literal"><span class="pre">base.yaml</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mapproxy</span><span class="o">-</span><span class="n">util</span> <span class="n">autoconfig</span> \
<span class="o">--</span><span class="n">capabilities</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">osm</span><span class="o">.</span><span class="n">omniscale</span><span class="o">.</span><span class="n">net</span><span class="o">/</span><span class="n">proxy</span><span class="o">/</span><span class="n">service</span> \
<span class="o">--</span><span class="n">output</span> <span class="n">mapproxy</span><span class="o">.</span><span class="n">yaml</span> \
<span class="o">--</span><span class="n">base</span> <span class="n">base</span><span class="o">.</span><span class="n">yaml</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="overwrites">
<h2>Overwrites<a class="headerlink" href="#overwrites" title="Permalink to this headline">¶</a></h2>
<p>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 everytime you call <code class="docutils literal"><span class="pre">mapproxy-util</span> <span class="pre">autoconfig</span></code>.</p>
<p>Overwrites are YAML files that will be merged with the created configuration file.</p>
<p>The overwrites are applied independently for each <code class="docutils literal"><span class="pre">services</span></code>, <code class="docutils literal"><span class="pre">sources</span></code>, <code class="docutils literal"><span class="pre">caches</span></code> and <code class="docutils literal"><span class="pre">layers</span></code> section. That means, for example, that you can modify the <code class="docutils literal"><span class="pre">supported_srs</span></code> of a source and the tool will use the updated SRS list to decide which caches will be configured for that source.</p>
<div class="section" id="id2">
<h3>Example<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<p>Created configuration:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
<span class="n">mysource_wms</span><span class="p">:</span>
<span class="nb">type</span><span class="p">:</span> <span class="n">wms</span>
<span class="n">req</span><span class="p">:</span>
<span class="n">url</span><span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">example</span><span class="o">.</span><span class="n">org</span>
<span class="n">layers</span><span class="p">:</span> <span class="n">a</span>
</pre></div>
</div>
<p>Overwrite file:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
<span class="n">mysource_wms</span><span class="p">:</span>
<span class="n">supported_srs</span><span class="p">:</span> <span class="p">[</span><span class="s1">'EPSG:4326'</span><span class="p">]</span> <span class="c1"># add new value for mysource_wms</span>
<span class="n">req</span><span class="p">:</span>
<span class="n">layers</span><span class="p">:</span> <span class="n">a</span><span class="p">,</span><span class="n">b</span> <span class="c1"># overwrite existing value</span>
<span class="n">custom_param</span><span class="p">:</span> <span class="mi">42</span> <span class="c1"># new value</span>
</pre></div>
</div>
<p>Actual configuration written to <code class="docutils literal"><span class="pre">--output</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
<span class="n">mysource_wms</span><span class="p">:</span>
<span class="nb">type</span><span class="p">:</span> <span class="n">wms</span>
<span class="n">supported_srs</span><span class="p">:</span> <span class="p">[</span><span class="s1">'EPSG:4326'</span><span class="p">]</span>
<span class="n">req</span><span class="p">:</span>
<span class="n">url</span><span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">example</span><span class="o">.</span><span class="n">org</span>
<span class="n">layers</span><span class="p">:</span> <span class="n">a</span><span class="p">,</span><span class="n">b</span>
<span class="n">custom_param</span><span class="p">:</span> <span class="mi">42</span>
</pre></div>
</div>
</div>
<div class="section" id="special-keys">
<h3>Special keys<a class="headerlink" href="#special-keys" title="Permalink to this headline">¶</a></h3>
<p>There are a few special keys that you can use in your overwrite file.</p>
<div class="section" id="all">
<h4>All<a class="headerlink" href="#all" title="Permalink to this headline">¶</a></h4>
<p>The value of the <code class="docutils literal"><span class="pre">__all__</span></code> key will be merged into all dictionaries. The following overwrite will add <code class="docutils literal"><span class="pre">sessionid</span></code> to the <code class="docutils literal"><span class="pre">req</span></code> options of all <code class="docutils literal"><span class="pre">sources</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
<span class="n">__all__</span><span class="p">:</span>
<span class="n">req</span><span class="p">:</span>
<span class="n">sessionid</span><span class="p">:</span> <span class="mi">123456789</span>
</pre></div>
</div>
</div>
<div class="section" id="extend">
<h4>Extend<a class="headerlink" href="#extend" title="Permalink to this headline">¶</a></h4>
<p>The values of keys ending with <code class="docutils literal"><span class="pre">__extend__</span></code> will be added to existing lists.</p>
<p>To add another SRS for one source:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
<span class="n">my_wms</span><span class="p">:</span>
<span class="n">supported_srs__extend__</span><span class="p">:</span> <span class="p">[</span><span class="s1">'EPSG:31467'</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="wildcard">
<h4>Wildcard<a class="headerlink" href="#wildcard" title="Permalink to this headline">¶</a></h4>
<p>The values of keys starting or ending with three underscores (<code class="docutils literal"><span class="pre">___</span></code>) will be merged with values where the key matches the suffix or prefix.</p>
<p>For example, to set <code class="docutils literal"><span class="pre">levels</span></code> for <code class="docutils literal"><span class="pre">osm_webmercator</span></code> and <code class="docutils literal"><span class="pre">aerial_webmercator</span></code> and to set <code class="docutils literal"><span class="pre">refresh_before</span></code> for <code class="docutils literal"><span class="pre">osm_webmercator</span></code> and <code class="docutils literal"><span class="pre">osm_utm32</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">seeds</span><span class="p">:</span>
<span class="n">____webmercator</span><span class="p">:</span>
<span class="n">levels</span><span class="p">:</span>
<span class="n">from</span><span class="p">:</span> <span class="mi">0</span>
<span class="n">to</span><span class="p">:</span> <span class="mi">12</span>
<span class="n">osm____</span><span class="p">:</span>
<span class="n">refresh_before</span><span class="p">:</span>
<span class="n">days</span><span class="p">:</span> <span class="mi">5</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>
© Copyright Oliver Tonnhofer, Omniscale, <a href="http://mapproxy.org/about">Legal</a>
<br/>
Last updated on 2018-01-07
<br/>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
</p>
</div>
</footer>
</body>
</html>
|