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

Last change on this file since 13273 was 12950, checked in by twain, 11 years ago

mod_tile: New apache directives and options for multiple tile sets

File size: 2.5 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#define MAX_LOAD_OLD 5
19// MAX_LOAD_OLD: if tile is missing, don't render it if past this load threshold (user gets 404 error)
20#define MAX_LOAD_MISSING 10
21// MAX_LOAD_ANY: give up serving any data if beyond this load (user gets 404 error)
22#define MAX_LOAD_ANY 100
23
24// Location of osm.xml file
25#define RENDERD_CONFIG "/etc/renderd.conf"
26// The XML configuration used if one is not provided
27#define XMLCONFIG_DEFAULT "Default"
28// Maximum number of configurations that mod tile will allow
29#define XMLCONFIGS_MAX 10
30
31// Mapnik input plugins (will need to adjust for 32 bit libs)
32#define MAPNIK_PLUGINS "/usr/local/lib64/mapnik/input"
33
34// Directory to search for fonts. Recursion can be enabled if desired.
35#define FONT_DIR "/usr/local/lib64/mapnik/fonts"
36#define FONT_RECURSE 0
37
38// Typical interval between planet imports, used as basis for tile expiry times
39#define PLANET_INTERVAL (7 * 24 * 60 * 60)
40
41// Planet import should touch this file when complete
42#define PLANET_TIMESTAMP HASH_PATH "/planet-import-complete"
43
44// Timeout before giving for a tile to be rendered
45#define REQUEST_TIMEOUT (3)
46#define FD_INVALID (-1)
47
48
49#define MIN(x,y) ((x)<(y)?(x):(y))
50#define MAX(x,y) ((x)>(y)?(x):(y))
51
52#define MAX_CONNECTIONS (2048)
53#define NUM_THREADS (4)
54
55// Use this to enable meta-tiles which will render NxN tiles at once
56// Note: This should be a power of 2 (2, 4, 8, 16 ...)
57#define METATILE (8)
58//#undef METATILE
59
60//Fallback to standard tiles if meta tile doesn't exist
61//Legacy - not needed on new installs
62//#undef METATILEFALLBACK
63
64// Metatiles are much larger in size so we don't need big queues to handle large areas
65#ifdef METATILE
66#define QUEUE_MAX (64)
67#define REQ_LIMIT (32)
68#define DIRTY_LIMIT (1000)
69#else
70#define QUEUE_MAX (1024)
71#define REQ_LIMIT (512)
72#define DIRTY_LIMIT (10000)
73#endif
74
75// Penalty for client making an invalid request (in seconds)
76#define CLIENT_PENALTY (3)
77
78#endif
Note: See TracBrowser for help on using the repository browser.