-
Notifications
You must be signed in to change notification settings - Fork 0
/
twms.conf
74 lines (64 loc) · 3.39 KB
/
twms.conf
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
# -*- coding: utf-8 -*-
# This file is part of tWMS.
# tWMS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# tWMS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with tWMS. If not, see <http://www.gnu.org/licenses/>.
#
import fetchers
debug = True
max_ram_cached_tiles = 1024
tiles_cache = "/var/cache/twms/tiles/" # where to put cache
install_path = "/usr/share/twms/" # where to look for broken tiles and other stuff
gpx_cache = "/var/cache/twms/traces/" # where to store cached OSM GPX files
deadline = 90 # number of seconds that are given to make up image
default_max_zoom = 18 # can be overridden per layer
geometry_color = { # default color for overlayed vectors
"LINESTRING": "#ff0000",
"POLYGON": "#0000ff",
"POINT": "#00ff00",
}
default_layers = "" # layer(s) to show when no layers given explicitly. if False, overview is shown.
max_height = 4095 # maximal image proportions
max_width = 4095
output_quality = 100 # output image quality (matters for JPEG)
output_progressive = True # should image be progressive? (matters for JPEG)
output_optimize = False # should image be optimized? (matters for PNG)
default_background = "#ffffff" # default background for empty space
default_vector_renderer = "cairo" # "PIL" or "cairo"
## stuff used for GetCapabilities
service_url = "http://localhost:8080/" # URL service installed at
wms_name = "twms based web map service"
default_bbox = (-180.0,-85.0511287798,180.0,85.0511287798) # spherical mercator maximum.
default_format = "image/jpeg"
contact_person = {
"mail": "[email protected]",
"real_name": "Deon Thomas",
"organization": "Air Services Limited"
}
cache_tile_responses = {
# (projection, layers, filters, width, height, force, format): (path, ext)
("EPSG:3857", ("base",), (), 256, 256, (), "image/jpeg"): ("/disk/base3857/", "jpg"),
("EPSG:3857", ("base",), (), 256, 256, (), "image/png"): ("/disk/base3857/", "png"),
}
## Available layers.
layers = {\
"ocm": { \
"name": "OpenCycleMap",
"prefix": "ocm", # tile directory
"ext": "png", # tile images extension
"scalable": False, # could zN tile be constructed of four z(N+1) tiles
"fetch": fetchers.Tile, # function that fetches given tile. should return None if tile wasn't fetched
"remote_url": "http://tile.thunderforest.com/outdoors/%s/%s/%s.png?apikey=6170aad10dfd42a38d4d8c709a536f38",
"transform_tile_number": lambda z,x,y: (z-1,x,y),
"proj": "EPSG:3857",
"empty_color": "#F1EEE8",
"cache_ttl": 864000,
},\
}