Tile data server
This page is about downloading OSM data, in portions large enough to annoy the API, but small enough that you don't want to setup the entire planet.osm processing infrastructure yourself.
Contents |
Situation
Downloading OSM data is done via the API. The format is defined as:
GET /api/0.6/map?bbox=W,S,E,N
However, there are several problems with that:
- no guarantee of getting data back (node limit)
- using it while not actively editing is considered abuse
- bbox isn't very convenient way of specifying boundary
- tile renderers would prefer to specify zoom/x/y
- results aren't very cacheable
XAPI offers a similar service and is hosted on several different servers with varying speeds.
planet.osm is available, but there are several problems with that too:
- 8GB of (heavily-compressed) download
- difficult to quickly extract the area you want
- ways only contain the node IDs, not lat/long (so you have to store all 240,000,000 nodes and query them efficiently just to test if a particular way is anywhere near your map)
Suggestion
What if a server were available that supported
GET /api/0.6/tiledata/z/x/y
then a renderer could simply download the data for a tile it's interested in
What else might benefit
Downloading data to mobile devices, and keeping track of the downloaded areas
When routing, start by downloading your local tile, and just keep downloading more tiles when your route wanders off the edge of the area
Implementations
- Trapi - up and running. Used by tiles@home clients
- OJW's tile data server
- tiledata2