I'm very new and very confused about how to accomplish a seemingly simple task: generate my own OSM .png tiles for offline use. Since I want to be able to have a huge amount of tiles, I don't want to load the server by downloading tiles directly from I was using Creating your own tiles, but learned that this method is outdated with the new styling method: mapnik-stylesheets issue #15 Since this is all new to me, I'm quite confused at the sheer number of methods and tools I've seen recommended to download, format, and render OSM tiles. As far as my progress, here are the steps I have taken:
I'm at a loss at where to go from here with my current understanding of how this all works. If anyone can point me in the right direction, I'd greatly appreciate it. asked 13 Jul '19, 00:23 Karmic Creditor |
2 Answers:
What I'd suggest is:
The problem with generate_tiles.py is that it'll complain about unused font definitions in the stylesheet. Edit: As noted below this will generate metatiles, not .png tiles, which probably isn't the best route here. answered 13 Jul '19, 00:41 SomeoneElse ♦ edited 13 Jul '19, 11:09 |
(Two years later) You could also use my beefed up version of answered 15 Mar '21, 20:38 Marcos Dione |
I did have to edit the
osm.xml
to remove all fonts exceptDeja Vu Sans
because of the complaining. The errors/warnings I get when running the scripts are similar toattribute 'maximum-scale-denominator' with value '100000' at line 0
, which, if I understand correctly, is because of the new styles used by OSM. I will try your method and report back.@SomeoneElse
The method you suggested works great. One thing I'm curious about is the diary entry you mentioned. When calling
render_list
, it seems to create.meta
files. Does this produce.png
files somewhere I'm not looking?.meta files are containers that contain 64 PNG files each. To extract .png from .meta, either run mod_tile in your Apache web server and run lots and lots of "wget" or "curl" commands against your own web server, or use https://github.com/geofabrik/meta2tile to go from meta to png without mod_tile/Apache.
It sounds like you're nearly there - just one comment about "I did have to edit the osm.xml to remove all fonts except Deja Vu Sans because of the complaining":
You might find it easier to edit the stylesheet (the thing you run "carto" on) rather than editing the generated .xml directly. If you can find out what's causing the problem you can probably edit it out in one place in a .mss file rather than many from the generated .xml.
Thank you two for the help. I will use meta2tile when the render_list completes