forked from MapServer/mapcache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapcache.xml.sample
894 lines (798 loc) · 34.3 KB
/
mapcache.xml.sample
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
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
<?xml version="1.0" encoding="UTF-8"?>
<mapcache>
<metadata>
<title>my mapcache service</title>
<abstract>woot! this is a service abstract!</abstract>
<!-- url
uncomment and modify this if you need to provide another base url for
getCapabilities requests (for the OnlineResource tags). You should use
this if there's a proxy between the client and the mod-mapcache service
and you want the capabilities document to point to the correct endpoints.
<url>http://mysuperhost/proxy/to/mapcache</url>
-->
</metadata>
<!--
a grid represents the layout of tiles: srs, extent, resolutions, and tile size
-->
<grid name="testgrid">
<metadata>
<title>this is a custom grid I made up for an example</title>
<!--
OGC WMTS WellKnownScaleSet, if applicable
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
-->
</metadata>
<!--
Set to "true" if no new tiles should be created when not in
the configured cache. If a requested tile is not present in
a read-only cache, it wil be returned as "nodata", i.e. fully
transparent in a vertical assembly case, or as a 404 in a
single-tile case.
Note that the read-only status of a tileset is overridden to
read-write by the seeder for the duration of the seeding
session
<read-only>true</read-only>
-->
<!--
the spatial reference this tileset is in. a WMS client will need this for
getMap requests. This is the srs that will be sent to the WMS source during
a request, make sure that this srs is supported by the wms.
-->
<srs>EPSG:4326</srs>
<!--
equivalent values for the SRS that can be requested by a client.
this value is essentially here to be able to support:
- EPSG:900913 and EPSG:3857 for the googleMapsCompatible gridset
- EPSG:2154 and IGNF:LAMB93
-->
<srsalias>EPSG:foobar</srsalias>
<!--
width and height of tiles. 256x256 is the usual size
-->
<size>256 256</size>
<!--
extent of the grid. the bottom left corner determines the origin of the tiles
this should match the maxExtent property if using openlayers.
-->
<extent>-180 -90 180 90</extent>
<!--
array of resolutions for the tileset, in decreasing order
this should match the resolutions property if using openlayers
-->
<resolutions>0.1 0.05 0.025 0.0125</resolutions>
</grid>
<!--
there are three preconfigured grids you can use in <tileset>s without having to
explicitely define them here:
<grid name="WGS84">
<metadata>
<title>GoogleCRS84Quad</title>
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleCRS84Quad</WellKnownScaleSet>
</metadata>
<extent>-180 -90 180 90</extent>
<srs>EPSG:4326</srs>
<units>dd</units>
<size>256 256</size>
<resolutions>1.40625000000000 0.703125000000000 0.351562500000000 0.175781250000000 8.78906250000000e-2 4.39453125000000e-2 2.19726562500000e-2 1.09863281250000e-2 5.49316406250000e-3 2.74658203125000e-3 1.37329101562500e-3 6.86645507812500e-4 3.43322753906250e-4 1.71661376953125e-4 8.58306884765625e-5 4.29153442382812e-5 2.14576721191406e-5 1.07288360595703e-5 5.36441802978516e-6</resolutions>
</grid>
<grid name="GoogleMapsCompatible">
<metadata>
<title>GoogleMapsCompatible</title>
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
</metadata>
<extent>-20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480</extent>
<srs>EPSG:3857</srs>
<srsalias>EPSG:900913</srsalias>
<units>m</units>
<size>256 256</size>
<resolutions>156543.0339280410 78271.51696402048 39135.75848201023 19567.87924100512 9783.939620502561 4891.969810251280 2445.984905125640 1222.992452562820 611.4962262814100 305.7481131407048 152.8740565703525 76.43702828517624 38.21851414258813 19.10925707129406 9.554628535647032 4.777314267823516 2.388657133911758 1.194328566955879 0.5971642834779395</resolutions>
</grid>
-->
<!-- this grid is identical to the previous one, except that it uses EPSG:900913 as the default srs as it is more supported -->
<!--
<grid name="g">
<metadata>
<title>GoogleMapsCompatible</title>
<WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet>
</metadata>
<extent>-20037508.3427892480,-20037508.3427892480,20037508.3427892480,20037508.3427892480</extent>
<srs>EPSG:900913</srs>
<srsalias>EPSG:3857</srsalias>
<size>256 256</size>
<resolutions>
156543.0339280410
78271.51696402048
39135.75848201023
19567.87924100512
9783.939620502561
4891.969810251280
2445.984905125640
1222.992452562820
611.4962262814100
305.7481131407048
152.8740565703525
76.43702828517624
38.21851414258813
19.10925707129406
9.554628535647032
4.777314267823516
2.388657133911758
1.194328566955879
0.5971642834779395
</resolutions>
</grid>
-->
<!-- Lambert93 -->
<grid name="LAMB93">
<metadata>
<title>Lambert 1993</title>
</metadata>
<extent>-357823.2365 6037008.6939 1313632.3628 7230727.3772</extent>
<srs>EPSG:2154</srs>
<srsalias>IGNF:LAMB93</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<!-- RGF93 -->
<grid name="RGF93">
<metadata>
<title></title>
</metadata>
<extent>-9.62 41.18 10.3 51.54</extent>
<srs>EPSG:4171</srs>
<srsalias>IGNF:RGF93</srsalias>
<resolutions>0.026726773770953713 0.013363386885476856 0.006681693442738428 0.003340846721369214 0.001670423360684607 0.0008352116803423035 0.00041760584017115176 0.00020880292008557588 0.00010440146004278794 0.00005220073002139397 0.000026100365010696985 0.000013050182505348493 0.000006525091252674246 0.000003262545626337123 0.0000016312728131685616 0.0000008156364065842808</resolutions>
<units>dd</units>
<size>256 256</size>
</grid>
<!-- french geoportail grids -->
<grid name="FXX">
<metadata>
<title>Géoportail - France métropolitaine</title>
</metadata>
<extent>-524288 4456448 786432 5767168</extent>
<srs>EPSG:310024802</srs>
<srsalias>IGNF:GEOPORTALFXX</srsalias>
<srsalias>EPSG:310024001</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="ANF">
<metadata>
<title>Géoportail - Antilles françaises</title>
</metadata>
<extent>-6791168 1761280 -6553600 2023424</extent>
<srs>EPSG:310915814</srs>
<srsalias>IGNF:GEOPORTALANF</srsalias>
<srsalias>EPSG:310495002</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="GUF">
<metadata>
<title>Géoportail - Guyane</title>
</metadata>
<extent>-6070272 235047 -5726208 647168</extent>
<srs>EPSG:310486805</srs>
<srsalias>IGNF:GEOPORTALGUF</srsalias>
<srsalias>EPSG:310486003</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="MYT">
<metadata>
<title>Géoportail - Mayotte</title>
</metadata>
<extent>4901888 -1447936 4932608 -1405952</extent>
<srs>EPSG:310702807</srs>
<srsalias>IGNF:GEOPORTALMYT</srsalias>
<srsalias>EPSG:310702005</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="REU">
<metadata>
<title>Géoportail - Réunion et dépendances</title>
</metadata>
<extent>5734400 -2383872 5808128 -2318336</extent>
<srs>EPSG:310700806</srs>
<srsalias>IGNF:GEOPORTALREU</srsalias>
<srsalias>EPSG:310700004</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="NCL">
<metadata>
<title>Géoportail - Nouvelle-Calédonie</title>
</metadata>
<extent>16777216 -2555904 17301504 -2162688</extent>
<srs>EPSG:310547809</srs>
<srsalias>IGNF:GEOPORTALNCL</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="SPM">
<metadata>
<title>Géoportail - Saint-Pierre et Miquelon</title>
</metadata>
<extent>-4325376 5177344 -4259840 5308416</extent>
<srs>EPSG:310706808</srs>
<srsalias>IGNF:GEOPORTALSPM</srsalias>
<srsalias>EPSG:310706006</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="WLF">
<metadata>
<title>Géoportail - Wallis et Futuna</title>
</metadata>
<extent>-19267584 -1638400 -19005440 -1441792</extent>
<srs>EPSG:310642810</srs>
<srsalias>IGNF:GEOPORTALWLF</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="CRZ">
<metadata>
<title>Géoportail - Crozet</title>
</metadata>
<extent>3801088 -5242880 4128768 -5046272</extent>
<srs>EPSG:310642801</srs>
<srsalias>IGNF:GEOPORTALCRZ</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="KER">
<metadata>
<title>Géoportail - Kerguelen</title>
</metadata>
<extent>4915200 -5636096 5177344 -5373952</extent>
<srs>EPSG:310642812</srs>
<srsalias>IGNF:GEOPORTALKER</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="PYF">
<metadata>
<title>Géoportail - Polynésie française</title>
</metadata>
<extent>-16384000 -2097152 -15990784 -1703936</extent>
<srs>EPSG:310032811</srs>
<srsalias>IGNF:GEOPORTALPYF</srsalias>
<srsalias>EPSG:310032009</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="ASP">
<metadata>
<title>Géoportail - Amsterdam et Saint-Paul</title>
</metadata>
<extent>-6791168 1761280 -6553600 2023424</extent>
<srs>EPSG:310642813</srs>
<srsalias>IGNF:GEOPORTALASP</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="TERA">
<metadata>
<title>Terre Adélie 1950</title>
</metadata>
<extent>196098 225276 720386 749564</extent>
<srs>EPSG:2986</srs>
<srsalias>IGNF:TERA50STEREO</srsalias>
<resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<grid name="MILLER">
<metadata>
<title>Géoportail - Monde</title>
</metadata>
<extent>-20037504 -10018752 20037504 10018752</extent>
<srs>EPSG:310642901</srs>
<srsalias>IGNF:MILLER</srsalias>
<resolutions>39135.75 19567.875 9783.9375 4891.96875 2445.984375</resolutions>
<units>m</units>
<size>256 256</size>
</grid>
<!--
a cache is where tiles are stored once they have been rendered
-->
<cache name="disk" type="disk">
<!-- base
absolute filesystem path where the tile structure will be stored.
this directory needs to be readable and writable by the user running
apache
-->
<base>/tmp</base>
<!-- symlink_blank
enable blank (i.e. uniform color) tile detection. blank tiles will be
detected at creation time and linked to a single blank tile on disk to
preserve disk space.
-->
<symlink_blank/>
</cache>
<cache name="tmpl" type="disk">
<!-- template
string template that will be used to map a tile (by tileset, grid name, dimension,
format, x, y, and z) to a filename on the filesystem.
the following replacements are performed:
- {tileset} : the tileset name
- {grid} : the grid name
- {dim} : a string that concatenates the tile's dimension
- {ext} : the filename extension for the tile's image format
- {x},{y},{z} : the tile x,y,z values
- {inv_x}, {inv_y}, {inv_z} : inverted x,y,z values (inv_x = level->maxx - x - 1). This
is mainly used to support grids where one axis is inverted (e.g. the google schema)
and you want to create on offline cache.
* note that this type of cache does not support blank-tile detection and symlinking.
* warning: it is up to you to make sure that the template you chose creates a unique
filename for your given tilesets. e.g. do not ommit the {grid} parameter if your
tilesets reference multiple grids. Failure to do so will result in filename
collisions !
-->
<template>/tmp/template-test/{tileset}#{grid}#{dim}/{z}/{x}/{y}.{ext}</template>
</cache>
<!-- memcache cache
entry accepts multiple <server> entries
requires a fairly recent apr-util library and headers
<cache name="memcache" type="memcache">
<server>
<host>localhost</host>
<port>11211</port>
</server>
</cache>
-->
<!-- sqlite cache
requires building with "with-sqlite"
-->
<cache name="sqlite" type="sqlite3">
<!-- dbfile
absolute filesystem path where the sqlite database files will be stored.
this file needs to be readable and writable by the user running
apache
-->
<dbfile>/tmp/mysqlitetiles.db</dbfile>
<!-- pragma
special sqlite pargmas sent to db at connection time. The following
would execute:
PRAGMA key=value;
usefull for changing default values e.g. on large databases.
-->
<pragma name="key">value</pragma>
</cache>
<!--
<cache name="mbtiles" type="mbtiles">
<dbname_template>/Users/tbonfort/Documents/MapBox/tiles/natural-earth-1.mbtiles</dbname_template>
</cache>
-->
<!-- Berkeley DB cache
note that a bdb cache will create a single database file, even if multiple
tilesets/grids/dimensions are going to be used with it.
if you need to have different db files for each tileset, then create multiple
cache entries
-->
<cache name="bdb" type="bdb">
<!-- base (required)
absolute filesystem path where the berkeley db database file is to be stored.
this directory must exist, and be writable
-->
<base>/tmp/foo/</base>
<!-- key_template (optional)
string template used to create the key for a tile entry in the database.
defaults to the value below. you should include {tileset}, {grid} and {dim} here
unless you know what you are doing, or you will end up with mixed tiles
<key_template>{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}</key_template>
-->
</cache>
<!-- Tokyo Cabinet cache
-->
<cache name="tc" type="tokyocabinet">
<base>/tmp/</base> <!-- will create /tmp/tokyocabinet.tcb , not configurable yet -->
<key_template>{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}</key_template>
</cache>
<!-- format
a format is an image algorithm used for compressing images
types can be "PNG" or "JPEG"
-->
<format name="PNGQ_FAST" type ="PNG">
<!-- compression
png compression: best or fast
note that "best" compression is cpu intensive for little gain over the default
default compression is obtained by leving out this tag.
-->
<compression>fast</compression>
<!-- colors
if supplied, this enables png quantization which reduces the number of colors
in an image to atain higher compression. this operation is destructive, and can
cause artifacts in the stored image.
the number of colors can be between 2 and 256
-->
<colors>256</colors>
</format>
<format name="myjpeg" type ="JPEG">
<!-- quality
JPEG compression quality, ranging from 0 to 100
95 produces high quality images with few visual artifacts
values under around 80 produce small images but with visible artifacts.
YMMV
-->
<quality>75</quality>
<photometric>RGB</photometric> <!-- RGB | YCBCR -->
</format>
<format name="PNG_BEST" type ="PNG">
<compression>best</compression>
</format>
<format name="mixed" type="MIXED">
<transparent>PNG_BEST</transparent>
<opaque>JPEG</opaque>
</format>
<!--
<source name="bluemarble" type="gdal">
<data>/gro2/data/bluemarble/bluemarble.vrt</data>
</source>
-->
<!-- source
the service to query for obtaining images if they are not in the cache
for now, type can only be "wms"
-->
<source name="vmap0" type="wms">
<!-- getmap
extra parameters that will be added to the GetMap request. you can specify any
parameter here, e.g. VERSION if you want to override the version of the WMS
request.
the LAYERS parameter is mandatory.
usual parameters here are FORMAT , or MAP if using mapserver
-->
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<LAYERS>basic</LAYERS>
</params>
</getmap>
<!-- http
http url and parameters that will be used when making WMS requests
-->
<http>
<!-- url
url of the wms service, without any parameters
-->
<url>http://vmap0.tiles.osgeo.org/wms/vmap0</url>
<!-- headers
http headers added to request. make sure you know what you are
doing when adding a header here, as they take precedence over any
default headers curl will be adding to the request.
typical headers that can be added here are User-Agent and Referer.
when adding a <key>value</key> element here, the request to the
wms source will contain the
key: value\r\n
HTTP header.
-->
<!--
<headers>
<User-Agent>mod-mapcache/r175</User-Agent>
<Referer>http://www.mysite.com?param=2&par=4</Referer>
</headers>
-->
<!-- TODO other http parameters
* PROXY
* AUTH
-->
<!-- timeout in seconds before bailing out from a request if no connection was created -->
<connection_timeout>30</connection_timeout>
<!-- timeout in seconds before bailing out from a request. This is the total time needed
to fullfill the request, and includes the time needed to transfer the response through
the network. Defaults to 600 seconds, set to a higher value if e.g. WMS requests for
large metatiles take longer than 10 minutes to render -->
<timeout>300</timeout>
</http>
</source>
<source name="osm" type="wms">
<http>
<url>http://localhost/cgi-bin/mapserv?</url>
</http>
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<LAYERS>default</LAYERS>
<!--<MAP>/Users/tbonfort/dev/mapserver-utils/empty.map</MAP>-->
<MAP>/Users/tbonfort/dev/mapserver-utils/osm-google.map</MAP>
</params>
</getmap>
</source>
<source name="nexrad" type="wms">
<http>
<url>http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi</url>
</http>
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<LAYERS>nexrad_base_reflect</LAYERS>
<TRANSPARENT>true</TRANSPARENT>
</params>
</getmap>
</source>
<source name="basic" type="wms">
<http>
<url>http://geoservices.brgm.fr/geologie?</url>
</http>
<getmap>
<params>
<FORMAT>image/png</FORMAT>
<LAYERS>GRAVI_BASE</LAYERS>
<TRANSPARENT>true</TRANSPARENT>
</params>
</getmap>
<!-- getfeatureinfo
additional parameters to use if you want to enable proxying GetFeatureInfo requests
to this source
-->
<getfeatureinfo>
<!-- info_formats: comma separated list of wms info_formats supported by the source WMS.
you can get this list by studying the source WMS capabilities document.
-->
<info_formats>text/plain,application/vnd.ogc.gml</info_formats>
<!-- KVP params to pass with the request. QUERY_LAYERS is mandatory -->
<params>
<QUERY_LAYERS>GRAVI_BASE</QUERY_LAYERS>
</params>
</getfeatureinfo>
</source>
<!-- tileset
a tileset regroups a <source>, <grid> and <cache>.
the "name" parameter is mandatory, and represents the key by which this tileset
will be requested by clients (e.g. in the WMS LAYERS parameter)
-->
<tileset name="test">
<!-- source: the "name" attribute of a preconfigured <source> -->
<source>vmap0</source>
<!-- cache: the "name" attribute of a preconfigured <cache> -->
<cache>sqlite</cache>
<!-- grid: the "name" attribute of a preconfigured <grid>
you can also use the following notation to limit the area that will be cached and served to clients:
<grid restricted_extent="-10 40 10 50">WGS84</grid>
this way is better than using a grid with a limited extent, as in this way the tiles that are already
cached are not invalidated should you want to modify the restricted extent in the future. When using
the restricted_extent attribute, you should give the corresponding information to the client that will
be using the service.
you can also limit the zoom levels that are cached/accessible by using the minzoom, maxzoom attributes.
NOTE: when adding a <grid> element, you *MUST* make sure that the source you have selected is able to
return images in the grid's srs.
-->
<grid restricted_extent="-10 40 10 50" minzoom="6" maxzoom="8">WGS84</grid>
<grid>g</grid>
<!-- metadata
optional metadata tags used for responding to GetCapabilities request.
you can put anything in here, although only the title and abstract tags
are currently used to populate the GetCapabilities document.
-->
<metadata>
<title>vmap0 map</title>
<abstract>blabla</abstract>
</metadata>
<!-- watermark
optional tag to add a watermark to the tiles *before* storing them to cache
the supplied image MUST be exactly the same size as the size of the tiles
configured in the <grid>
the supplied image is read when the configuration is loaded.
if you make changes to the image, they will NOT be reflected on tiles already
stored in the cache, nor on newly stored tiles until the server is restarted
<watermark>/home/tbonfort/dev/mod-mapcache/static/watermark.png</watermark>
-->
<!-- format
(optional) format to use when storing a tile. this should be a format with high
compression, eg. png with compression "best", as the compression operation is only
done once at creation time.
if left out, no recompression is applied to the image, mod-mapcache will store the
exact image received from the <source>
note that the <format> tag is mandatory if metatile, metabuffer or watermark are
supplied, as in those cases a recompression has to be done.
-->
<format>PNG</format>
<!-- metatile
number of columns and rows to use for metatiling, see http://geowebcache.org/docs/current/concepts/metatiles.html
-->
<metatile>5 5</metatile>
<!-- metabuffer
area around the tile or metatile that will be cut off to prevent some edge artifacts.
if using this, the configured source must be instructed not to put any labels inside
this area, as otherwise this will result in truncated labels (for mapserver, this is
the "labelcache_map_edge_buffer" "-10" metadata entry, along with label PARTIALS FALSE
-->
<metabuffer>10</metabuffer>
<!-- expires
optional expiration value in seconds for a tile. this is expressed in a number of seconds
after the creation date of the tile
This is the value that will be set in the HTTP Expires and Cache-Control headers, and has
no effect on the actual expiration of tiles on the caches. See <auto_expire> for that.
-->
<expires>3600</expires>
<!-- auto_expire
automatically re-request tiles and update the cache once they are older than the given number
of seconds after their creation.
Note that this will only delete tiles form the cache when they are accessed, you cannot
use this configuration to limit the size of the created cache.
Note that if set, this value overrides the value given by <expires>
-->
<auto_expire>86400</auto_expire>
<!-- dimensions
optional dimensions that should be cached
the order of the <dimension> tags inside the <dimensions> is important as it is used
to create the directory structure for the disk cache. i.e. if you change the order of these
values, any tiles that have been previously cached are invalidated (but not removed from the
cache, it's just they don't exist anymore for mod-mapcache
-->
<dimensions>
<!-- values dimension
the example here creates a DIM1 dimension
* WMS and WMTS clients can now add a &DIM1=value to their request string. If they don't
specify this key/value, the default will be to use DIM1=foobar
* the allowed values for DIM1= are foobar (it is important to add the default value to the
allowed values entry), foobarbaz, foo and bar.
* the value specified for DIM1 will be forwarded to the WMS source
* the produced tile will be stored in base/gridname/DIM1/value/xx/xx/xx/xx/xx/xx.png
file. i.e. their are as many different caches created as their are values in the
<values> tag.
-->
<dimension type="values" name="DIM1" default="foobar">foobar,foobarbaz,foo,bar</dimension>
<!-- regex dimension
the following creates a MAPFILE dimension, for using the same mod-mapcache tileset with different
mapserver mapfiles. the name of the mapfiles need not be known to mod-mapcache, and can therefore be
created even after mod-mapcache has been started.
when a user passes a MAPFILE=/path/to/mapfile, the string "/path/to/mapfile" is validated against
the supplied (PCRE) regular expression. The one in this example allows a name composed of aphanumeric characters
spearated by slashes (/) and finishing with ".map" ( [a-zA-Z0-9\./]*\.map$ ) , but will faill if there
are two consecutive dots (..) in the path, to prevent filesystem traversal ( (?!.*\.\.) ).
-->
<dimension type="regex" name="MAPFILE" default="/path/to/mapfile.map">^(?!.*\.\.)[a-zA-Z0-9\./]*\.map$</dimension>
<!-- intervals dimension
the syntax is the same as common-ows, i.e. a comma separated list of "min/max/resolution" entries.
eg:
* 0/5000/1000 allows the values 0,1000,2000,3000,4000 and 5000
* 0/100/0 allows any values between 0 and 100
* both values can be combined: 0/5000/1000,0/100/0
-->
<dimension name="ELEVATION" type="intervals" default="0">0/5000/1000</dimension>
<!-- coming in a future version: support for ISO8601 date/time dimensions -->
</dimensions>
</tileset>
<tileset name="test2">
<source>nexrad</source>
<cache>disk</cache>
<format>mixed</format>
<grid>WGS84</grid>
</tileset>
<tileset name="brgm">
<source>basic</source>
<cache>disk</cache>
<format>PNG</format>
<grid>WGS84</grid>
<metatile>5 5</metatile>
<metabuffer>30</metabuffer>
</tileset>
<!--
<tileset name="natural-earth-1">
<source>osm</source>
<cache>mbtiles</cache>
<format>PNG</format>
<grid>g</grid>
</tileset>
-->
<tileset name="osm">
<metadata>
<title>osm mapserver served map of midi-pyrénées</title>
<abstract>see http://mapserver-utils.googlecode.com</abstract>
</metadata>
<source>osm</source>
<cache>sqlite</cache>
<format>PNG</format>
<grid>FXX</grid>
<grid>MILLER</grid>
<grid>WGS84</grid>
<grid>g</grid>
<metatile>5 5</metatile>
<expires>1</expires>
<!--<auto_expire>86400</auto_expire>-->
<metabuffer>10</metabuffer>
</tileset>
<!--
<tileset name="bluemarble">
<source>bluemarble</source>
<cache>disk</cache>
<metatile>5 5</metatile>
<format>PNG</format>
<grid>google,WGS84</grid>
</tileset>
-->
<!-- default_format
format to use when a client asks for an image that is dynamically created from multiple
tiles from the cache.
note that using a png format with "best" compression is not recommended
here as it comes with a very compression overhead in terms of cpu processing. it is
recommended to use a png format with "fast"compression here, unless you have plenty
of server cpu power and or limited bandwidth
-->
<default_format>JPEG</default_format>
<!-- services
services that will be responded to by mod-mapcache
each service is accessible at the url http://host/path/to/mapcache/{service},
eg http://myhost/mapcache/wms for OGC WMS.
-->
<service type="wms" enabled="true">
<!-- this service should actually be called "ogc". It is different from the other
services as it does not listen on the /wms endpoint, but directly on /.
It will intercept wms getmap requests that can be treated from configured
tilesets, and can optionally forward all the rest to (an)other server(s)
TODO: this needs way more documenting
<forwarding_rule name="foo rule">
<append_pathinfo>true</append_pathinfo>
<http>
<url>http://localhost/mapcacheproxy</url>
</http>
</forwarding_rule>
-->
<!-- full_wms
configure response to wms requests that are not aligned to a tileset's grids.
responding to requests that are not in the SRS of a configured grid is not supported, but
this should never happen as only the supported SRSs are publicized in the capabilities
document.
allowed values are:
- error: return a 404 error (default)
- assemble: build the full image by assembling the tiles from the cache
- forward: forward the request to the configured source.
-->
<full_wms>assemble</full_wms>
<!-- resample mode
filter applied when resampling tiles for full wms requests.
can be either:
- nearest : fastest, poor quality
- bilinear: slower, higher qulity
-->
<resample_mode>bilinear</resample_mode>
<!-- format
image format to use when assembling tiles
-->
<format>myjpeg</format>
<maxsize>4096</maxsize>
</service>
<service type="wmts" enabled="true"/>
<service type="tms" enabled="true"/>
<service type="kml" enabled="true"/>
<service type="gmaps" enabled="true"/>
<service type="ve" enabled="true"/>
<service type="demo" enabled="true"/>
<!-- errors
configure how error will be reported back to a client:
- log : no error is reported back, except an http error code.
- report : return the error message to the client in textual format
- empty_img : return an empty image to the client. the actual error code is in the X-Mapcache-Error http header
- report_img : return an image with the error text included inside. not implemented yet.
the default setting is to report the error message back to the user. In production, you might want to set this to "log"
if you're paranoid, or to "empty_img" if you want to play nice with non-conforming clients.
-->
<errors>report</errors>
<!--
location to put lockfiles (to block other clients while a metatile is being rendered.
defaults to /tmp
this location should be writable by the apache user
-->
<lock_dir>/tmp</lock_dir>
<!-- use multiple threads when fetching multiple tiles (used for wms tile assembling -->
<threaded_fetching>true</threaded_fetching>
<!-- fastcgi only -->
<log_level>info</log_level> <!-- logging verbosity -->
<auto_reload>true</auto_reload> <!-- auto reload if config file changed -->
</mapcache>