This file is indexed.

/usr/share/doc/mapproxy/html/sources.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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Sources &#8212; 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="Caches" href="caches.html" />
    <link rel="prev" title="Services" href="services.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 current"><a class="current reference internal" href="#">Sources</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#wms">WMS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tiles">Tiles</a></li>
<li class="toctree-l2"><a class="reference internal" href="#mapserver">Mapserver</a></li>
<li class="toctree-l2"><a class="reference internal" href="#mapnik">Mapnik</a></li>
<li class="toctree-l2"><a class="reference internal" href="#debug">Debug</a></li>
</ul>
</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"><a class="reference internal" href="mapproxy_util_autoconfig.html">mapproxy-util autoconfig</a></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="sources">
<span id="id1"></span><h1>Sources<a class="headerlink" href="#sources" title="Permalink to this headline"></a></h1>
<p>MapProxy supports the following sources:</p>
<ul class="simple">
<li><a class="reference internal" href="#wms-label"><span class="std std-ref">WMS</span></a></li>
<li><span class="xref std std-ref">arcgis_label</span></li>
<li><a class="reference internal" href="#tiles-label"><span class="std std-ref">Tiles</span></a></li>
<li><a class="reference internal" href="#mapserver-label"><span class="std std-ref">Mapserver</span></a></li>
<li><a class="reference internal" href="#mapnik-label"><span class="std std-ref">Mapnik</span></a></li>
<li><a class="reference internal" href="#debug-label"><span class="std std-ref">Debug</span></a></li>
</ul>
<p>You need to choose a unique name for each configured source. This name will be used to reference the source in the <code class="docutils literal"><span class="pre">caches</span></code> and <code class="docutils literal"><span class="pre">layers</span></code> configuration.</p>
<p>The sources section looks like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sources</span><span class="p">:</span>
  <span class="n">mysource1</span><span class="p">:</span>
    <span class="nb">type</span><span class="p">:</span> <span class="n">xxx</span>
    <span class="n">type_dependend_option1</span><span class="p">:</span> <span class="n">a</span>
    <span class="n">type_dependend_option2</span><span class="p">:</span> <span class="n">b</span>
  <span class="n">mysource2</span><span class="p">:</span>
    <span class="nb">type</span><span class="p">:</span> <span class="n">yyy</span>
    <span class="n">type_dependend_option3</span><span class="p">:</span> <span class="n">c</span>
</pre></div>
</div>
<p>See below for a detailed description of each service.</p>
<div class="section" id="wms">
<span id="wms-label"></span><h2>WMS<a class="headerlink" href="#wms" title="Permalink to this headline"></a></h2>
<p>Use the type <code class="docutils literal"><span class="pre">wms</span></code> to for WMS servers.</p>
<div class="section" id="req">
<h3><code class="docutils literal"><span class="pre">req</span></code><a class="headerlink" href="#req" title="Permalink to this headline"></a></h3>
<p>This describes the WMS source. The only required options are <code class="docutils literal"><span class="pre">url</span></code> and <code class="docutils literal"><span class="pre">layers</span></code>.
You need to set <code class="docutils literal"><span class="pre">transparent</span></code> to <code class="docutils literal"><span class="pre">true</span></code> if you want to use this source as an overlay.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>req:
  url: http://example.org/service?
  layers: base,roads
  transparent: true
</pre></div>
</div>
<p>All other options are added to the query string of the request.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>req:
  url: http://example.org/service?
  layers: roads
  styles: simple
  map: /path/to/mapfile
</pre></div>
</div>
<p>You can also configure <code class="docutils literal"><span class="pre">sld</span></code> or <code class="docutils literal"><span class="pre">sld_body</span></code> parameters, in this case you can omit <code class="docutils literal"><span class="pre">layers</span></code>. <code class="docutils literal"><span class="pre">sld</span></code> can also point to a <code class="docutils literal"><span class="pre">file://</span></code>-URL. MapProxy will read this file and use the content as the <code class="docutils literal"><span class="pre">sld_body</span></code>. See <a class="reference internal" href="configuration_examples.html#sld-example"><span class="std std-ref">sources with SLD</span></a> for more information.</p>
<p>You can omit layers if you use <a class="reference internal" href="#tagged-source-names"><span class="std std-ref">Tagged source names</span></a>.</p>
</div>
<div class="section" id="wms-opts">
<h3><code class="docutils literal"><span class="pre">wms_opts</span></code><a class="headerlink" href="#wms-opts" title="Permalink to this headline"></a></h3>
<p>This option affects what request MapProxy sends to the source WMS server.</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">version</span></code></dt>
<dd>The WMS version number used for requests (supported: 1.0.0, 1.1.0, 1.1.1, 1.3.0). Defaults to 1.1.1.</dd>
<dt><code class="docutils literal"><span class="pre">legendgraphic</span></code></dt>
<dd>If this is set to <code class="docutils literal"><span class="pre">true</span></code>, MapProxy will request legend graphics from this source. Each MapProxy WMS layer that contains one or more sources with legend graphics will then have a LegendURL.</dd>
<dt><code class="docutils literal"><span class="pre">legendurl</span></code></dt>
<dd>Configure a URL to an image that should be returned as the legend for this source. Local URLs (<code class="docutils literal"><span class="pre">file://</span></code>) are also supported.</dd>
<dt><code class="docutils literal"><span class="pre">map</span></code></dt>
<dd>If this is set to <code class="docutils literal"><span class="pre">false</span></code>, MapProxy will not request images from this source. You can use this option in combination with <code class="docutils literal"><span class="pre">featureinfo:</span> <span class="pre">true</span></code> to create a source that is only used for feature info requests.</dd>
<dt><code class="docutils literal"><span class="pre">featureinfo</span></code></dt>
<dd>If this is set to <code class="docutils literal"><span class="pre">true</span></code>, MapProxy will mark the layer as queryable and incoming <cite>GetFeatureInfo</cite> requests will be forwarded to the source server.</dd>
<dt><code class="docutils literal"><span class="pre">featureinfo_xslt</span></code></dt>
<dd>Path to an XSLT script that should be used to transform incoming feature information.</dd>
<dt><code class="docutils literal"><span class="pre">featureinfo_format</span></code></dt>
<dd><p class="first">The <code class="docutils literal"><span class="pre">INFO_FORMAT</span></code> for FeatureInfo requests. By default MapProxy will use the same format as requested by the client.</p>
<p class="last"><code class="docutils literal"><span class="pre">featureinfo_xslt</span></code> and <code class="docutils literal"><span class="pre">featureinfo_format</span></code></p>
</dd>
</dl>
<p>See <a class="reference internal" href="configuration_examples.html#fi-xslt"><span class="std std-ref">FeatureInformation for more information</span></a>.</p>
</div>
<div class="section" id="coverage">
<h3><code class="docutils literal"><span class="pre">coverage</span></code><a class="headerlink" href="#coverage" title="Permalink to this headline"></a></h3>
<p>Define the covered area of the source. The source will only be requested if there is an intersection between the requested data and the coverage. See <a class="reference internal" href="coverages.html"><span class="doc">coverages</span></a> for more information about the configuration. The intersection is calculated for meta-tiles and not the actual client request, so you should expect more visible data at the coverage boundaries.</p>
</div>
<div class="section" id="seed-only">
<span id="wms-seed-only"></span><h3><code class="docutils literal"><span class="pre">seed_only</span></code><a class="headerlink" href="#seed-only" title="Permalink to this headline"></a></h3>
<p>Disable this source in regular mode. If set to <code class="docutils literal"><span class="pre">true</span></code>, this source will always return a blank/transparent image. The source will only be requested during the seeding process. You can use this option to run MapProxy in an offline mode.</p>
</div>
<div class="section" id="min-res-max-res-or-min-scale-max-scale">
<span id="source-minmax-res"></span><h3><code class="docutils literal"><span class="pre">min_res</span></code>, <code class="docutils literal"><span class="pre">max_res</span></code> or <code class="docutils literal"><span class="pre">min_scale</span></code>, <code class="docutils literal"><span class="pre">max_scale</span></code><a class="headerlink" href="#min-res-max-res-or-min-scale-max-scale" title="Permalink to this headline"></a></h3>
<p>Limit the source to the given min and max resolution or scale. MapProxy will return a blank image for requests outside of these boundaries (<code class="docutils literal"><span class="pre">min_res</span></code> is inclusive, <code class="docutils literal"><span class="pre">max_res</span></code> exclusive). You can use either the resolution or the scale values, missing values will be interpreted as <cite>unlimited</cite>. Resolutions should be in meters per pixel.</p>
<p>The values will also apear in the capabilities documents (i.e. WMS ScaleHint and Min/MaxScaleDenominator). The boundaries will be regarded for each source, but the values in the capabilities might differ if you combine multiple sources or if the MapProxy layer already has a <code class="docutils literal"><span class="pre">min/max_res</span></code> configuration.</p>
<p>Please read <a class="reference internal" href="configuration.html#scale-resolution"><span class="std std-ref">scale vs. resolution</span></a> for some notes on <cite>scale</cite>.</p>
</div>
<div class="section" id="supported-srs">
<span id="id2"></span><h3><code class="docutils literal"><span class="pre">supported_srs</span></code><a class="headerlink" href="#supported-srs" title="Permalink to this headline"></a></h3>
<p>A list with SRSs that the WMS source supports. MapProxy will only query the source in these SRSs. It will reproject data if it needs to get data from this layer in any other SRS.</p>
<p>You don&#8217;t need to configure this if you only use this WMS as a cache source and the WMS supports all SRS of the cache.</p>
<p>If MapProxy needs to reproject and the source has multiple <code class="docutils literal"><span class="pre">supported_srs</span></code>, then it will use the first projected SRS for requests in a projected SRS, or the first geographic SRS for requests in a geographic SRS. E.g when <cite>supported_srs</cite> is <code class="docutils literal"><span class="pre">['EPSG:4326',</span> <span class="pre">'EPSG:31467']</span></code> caches with EPSG:3857 (projected, meter) will use EPSG:31467 (projected, meter) and not EPSG:4326 (geographic, lat/long).</p>
<blockquote>
<div></div></blockquote>
</div>
<div class="section" id="forward-req-params">
<h3><code class="docutils literal"><span class="pre">forward_req_params</span></code><a class="headerlink" href="#forward-req-params" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.5.0.</span></p>
</div>
<p>A list with request parameters that will be forwarded to the source server (if available in the original request). A typical use case of this feature would be to forward the <cite>TIME</cite> parameter when working with a WMS-T server.</p>
<p>This feature only works with <a class="reference internal" href="configuration_examples.html#direct-source"><span class="std std-ref">uncached sources</span></a>.</p>
</div>
<div class="section" id="supported-formats">
<h3><code class="docutils literal"><span class="pre">supported_formats</span></code><a class="headerlink" href="#supported-formats" title="Permalink to this headline"></a></h3>
<p>Use this option to specify which image formats your source WMS supports. MapProxy only requests images in one of these formats, and will convert any image if it needs another format. If you do not supply this options, MapProxy assumes that the source supports all formats.</p>
</div>
<div class="section" id="image">
<h3><code class="docutils literal"><span class="pre">image</span></code><a class="headerlink" href="#image" title="Permalink to this headline"></a></h3>
<p>See <a class="reference internal" href="configuration.html#image-options"><span class="std std-ref">Image Format Options</span></a> for other options.</p>
<p><code class="docutils literal"><span class="pre">transparent_color</span></code></p>
<blockquote>
<div>Specify a color that should be converted to full transparency. Can be either a list of color values (<code class="docutils literal"><span class="pre">[255,</span> <span class="pre">255,</span> <span class="pre">255]</span></code>) or a hex string (<code class="docutils literal"><span class="pre">#ffffff</span></code>).</div></blockquote>
<p><code class="docutils literal"><span class="pre">transparent_color_tolerance</span></code></p>
<blockquote>
<div><p>Tolerance for the <code class="docutils literal"><span class="pre">transparent_color</span></code> substitution. The value defines the tolerance in each direction. E.g. a tolerance of 5 and a color value of 100 will convert colors in the range of 95 to 105.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">image</span><span class="p">:</span>
  <span class="n">transparent_color</span><span class="p">:</span> <span class="s1">&#39;#ffffff&#39;</span>
  <span class="n">transparent_color_tolerance</span><span class="p">:</span> <span class="mi">20</span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="concurrent-requests">
<span id="wms-source-concurrent-requests-label"></span><h3><code class="docutils literal"><span class="pre">concurrent_requests</span></code><a class="headerlink" href="#concurrent-requests" title="Permalink to this headline"></a></h3>
<p>This limits the number of parallel requests MapProxy will issue to the source server.
It even works across multiple WMS sources as long as all have the same <code class="docutils literal"><span class="pre">concurrent_requests</span></code> value and all <code class="docutils literal"><span class="pre">req.url</span></code> parameters point to the same host. Defaults to 0, which means no limitation.</p>
</div>
<div class="section" id="http">
<h3><code class="docutils literal"><span class="pre">http</span></code><a class="headerlink" href="#http" title="Permalink to this headline"></a></h3>
<p>You can configure the following HTTP related options for this source:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">method</span></code></li>
<li><code class="docutils literal"><span class="pre">headers</span></code></li>
<li><code class="docutils literal"><span class="pre">client_timeout</span></code></li>
<li><code class="docutils literal"><span class="pre">ssl_ca_certs</span></code></li>
<li><code class="docutils literal"><span class="pre">ssl_no_cert_checks</span></code> (see below)</li>
</ul>
<p>See <a class="reference internal" href="configuration.html#http-ssl"><span class="std std-ref">HTTP Options</span></a> for detailed documentation.</p>
<p id="wms-source-ssl-no-cert-checks"><code class="docutils literal"><span class="pre">ssl_no_cert_checks</span></code></p>
<blockquote>
<div>MapProxy checks the SSL server certificates for any <code class="docutils literal"><span class="pre">req.url</span></code> that use HTTPS. You need to supply a file (see) that includes that certificate, otherwise MapProxy will fail to establish the connection. You can set the <code class="docutils literal"><span class="pre">http.ssl_no_cert_checks</span></code> options to <code class="docutils literal"><span class="pre">true</span></code> to disable this verification.</div></blockquote>
</div>
<div class="section" id="tagged-source-names">
<span id="id3"></span><h3>Tagged source names<a class="headerlink" href="#tagged-source-names" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.1.0.</span></p>
</div>
<p>MapProxy supports tagged source names for most sources. This allows you to define the layers of a source in the caches or (WMS)-layers configuration.</p>
<p>Instead of referring to a source by the name alone, you can add a list of comma delimited layers: <code class="docutils literal"><span class="pre">sourcename:lyr1,lyr2</span></code>. You need to use quotes for tagged source names.</p>
<p>This works for layers and caches:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>layers:
  - name: test
    title: Test Layer
    sources: [&#39;wms1:lyr1,lyr2&#39;]

caches:
  cache1:
    sources: [&#39;wms1:lyrA,lyrB&#39;]
    [...]

sources:
  wms1:
    type: wms
    req:
      url: http://example.org/service?
</pre></div>
</div>
<p>You can either omit the <code class="docutils literal"><span class="pre">layers</span></code> in the <code class="docutils literal"><span class="pre">req</span></code> parameter, or you can use them to limit the tagged layers. In this case MapProxy will raise an error if you configure <code class="docutils literal"><span class="pre">layers:</span> <span class="pre">lyr1,lyr2</span></code> and then try to access <code class="docutils literal"><span class="pre">wms:lyr2,lyr3</span></code> for example.</p>
</div>
<div class="section" id="example-configuration">
<h3>Example configuration<a class="headerlink" href="#example-configuration" title="Permalink to this headline"></a></h3>
<p>Minimal example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>my_minimal_wmssource:
  type: wms
  req:
    url: http://localhost:8080/service?
    layers: base
</pre></div>
</div>
<p>Full example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>my_wmssource:
  type: wms
  wms_opts:
    version: 1.0.0
    featureinfo: True
  supported_srs: [&#39;EPSG:4326&#39;, &#39;EPSG:31467&#39;]
  image:
    transparent_color: &#39;#ffffff&#39;
    transparent_color_tolerance: 0
  coverage:
     polygons: GM.txt
     polygons_srs: EPSG:900913
  forward_req_params: [&#39;TIME&#39;, &#39;CUSTOM&#39;]
  req:
    url: http://localhost:8080/service?mycustomparam=foo
    layers: roads
    another_param: bar
    transparent: true
</pre></div>
</div>
<p>ArcGIS REST API
&#8220;&#8221;&#8220;</p>
<p>Use the type <code class="docutils literal"><span class="pre">arcgis</span></code> for ArcGIS MapServer and ImageServer REST server endpoints. This
source is based on <a class="reference internal" href="#wms-label"><span class="std std-ref">the WMS source</span></a> and most WMS options apply to the
ArcGIS source too.</p>
</div>
<div class="section" id="id4">
<h3><code class="docutils literal"><span class="pre">req</span></code><a class="headerlink" href="#id4" title="Permalink to this headline"></a></h3>
<p>This describes the ArcGIS source. The only required option is <code class="docutils literal"><span class="pre">url</span></code>. You need to set <code class="docutils literal"><span class="pre">transparent</span></code> to <code class="docutils literal"><span class="pre">true</span></code> if you want to use this source as an overlay.</p>
<div class="highlight-default"><div class="highlight"><pre><span></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="o">/</span><span class="n">ArcGIS</span><span class="o">/</span><span class="n">rest</span><span class="o">/</span><span class="n">services</span><span class="o">/</span><span class="n">Imagery</span><span class="o">/</span><span class="n">MapService</span>
  <span class="n">layers</span><span class="p">:</span> <span class="n">show</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span><span class="mi">1</span>
  <span class="n">transparent</span><span class="p">:</span> <span class="n">true</span>
</pre></div>
</div>
</div>
<div class="section" id="id5">
<span id="id6"></span><h3>Example configuration<a class="headerlink" href="#id5" title="Permalink to this headline"></a></h3>
<p>Minimal example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">my_minimal_arcgissource</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">arcgis</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="o">/</span><span class="n">ArcGIS</span><span class="o">/</span><span class="n">rest</span><span class="o">/</span><span class="n">services</span><span class="o">/</span><span class="n">Imagery</span><span class="o">/</span><span class="n">MapService</span>
</pre></div>
</div>
<p>Full example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">my_arcgissource</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">arcgis</span>
  <span class="n">coverage</span><span class="p">:</span>
     <span class="n">polygons</span><span class="p">:</span> <span class="n">GM</span><span class="o">.</span><span class="n">txt</span>
     <span class="n">polygons_srs</span><span class="p">:</span> <span class="n">EPSG</span><span class="p">:</span><span class="mi">900913</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="o">/</span><span class="n">ArcGIS</span><span class="o">/</span><span class="n">rest</span><span class="o">/</span><span class="n">services</span><span class="o">/</span><span class="n">Imagery</span><span class="o">/</span><span class="n">MapService</span>
    <span class="n">layers</span><span class="p">:</span> <span class="n">show</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="mi">1</span>
    <span class="n">transparent</span><span class="p">:</span> <span class="n">true</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="tiles">
<span id="tiles-label"></span><h2>Tiles<a class="headerlink" href="#tiles" title="Permalink to this headline"></a></h2>
<p>Use the type <code class="docutils literal"><span class="pre">tile</span></code> to request data from from existing tile servers like TileCache and GeoWebCache. You can also use this source cascade MapProxy installations.</p>
<div class="section" id="url">
<h3><code class="docutils literal"><span class="pre">url</span></code><a class="headerlink" href="#url" title="Permalink to this headline"></a></h3>
<p>This source takes a <code class="docutils literal"><span class="pre">url</span></code> option that contains a URL template. The template format is <code class="docutils literal"><span class="pre">%(key_name)s</span></code>. MapProxy supports the following named variables in the URL:</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">x</span></code>, <code class="docutils literal"><span class="pre">y</span></code>, <code class="docutils literal"><span class="pre">z</span></code></dt>
<dd>The tile coordinate.</dd>
<dt><code class="docutils literal"><span class="pre">format</span></code></dt>
<dd>The format of the tile.</dd>
<dt><code class="docutils literal"><span class="pre">quadkey</span></code></dt>
<dd>Quadkey for the tile as described in <a class="reference external" href="http://msdn.microsoft.com/en-us/library/bb259689.aspx">http://msdn.microsoft.com/en-us/library/bb259689.aspx</a></dd>
<dt><code class="docutils literal"><span class="pre">tc_path</span></code></dt>
<dd>TileCache path like <code class="docutils literal"><span class="pre">09/000/000/264/000/000/345</span></code>. Note that it does not contain any format
extension.</dd>
<dt><code class="docutils literal"><span class="pre">tms_path</span></code></dt>
<dd>TMS path like <code class="docutils literal"><span class="pre">5/12/9</span></code>. Note that it does not contain the version, the layername or the format extension.</dd>
<dt><code class="docutils literal"><span class="pre">arcgiscache_path</span></code></dt>
<dd>ArcGIS cache path like <code class="docutils literal"><span class="pre">L05/R00000123/C00000abc</span></code>. Note that it does not contain any format
extension.</dd>
<dt><code class="docutils literal"><span class="pre">bbox</span></code></dt>
<dd>Bounding box of the tile. For WMS-C servers that expect a fixed parameter order.</dd>
</dl>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.1.0: </span><code class="docutils literal"><span class="pre">arcgiscache_path</span></code> and <code class="docutils literal"><span class="pre">bbox</span></code> parameter.</p>
</div>
</div>
<div class="section" id="origin">
<h3><code class="docutils literal"><span class="pre">origin</span></code><a class="headerlink" href="#origin" title="Permalink to this headline"></a></h3>
<div class="deprecated">
<p><span class="versionmodified">Deprecated since version 1.3.0: </span>Use grid with the <code class="docutils literal"><span class="pre">origin</span></code> option.</p>
</div>
<p>The origin of the tile grid (i.e. the location of the 0,0 tile). Supported values are <code class="docutils literal"><span class="pre">sw</span></code> for south-west (lower-left) origin or <code class="docutils literal"><span class="pre">nw</span></code> for north-west (upper-left) origin. <code class="docutils literal"><span class="pre">sw</span></code> is the default.</p>
</div>
<div class="section" id="grid">
<h3><code class="docutils literal"><span class="pre">grid</span></code><a class="headerlink" href="#grid" title="Permalink to this headline"></a></h3>
<p>The grid of the tile source. Defaults to <code class="docutils literal"><span class="pre">GLOBAL_MERCATOR</span></code>, a grid that is compatible with popular web mapping applications.</p>
</div>
<div class="section" id="id7">
<h3><code class="docutils literal"><span class="pre">coverage</span></code><a class="headerlink" href="#id7" title="Permalink to this headline"></a></h3>
<p>Define the covered area of the source. The source will only be requested if there is an intersection between the incoming request and the coverage. See <a class="reference internal" href="coverages.html"><span class="doc">coverages</span></a> for more information.</p>
</div>
<div class="section" id="transparent">
<h3><code class="docutils literal"><span class="pre">transparent</span></code><a class="headerlink" href="#transparent" title="Permalink to this headline"></a></h3>
<p>You need to set this to <code class="docutils literal"><span class="pre">true</span></code> if you want to use this source as an overlay.</p>
</div>
<div class="section" id="id8">
<h3><code class="docutils literal"><span class="pre">http</span></code><a class="headerlink" href="#id8" title="Permalink to this headline"></a></h3>
<p>You can configure the following HTTP related options for this source:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">headers</span></code></li>
<li><code class="docutils literal"><span class="pre">client_timeout</span></code></li>
<li><code class="docutils literal"><span class="pre">ssl_ca_certs</span></code></li>
<li><code class="docutils literal"><span class="pre">ssl_no_cert_checks</span></code> (<span class="xref std std-ref">see above</span>)</li>
</ul>
<p>See <a class="reference internal" href="configuration.html#http-ssl"><span class="std std-ref">HTTP Options</span></a> for detailed documentation.</p>
</div>
<div class="section" id="id9">
<h3><code class="docutils literal"><span class="pre">seed_only</span></code><a class="headerlink" href="#id9" title="Permalink to this headline"></a></h3>
<p>See <a class="reference internal" href="#wms-seed-only"><span class="std std-ref">seed_only</span></a></p>
</div>
<div class="section" id="id10">
<h3><code class="docutils literal"><span class="pre">min_res</span></code>, <code class="docutils literal"><span class="pre">max_res</span></code> or <code class="docutils literal"><span class="pre">min_scale</span></code>, <code class="docutils literal"><span class="pre">max_scale</span></code><a class="headerlink" href="#id10" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.5.0.</span></p>
</div>
<p>See <a class="reference internal" href="#source-minmax-res"><span class="std std-ref">min_res, max_res or min_scale, max_scale</span></a>.</p>
</div>
<div class="section" id="on-error">
<h3><code class="docutils literal"><span class="pre">on_error</span></code><a class="headerlink" href="#on-error" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.4.0.</span></p>
</div>
<p>You can configure what MapProxy should do when the tile service returns an error. Instead of raising an error, MapProxy can generate a single color tile. You can configure if MapProxy should cache this tile, or if it should use it only to generate a tile or WMS response.</p>
<p>You can configure multiple status codes within the <code class="docutils literal"><span class="pre">on_error</span></code> option. You can also use the catch-all value <code class="docutils literal"><span class="pre">other</span></code>. This will not only catch all other HTTP status codes, but also source errors like HTTP timeouts or non-image responses.</p>
<p>Each status code takes the following options:</p>
<p><code class="docutils literal"><span class="pre">response</span></code></p>
<blockquote>
<div>Specify the color of the tile that should be returned in case of this error. Can be either a list of color values (<code class="docutils literal"><span class="pre">[255,</span> <span class="pre">255,</span> <span class="pre">255]</span></code>, <code class="docutils literal"><span class="pre">[255,</span> <span class="pre">255,</span> <span class="pre">255,</span> <span class="pre">0]</span></code>)) or a hex string (<code class="docutils literal"><span class="pre">'#ffffff'</span></code>, <code class="docutils literal"><span class="pre">'#fa1fbb00'</span></code>) with RGBA values, or the string <code class="docutils literal"><span class="pre">transparent</span></code>.</div></blockquote>
<p><code class="docutils literal"><span class="pre">cache</span></code></p>
<blockquote>
<div>Set this to <code class="docutils literal"><span class="pre">True</span></code> if MapProxy should cache the single color tile. Otherwise (<code class="docutils literal"><span class="pre">False</span></code>) MapProxy will use this generated tile only for this request. This is the default.</div></blockquote>
<p>You need to enable <code class="docutils literal"><span class="pre">transparent</span></code> for your source, if you use <code class="docutils literal"><span class="pre">on_error</span></code> responses with transparency.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">my_tile_source</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">tile</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">localhost</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">tiles</span><span class="o">/%</span><span class="p">(</span><span class="n">tms_path</span><span class="p">)</span><span class="n">s</span><span class="o">.</span><span class="n">png</span>
  <span class="n">transparent</span><span class="p">:</span> <span class="n">true</span>
  <span class="n">on_error</span><span class="p">:</span>
    <span class="mi">204</span><span class="p">:</span>
      <span class="n">response</span><span class="p">:</span> <span class="n">transparent</span>
      <span class="n">cache</span><span class="p">:</span> <span class="kc">True</span>
    <span class="mi">502</span><span class="p">:</span>
      <span class="n">response</span><span class="p">:</span> <span class="s1">&#39;#ede9e3&#39;</span>
      <span class="n">cache</span><span class="p">:</span> <span class="kc">False</span>
    <span class="n">other</span><span class="p">:</span>
      <span class="n">response</span><span class="p">:</span> <span class="s1">&#39;#ff0000&#39;</span>
      <span class="n">cache</span><span class="p">:</span> <span class="kc">False</span>
</pre></div>
</div>
</div>
<div class="section" id="id11">
<h3>Example configuration<a class="headerlink" href="#id11" title="Permalink to this headline"></a></h3>
<div class="highlight-default"><div class="highlight"><pre><span></span>my_tile_source:
  type: tile
  grid: mygrid
  url: http://localhost:8080/tile?x=%(x)s&amp;y=%(y)s&amp;z=%(z)s&amp;format=%(format)s
</pre></div>
</div>
</div>
</div>
<div class="section" id="mapserver">
<span id="mapserver-label"></span><h2>Mapserver<a class="headerlink" href="#mapserver" title="Permalink to this headline"></a></h2>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.1.0.</span></p>
</div>
<p>Use the type <code class="docutils literal"><span class="pre">mapserver</span></code> to directly call the Mapserver CGI executable. This source is based on <a class="reference internal" href="#wms-label"><span class="std std-ref">the WMS source</span></a> and most options apply to the Mapserver source too.</p>
<p>The only differences are that it does not support the <code class="docutils literal"><span class="pre">http</span></code> option and the <code class="docutils literal"><span class="pre">req.url</span></code> parameter is ignored. The <code class="docutils literal"><span class="pre">req.map</span></code> should point to your Mapserver mapfile.</p>
<p>The mapfile used must have a WMS server enabled, e.g. with <code class="docutils literal"><span class="pre">wms_enable_request</span></code> or <code class="docutils literal"><span class="pre">ows_enable_request</span></code> in the mapfile.</p>
<div class="section" id="id12">
<h3><code class="docutils literal"><span class="pre">mapserver</span></code><a class="headerlink" href="#id12" title="Permalink to this headline"></a></h3>
<p>You can also set these options in the <a class="reference internal" href="configuration.html#globals-conf-label"><span class="std std-ref">globals</span></a> section.</p>
<p><code class="docutils literal"><span class="pre">binary</span></code></p>
<blockquote>
<div>The complete path to the <code class="docutils literal"><span class="pre">mapserv</span></code> executable.</div></blockquote>
<p><code class="docutils literal"><span class="pre">working_dir</span></code></p>
<blockquote>
<div>Path where the Mapserver should be executed from. It should be the directory where any relative paths in your mapfile are based on.</div></blockquote>
</div>
<div class="section" id="id13">
<h3>Example configuration<a class="headerlink" href="#id13" title="Permalink to this headline"></a></h3>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">my_ms_source</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">mapserver</span>
  <span class="n">req</span><span class="p">:</span>
    <span class="n">layers</span><span class="p">:</span> <span class="n">base</span>
    <span class="nb">map</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">my</span><span class="o">.</span><span class="n">map</span>
  <span class="n">mapserver</span><span class="p">:</span>
    <span class="n">binary</span><span class="p">:</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">cgi</span><span class="o">-</span><span class="nb">bin</span><span class="o">/</span><span class="n">mapserv</span>
    <span class="n">working_dir</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="mapnik">
<span id="mapnik-label"></span><h2>Mapnik<a class="headerlink" href="#mapnik" title="Permalink to this headline"></a></h2>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.1.0.</span></p>
</div>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 1.2.0: </span>New <code class="docutils literal"><span class="pre">layers</span></code> option and support for <a class="reference internal" href="#tagged-source-names"><span class="std std-ref">tagged sources</span></a>.</p>
</div>
<p>Use the type <code class="docutils literal"><span class="pre">mapnik</span></code> to directly call Mapnik without any WMS service. It uses the Mapnik Python API and you need to have a working Mapnik installation that is accessible by the Python installation that runs MapProxy. A call of <code class="docutils literal"><span class="pre">python</span> <span class="pre">-c</span> <span class="pre">'import</span> <span class="pre">mapnik'</span></code> should return no error.</p>
<div class="section" id="mapfile">
<h3><code class="docutils literal"><span class="pre">mapfile</span></code><a class="headerlink" href="#mapfile" title="Permalink to this headline"></a></h3>
<p>The filename of you Mapnik XML mapfile.</p>
</div>
<div class="section" id="layers">
<h3><code class="docutils literal"><span class="pre">layers</span></code><a class="headerlink" href="#layers" title="Permalink to this headline"></a></h3>
<p>A list of layer names you want to render. MapProxy disables each layer that is not included in this list. It does not reorder the layers and unnamed layers (<cite>Unknown</cite>) are always rendered.</p>
</div>
<div class="section" id="use-mapnik2">
<h3><code class="docutils literal"><span class="pre">use_mapnik2</span></code><a class="headerlink" href="#use-mapnik2" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.3.0.</span></p>
</div>
<p>Use Mapnik 2 if set to <code class="docutils literal"><span class="pre">true</span></code>. This option is now deprecated and only required for Mapnik 2.0.0. Mapnik 2.0.1 and newer are available as <code class="docutils literal"><span class="pre">mapnik</span></code> package.</p>
</div>
<div class="section" id="id14">
<h3><code class="docutils literal"><span class="pre">transparent</span></code><a class="headerlink" href="#id14" title="Permalink to this headline"></a></h3>
<p>Set to <code class="docutils literal"><span class="pre">true</span></code> to render from mapnik sources with background-color=&#8221;transparent&#8221;, <code class="docutils literal"><span class="pre">false</span></code> (default) will force a black background color.</p>
</div>
<div class="section" id="scale-factor">
<h3><code class="docutils literal"><span class="pre">scale_factor</span></code><a class="headerlink" href="#scale-factor" title="Permalink to this headline"></a></h3>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.8.0.</span></p>
</div>
<p>Set the <a class="reference external" href="https://github.com/mapnik/mapnik/wiki/Scale-factor">Mapnik scale_factor</a> option. Mapnik scales most style options like the width of lines and font sizes by this factor.
See also <a class="reference internal" href="configuration_examples.html#hq-tiles"><span class="std std-ref">HQ/Retina tiles</span></a>.</p>
</div>
<div class="section" id="other-options">
<h3>Other options<a class="headerlink" href="#other-options" title="Permalink to this headline"></a></h3>
<p>The Mapnik source also supports the <code class="docutils literal"><span class="pre">min_res</span></code>/<code class="docutils literal"><span class="pre">max_res</span></code>/<code class="docutils literal"><span class="pre">min_scale</span></code>/<code class="docutils literal"><span class="pre">max_scale</span></code>, <code class="docutils literal"><span class="pre">concurrent_requests</span></code>, <code class="docutils literal"><span class="pre">seed_only</span></code> and <code class="docutils literal"><span class="pre">coverage</span></code> options. See <a class="reference internal" href="#wms-label"><span class="std std-ref">WMS</span></a>.</p>
</div>
<div class="section" id="id15">
<h3>Example configuration<a class="headerlink" href="#id15" title="Permalink to this headline"></a></h3>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">my_mapnik_source</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">mapnik</span>
  <span class="n">mapfile</span><span class="p">:</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">mapnik</span><span class="o">.</span><span class="n">xml</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="debug">
<span id="debug-label"></span><h2>Debug<a class="headerlink" href="#debug" title="Permalink to this headline"></a></h2>
<p>Adds information like resolution and BBOX to the response image.
This is useful to determine a fixed set of resolutions for the <code class="docutils literal"><span class="pre">res</span></code>-parameter. It takes no options.</p>
<p>Example:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">debug_source</span><span class="p">:</span>
  <span class="nb">type</span><span class="p">:</span> <span class="n">debug</span>
</pre></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>
     
       &copy; 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>