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

Last change on this file since 15609 was 15609, checked in by jochen, 11 years ago
  • Added Apache config options for MAX_LOAD_OLD, MAX_LOAD_MISSING and REQUEST_TIMEOUT, defined in C code are only default values now
  • Preparation for adding minzoom and maxzoom to config
File size: 2.7 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// 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 HASH_PATH "/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#define NUM_THREADS (4)
57
58// Use this to enable meta-tiles which will render NxN tiles at once
59// Note: This should be a power of 2 (2, 4, 8, 16 ...)
60#define METATILE (8)
61//#undef METATILE
62
63//Fallback to standard tiles if meta tile doesn't exist
64//Legacy - not needed on new installs
65//#undef METATILEFALLBACK
66
67// Metatiles are much larger in size so we don't need big queues to handle large areas
68#ifdef METATILE
69#define QUEUE_MAX (64)
70#define REQ_LIMIT (32)
71#define DIRTY_LIMIT (1000)
72#else
73#define QUEUE_MAX (1024)
74#define REQ_LIMIT (512)
75#define DIRTY_LIMIT (10000)
76#endif
77
78// Penalty for client making an invalid request (in seconds)
79#define CLIENT_PENALTY (3)
80
81#endif
Note: See TracBrowser for help on using the repository browser.