NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have the file spain.osm.pbf (~800MB). I can't find any form to convert into tiles tre 0/0/0.pbf... 10/497/400.pbf files (~kb)...

Some clue?

asked 30 Jan '20, 16:04

11sma's gravatar image

11sma
11113
accept rate: 0%

edited 30 Jan '20, 16:21


What you are asking for is "rendering the OSM data into tiles" - this is much more than a simple "conversion". In addition, producing all tiles (the "tree" you speak of) for all of Spain on zoom levels 0-18 will take many days and you'll end up with 100 million files using over 300 GB altogether!

Most people, instead of computing all the tiles, set up a tile server (see switch2osm.org) which can then produce these tiles on demand, instead of creating them all upfront. If you want to create tiles for a smaller area upfront, you can do this with the "Maperitive" GUI software, but doing it for all of Spain will likely require the tile server setup.

One of the inputs for the rendering process is the "map style", i.e. the rules that govern how something is drawn on the map - this information is not contained in the .pbf file you have. The .pbf only has information on where and what something is, not how it appears on the map.

permanent link

answered 30 Jan '20, 16:27

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Hei Frederik! First at all thousands of thanks for your answer and your amazing speed.

I'm going a little deeper even if I'm maybe creating "another post"... but you'll be able to find the "why" of my question.

The initial process that I used was to get osm.pbf and use the https://github.com/openmaptiles/openmaptiles project to generate the file tiles.mbtiles. The process of generate mbtiles took me about 30 minutes (0-14 zoom). Then with these file generate an tileserver with (in this case docker klokantech/tileserver-gl).

I can show these maps in a webbrowser (and in App) with mapbox js with additional one layer... but sometimes with a random tiles (at map or layer) I get blanks in some zooms. I'm going to explain better... - If I do zoom in some place, from for example, 12 to 14, in 13.2 I have blank, even having a status 200 of that tile and having the correct content, but if i go to 13.6 the there is no blank and the content is shown perfectly. - Same if I do vertical or horizontal movement. With the same tile the content are appearing or not, seems random... - If I do F5, with the same 200 status in all tiles magicly appears or magicly not...

I don't know if blame the generation of mbtiles, but seems to be here the problem. If i use some free tiler provider, the map works perfect for all zooms and all moves. But the generation of tiles is a process large proved (openmaptiles software at github) and the original data comes from (test 1: catalonia.osm.pbf (a region)) from geofabrik and (test 2: spain-latest.osm.pbf) from direct ./quickstart spain that download (I guess) official data...

By other way... in a powerful mobile or a light map prototype, works better than the app or webapp (more heavy)... Then the problem is the component? I guess not too... with the free maptiler works fine...

Sorry for the extension and praying for some light in that weird issue.... Lots of thanks anticipated for the help and read, could you give an answer or not.

P.S.: The reason to create pbf tiles was to test another way to serve the pbf files instead using tilserver with the mbtiles file.

permanent link

answered 03 Feb '20, 10:04

11sma's gravatar image

11sma
11113
accept rate: 0%

edited 03 Feb '20, 10:28

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×47

question asked: 30 Jan '20, 16:04

question was seen: 2,688 times

last updated: 03 Feb '20, 18:16

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum