/usr/share/pyshared/twms/twms.conf is in twms 0.05t-2.
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 | # -*- coding: utf-8 -*-
# This file is part of tWMS.
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://www.wtfpl.net/ for more details.
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 = 45 # 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 = 75 # 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": "",
"real_name": "",
"organization": ""
}
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 = {\
"yhsat": { \
"name": "Yahoo Satellite",
"prefix": "yhsat", # tile directory
"ext": "jpg", # 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://aerial.maps.yimg.com/ximg?v=1.8&t=a&s=256&r=1&x=%s&y=%s&z=%s",
"transform_tile_number": lambda z,x,y: (x,((2**(z-1)/2)-1)-y,z),
"dead_tile": install_path + "yahoo_nxt.jpg",
"min_zoom": 2,
"max_zoom": 18,
"proj": "EPSG:3857",
},\
"yasat": { \
"name": "Yandex Satellite",
"prefix": "yasat", # tile directory
"ext": "jpg", # 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://sat01.maps.yandex.net/tiles?l=sat&v=1.22.0&x=%s&y=%s&z=%s",
"transform_tile_number": lambda z,x,y: (x,y,z-1),
"dead_tile": install_path + "yandex_nxt.jpg",
"proj": "EPSG:3395",
},\
"osm": { \
"name": "OpenStreetMap mapnik",
"prefix": "osm", # 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://c.tile.openstreetmap.org/%s/%s/%s.png",
"transform_tile_number": lambda z,x,y: (z-1,x,y),
"proj": "EPSG:3857",
"empty_color": "#F1EEE8",
"cache_ttl": 864000,
},\
"osm-be": { \
"name": "OpenStreetMap mapnik - Belarus",
"cached": False,
"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.latlon.org/tiles/%s/%s/%s.png",
"transform_tile_number": lambda z,x,y: (z-1,x,y),
"proj": "EPSG:3857",
"empty_color": "#f2efe9",
"data_bounding_box": (23.16722,51.25930,32.82244,56.18162),
},\
"landsat": { \
"name": "Landsat from onearth.jpl.nasa.gov",
"prefix": "landsat", # tile directory
"ext": "jpg", # tile images extension
"scalable": False, # could zN tile be constructed of four z(N+1) tiles
"fetch": fetchers.WMS, # function that fetches given tile. should return None if tile wasn't fetched
"remote_url": "http://onearth.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&styles=&format=image/jpeg&", # string without srs, height, width and bbox
"max_zoom": 14,
"proj": "EPSG:4326",
"wms_proj": "EPSG:4326", # what projection to ask from wms
},\
"latlonsat": { \
"name": "Imagery from latlon.org",
"prefix": "latlonsat", # tile directory
"ext": "jpg", # tile images extension
"scalable": False, # could zN tile be constructed of four z(N+1) tiles
"fetch": fetchers.WMS, # function that fetches given tile. should return None if tile wasn't fetched
"remote_url": "http://dev.latlon.org/cgi-bin/ms?FORMAT=image/jpeg&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&Layers=sat,plane&", # string without srs, height, width and bbox
"max_zoom": 19,
"proj": "EPSG:3857",
"wms_proj": "EPSG:3857", # what projection to ask from wms
},\
}
|