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

Last change on this file since 6571 was 6571, checked in by jonb, 12 years ago

mod_tile: Implement meta-tiles. Add speed test and tool to allow bulk rendering of tile list from stdin

File size: 1.7 KB
Line 
1#ifndef RENDER_CONFIG_H
2#define RENDER_CONFIG_H
3
4#define MAX_ZOOM 18
5// MAX_SIZE is the biggest file which we will return to the user
6#define MAX_SIZE (1 * 1024 * 1024)
7// IMG_PATH must have blank.png etc.
8#define WWW_ROOT "/var/www/html"
9#define IMG_PATH "/img"
10// TILE_PATH is where Openlayers with try to fetch the "z/x/y.png" tiles from
11#define TILE_PATH "/osm_tiles2"
12// With directory hashing enabled we rewrite the path so that tiles are really stored here instead
13#define DIRECTORY_HASH
14#define HASH_PATH "/direct"
15// MAX_LOAD_OLD: if tile is out of date, don't re-render it if past this load threshold (users gets old tile)
16#define MAX_LOAD_OLD 5
17// MAX_LOAD_OLD: if tile is missing, don't render it if past this load threshold (user gets 404 error)
18#define MAX_LOAD_MISSING 10
19// MAX_LOAD_ANY: give up serving any data if beyond this load (user gets 404 error)
20#define MAX_LOAD_ANY 100
21// Maximum tile age in seconds
22// TODO: this mechanism should really be a hard cutoff on planet update time.
23#define MAX_AGE (48 * 60 * 60)
24
25// Typical interval between planet imports, used as basis for tile expiry times
26#define PLANET_INTERVAL (7 * 24 * 60 * 60)
27
28// Planet import should touch this file when complete
29#define PLANET_TIMESTAMP "/tmp/planet-import-complete"
30
31// Timeout before giving for a tile to be rendered
32#define REQUEST_TIMEOUT (5)
33#define FD_INVALID (-1)
34
35
36#define MIN(x,y) ((x)<(y)?(x):(y))
37#define MAX(x,y) ((x)>(y)?(x):(y))
38
39#define QUEUE_MAX (32)
40#define MAX_CONNECTIONS (256)
41
42#define REQ_LIMIT (32)
43#define DIRTY_LIMIT (1000 * 1000)
44#define NUM_THREADS (4)
45
46// Use this to enable meta-tiles which will render NxN tiles at once
47// Note: This should be a power of 2 (2, 4, 8, 16 ...)
48#define METATILE (8)
49//#undef METATILE
50
51#endif
Note: See TracBrowser for help on using the repository browser.