source: subversion/applications/utils/mod_tile/render_config.h @ 16728

Last change on this file since 16728 was 15861, checked in by jochen, 10 years ago

another step towards making tile directory configurable at runtime (still some places left that use hardcoded HASH_PATH)

File size: 2.8 KB
Line 
1#ifndef RENDER_CONFIG_H
2#define RENDER_CONFIG_H
3
4#define MAX_ZOOM 18
5
6// MAX_SIZE is the biggest file which we will return to the user
7#define MAX_SIZE (1 * 1024 * 1024)
8
9// With directory hashing enabled we rewrite the path so that tiles are really stored here instead
10#define DIRECTORY_HASH
11#define HASH_PATH "/var/lib/mod_tile"
12
13// TILE_PATH is where Openlayers with try to fetch the "z/x/y.png" tiles from
14// this is now only used if DIRECTORY_HASH is undefined
15//#define TILE_PATH "/var/www/html/osm_tiles2"
16
17// MAX_LOAD_OLD: if tile is out of date, don't re-render it if past this load threshold (users gets old tile)
18// (This is the default value. Can be overwritten in Apache config with ModTileMaxLoadOld.)
19#define MAX_LOAD_OLD 5
20// MAX_LOAD_MISSING: if tile is missing, don't render it if past this load threshold (user gets 404 error)
21// (This is the default value. Can be overwritten in Apache config with ModTileMaxLoadMissing.)
22#define MAX_LOAD_MISSING 10
23// MAX_LOAD_ANY: give up serving any data if beyond this load (user gets 404 error)
24#define MAX_LOAD_ANY 100
25
26// Location of osm.xml file
27#define RENDERD_CONFIG "/etc/renderd.conf"
28// The XML configuration used if one is not provided
29#define XMLCONFIG_DEFAULT "default"
30// Maximum number of configurations that mod tile will allow
31#define XMLCONFIGS_MAX 10
32
33// Mapnik input plugins (will need to adjust for 32 bit libs)
34#define MAPNIK_PLUGINS "/usr/local/lib64/mapnik/input"
35
36// Default directory to search for fonts. Recursion can be enabled if desired.
37#define FONT_DIR "/usr/local/lib64/mapnik/fonts"
38#define FONT_RECURSE 0
39
40// Typical interval between planet imports, used as basis for tile expiry times
41#define PLANET_INTERVAL (7 * 24 * 60 * 60)
42
43// Planet import should touch this file when complete
44#define PLANET_TIMESTAMP "/planet-import-complete"
45
46// Timeout before giving for a tile to be rendered
47// (This is the default value. Can be overwritten in Apache config with ModTileRequestTimeout.)
48#define REQUEST_TIMEOUT (3)
49#define FD_INVALID (-1)
50
51
52#define MIN(x,y) ((x)<(y)?(x):(y))
53#define MAX(x,y) ((x)>(y)?(x):(y))
54
55#define MAX_CONNECTIONS (2048)
56
57// default for number of rendering threads
58#define NUM_THREADS (4)
59
60// Use this to enable meta-tiles which will render NxN tiles at once
61// Note: This should be a power of 2 (2, 4, 8, 16 ...)
62#define METATILE (8)
63//#undef METATILE
64
65//Fallback to standard tiles if meta tile doesn't exist
66//Legacy - not needed on new installs
67//#undef METATILEFALLBACK
68
69// Metatiles are much larger in size so we don't need big queues to handle large areas
70#ifdef METATILE
71#define QUEUE_MAX (64)
72#define REQ_LIMIT (32)
73#define DIRTY_LIMIT (1000)
74#else
75#define QUEUE_MAX (1024)
76#define REQ_LIMIT (512)
77#define DIRTY_LIMIT (10000)
78#endif
79
80// Penalty for client making an invalid request (in seconds)
81#define CLIENT_PENALTY (3)
82
83#endif
Note: See TracBrowser for help on using the repository browser.