-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapproxy.yaml
More file actions
172 lines (150 loc) · 5.8 KB
/
Copy pathmapproxy.yaml
File metadata and controls
172 lines (150 loc) · 5.8 KB
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
#########################################################################################################################################
# MapProxy configuration file
# Bruker Kartoza sin MapProxy image server i en Docker container, og har satt opp en cache for å samle inn data fra flere WMS-tjenester.
# Dette gjør at vi kan tilby en samlet tjeneste for ortofoto/satellittbilder fra NPI og Geonorge.
# For mer informasjon om MapProxy, se https://mapproxy.org/
# For mer informasjon om caching og seeding i MapProxy, se https://mapproxy.org/docs/latest/caching.html
# For å kjøre MapProxy i en Docker container, se nederst i denne filen for kommandoer.
#
# Det er aktuel å legge til flere tjenester i samme MapProxy-konfigurasjon, og det er også mulig å sette opp flere caches for
# forskjellige områder eller datakilder. I dette eksempelet har vi satt opp tre caches for Svalbard, Jan Mayen
# og NIB, men det er fullt mulig å legge til flere caches for andre områder eller datakilder. Det viktigste er å sørge
# for at hver cache har riktig konfigurasjon for sin datakilde og område, og at de er koblet til riktig lag i MapProxy-konfigurasjonen.
# Alternativt kan de kjøres i seperate filer og med forskjellig sti artstdatabanken.no/mappproxy/bilde og artsdatabanken.no/mappproxy/janmayen
#for å skille mellom de forskjellige tjenestene.
#
# Laget av Kristian Julien, 2024-06-17 Artsdatabanken
#
# Bruk http://localhost:8080/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities for å legge til tjenesten i QGIS, og velg laget "Bilde (samlet)" for å se ortofoto/satellittbildene fra NPI og Geonorge samlet i en tjeneste.
############################################################################################################################################
services:
wmts:
tms:
wms:
md:
title: Bilde samlet tjeneste
abstract: Sammenslått ortofoto/satellitt fra NPI + Geonorge
srs: ['EPSG:25833']
layers:
- name: bilde
title: Bilde (samlet)
sources:
- svalbard_cache
- bjornoya_cache
- janmayen_cache
- nib_cache
caches:
svalbard_cache:
grids: [utm33_sb]
sources: [svalbard]
cache:
type: file
directory: /mapproxy/cache_data/svalbard
format: image/jpeg
request_format: image/jpeg
bjornoya_cache:
grids: [utm33_bo]
sources: [svalbard]
cache:
type: file
directory: /mapproxy/cache_data/bjornoya
format: image/jpeg
request_format: image/jpeg
janmayen_cache:
grids: [utm33_jm]
sources: [janmayen]
cache:
type: file
directory: /mapproxy/cache_data/janmayen
format: image/jpeg
request_format: image/jpeg
nib_cache:
grids: [utm33_nib]
sources: [nib]
cache:
type: file
directory: /mapproxy/cache_data/nib
format: image/jpeg
request_format: image/jpeg
sources:
svalbard:
type: arcgis
req:
url: https://geodata.npolar.no/arcgis/rest/services/Basisdata/NP_Ortofoto_Svalbard_WMTS_25833/MapServer
janmayen:
type: arcgis
req:
url: https://geodata.npolar.no/arcgis/rest/services/Basisdata/NP_Satellitt_JanMayen_WMTS_25829/MapServer
nib:
type: wms
req:
url: https://wms.geonorge.no/skwms1/wms.nib
layers: nib
format: image/jpeg
grids:
# ✅ Svalbard (din bbox + liten buffer beholdt)
utm33_sb:
srs: EPSG:25833
bbox: [300000, 8400000, 950000, 9050000]
origin: nw
tile_size: [256,256]
res: &res_levels
- 21674.7100160867
- 10837.35500804335
- 5418.677504021675
- 2719.92210651088
- 1354.6693760054188
- 677.3346880027094
- 338.6673440013547
- 169.33367200067735
- 84.66683600033868
- 42.33341800016934
- 21.16670900008467
- 10.583354500042335
- 5.291677250021167
- 2.6458386250105836
# ✅ Bjørnøya (egen, liten og isolert)
utm33_bo:
srs: EPSG:25833
bbox: [600000, 8250000, 640000, 8300000]
origin: nw
tile_size: [256,256]
res: *res_levels
# ✅ Jan Mayen
utm33_jm:
srs: EPSG:25833
bbox: [-400000, 8000000, -250000, 8100000]
origin: nw
tile_size: [256,256]
res: *res_levels
# ✅ Fastlands-Norge (NIB)
utm33_nib:
srs: EPSG:25833
bbox: [-150000, 6350000, 1150000, 8000000]
origin: nw
tile_size: [256,256]
res: *res_levels
globals:
cache:
base_dir: '/mapproxy/cache_data'
lock_dir: '/mapproxy/locks'
max_tile_limit: 500
image:
resampling_method: bicubic
jpeg_quality: 85
http:
client_timeout: 60
headers:
User-Agent: MapProxy
########################################################### Kommandoer for kjøring i terminalvinduet i docker #####################################################################
#
# Kjører scriptet: docker run --rm -it -v C:\GIS\mapproxy:/mapproxy kartoza/mapproxy mapproxy-seed -f /mapproxy/mapproxy.yaml /mapproxy/seed.yaml --concurrency 1
#
# Kjører scriptet: docker run --rm -it -p 8080:8080-v C:\GIS\mapproxy:/mapproxy kartoza/mapproxy mapproxy-seed -f /mapproxy/mapproxy.yaml /mapproxy/seed.yaml --concurrency 1
#
# Kjøring med fast navn og port: docker run --rm -it -p 8080:8080 -v C:\GIS\mapproxy:/mapproxy --name mapproxy_bilde kartoza/mapproxy mapproxy-seed -f /mapproxy/mapproxy.yaml /mapproxy/seed.yaml --concurrency 1
#
# Kjøring uten å bygge cache på nytt: docker run -d -p 8080:8080 -v C:\GIS\mapproxy:/mapproxy --name mapproxy_bilde kartoza/mapproxy
# Kjøring av ny seed i allerede kjørende container: docker exec -it mapproxy_bilde mapproxy-seed -f /mapproxy/mapproxy.yaml /mapproxy/seed.yaml --concurrency 1
#
###################################################################################################################################################################################