[OSM-dev] [GSoC] Data tiles - demo

Michael Daines michael at mdaines.com
Sat Jul 14 17:49:13 BST 2012


Hello,

I now have a small demo of my data tiles project online here:

  http://data-tiles.mdaines.com/

This shows data tiles for the SF bay area at various zoom levels rendered as an overlay over image tiles. The tiles can also be used to render map images with Kothic JS -- choose the "Kothic" base layer and deselect the "Debug" layer.

The tiles were rendered using the library I am working on here:

  https://github.com/mdaines/render-data-tiles

The tiles were produced as follows:

- The SF bay area metro extract was obtained from http://metro.teczno.com/ and imported into a PostGIS database using osm2pgsql (with the --store option)
- Land polygons were obtained from http://openstreetmapdata.com/ and imported.
- The script/build command from my project was then used to render data tiles for the area imported at zoom levels 9-13 using the "basic.rb" configuration file included in my project's repository. This produces an MBTiles database with zlib compressed JSON tiles.

The viewer.rb application from my project is used to serve the tiles from the MBTiles database. Since tiles are stored compressed, and their sha1 hash is used to avoid duplication in the database, the application can serve the tiles compressed and set etag headers with little added cost.

At zoom levels 9-12, the tiles include a subset of the features available from the osm2pgsql import, and the features' geometry is simplified. At zoom level 13, the tiles include all features without simplification. At all zoom levels, all tags from the import are available. This configuration file which determines this is here:

  https://github.com/mdaines/render-data-tile/blob/master/basic.rb

I am interested in feedback on what subset of OSM data would be useful to include in an "official" set of tiles, particular at lower zoom levels. However, the idea is that it should also be possible to build whatever kind of tileset you want for your purposes.


-- Michael




More information about the dev mailing list