I have a Raspberry Pi 3 moving around in my city. It shows information on a monitor via hdmi. Now it should also display a map of the current position. The Pi has no connection to the internet and will not get one.

I installed tilestache. The example is running fine but if I try to use a mbtiles map from openmaptiles, tilestache is complaining about the pbf format: - - [16/Jun/2017 12:00:17] "GET /osm/10/168/398.png HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 209, in run_wsgi
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 197, in execute
    application_iter = app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 413, in __call__
    status_code, headers, content = requestHandler2(self.config, path_info, query_string, script_name)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 286, in requestHandler2
    status_code, headers, content = layer.getTileResponse(coord, extension)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/Core.py", line 432, in getTileResponse
    tile = self.render(coord, format)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/Core.py", line 519, in render
    tile = provider.renderTile(width, height, srs, coord)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/MBTiles.py", line 217, in renderTile
    mime_type, content = get_tile(self.tileset, coord)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/MBTiles.py", line 159, in get_tile
    mime_type = formats[format]
KeyError: 'pbf'

As far as I know, tilestache does not support pbf format in mbtiles. I also have map data in osm.pbf from Geofabrik but I did not found anything about how to use that with tilestache. Can I make tilestache to use osm.pbf?

  • Please clarify your question. Right now you are mixing a problem and a general question. geofabrik does not provide mbtiles, pbf is something completely different. – bugmenot123 Jun 16 '17 at 10:48
  • @bugmenot123 sorry for being imprecisely but the whole topic is new for me. I cannot put too much time into it for the sake of economics so I have to find a fast solution or a totally different one. – aProgger Jun 16 '17 at 11:10
  • mbtiles containes rendered tiles while PBF contains raw vector data. So in fact you are searching for a tool that creates/renders mbtiles from a PBF file. – scai Jun 16 '17 at 11:22

openmaptiles.org offers mbtiles downloads for the whole planet as well as for individual countries and cities. It is the successor of osm2vectortiles.org.

It contains also a documentation for generating your own OpenMapTiles.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.