I wanted to render PNG tiles (like form tile server of OSM). I made PostGIS db, successfully run TileMill with OSMBright style. I read that I need now export Mapnik XML from TileMill. I checked Mapnik as in Python tutorial and everything works fine.
I've changed generate_tiles.py:
- changed the .xml file to read
- changed the bbox (I have checked bbox of small area while exporting to PNG in TileMill)
- changed the render line to
render_tiles(bbox, mapfile, tile_dir, 15, 16 , "mymap")
but an error occurs:
Failed to load fonts from: ./fonts in Map at line 3 of '/home/myacc/bin/mapnik/osm.xml/'
I think the .xml is not made properly (it has written path as reference to current path) but maybe I am wrong.
I am doing it wrong (generate XML from TileMill, put it into ~/bin/mapnik and changing generate_tiles.py)?
Is there a better way to make these tiles?
If not- what I should do to make this work (where are those fonts it can't find (I think there will be more errors with reading files) )
I have checked:
python -c "import mapnik;print mapnik.fontscollectionpath"
and changed the fontpath in osm.xml, but there is no such fonts registered by Mapnik . I printed out known fonts by:
python -c "from mapnik import FontEngine as e;print '\n'.join(e.instance().face_names())"
but there isn't a
font face 'Free Sans Semibold'