source: subversion/sites/other/trapi/INSTALL @ 12298

Last change on this file since 12298 was 12298, checked in by blarson, 6 years ago

Tiled Read-only API

Serves osm data optimized for tiles@home.

File size: 2.7 KB
2trapi has only been tested on Debian unstable on x86 machines, but
3should work on any modern unix-derived OS.  For Debian, you will need
4the packages listed in packages.  (or equivelents if you prefer
5another web server than apache2.)  The data files are
6endian-independent.  Porting to Microsoft would be a challenge, there
7are subtle dependencies on a reasonable OS.
9The time on the system should be close to correct.  If it is off by
10more than a minute it could affect the data update process.  The map
11fcgi-bin program will refuse to serve data if the clock is too far in
12the future.
13 has several constants defined, most of which shouldn't be
15touched.  VERBOSE is for how many messages to output.  1 will be only
16detected problems in the data, 25 will be many debugging messages.
17TRAPIDIR is where the trapi data files are stored, which should be on
18a filesystem set up for many small files.  If using ext2 or ext3,
19directory indexing should be on and using a 1 or 2kbyte allocation
20will save disk space.  DBDIR is for the indexes that are larger files.
21MAXOPEN is the number of data files to open at once, not including the
22indexes.  Bigger is generally better if your OS can handle it.
23KEEPOPEN should be a bit less, closer to MAXOPEN will mean more CPU
24and less file opening.  SPLIT is the number of bytes in a node data
25file before splitting to higher zoom.
28Initial data load:
30   cleardb
31   bzcat planet.bz2 |
32   echo YYYYMMDD >timestamp
34YYYYMMDD is the day before the planet file was generated.  It's better
35to reprocess a bit of duplicated data than miss something.  The
36initial data load is disk IO intensive and will take several days.
39Updating the data:
41 |
43This will fetch the daily, hourly, and minute diff files and update
44the trapi database.  It will complete processing the currently fetched
45data then stop if the file stopfile.txt exists.  timestamp will be
46updated as the diff files are processed.
49Garbage collection:
53Garbage collection must be done when nothing else is updating the
54database.  It takes a little over a day.  How often this should be
55done is to be determined.  stopfile.txt will stop the garbage
59Web access:
61map is a fastcgi script.  Your web server should be configured so
62api/0.5/map?bbox= requests will go to it.
66Trapi will return more data than requested.  All request are rounded
67up to z14 tile boundaries, and in low node density areas may be up to
68z11.  Some tags not used by tiles@home are not stored by trapi.  The
69user and timestamp information is also not stored.  This is fine for
70tiles@home, but trapi data must not be uploaded to openstreetmap.
71Ways and relations that are no longer in the requested area may be
Note: See TracBrowser for help on using the repository browser.