OpenStreetMap, Mapnik and Tirex solved errors

Veröffentlicht am Veröffentlicht in OpenStreetMap

Error 1:

tirex-backend-mapnik[pid]: no valid fonts could be loaded in FontSet 'book-fonts' in FontSet at line 82 of '/usr/share/mapnik-osm-data/osm.xml'
tirex-backend-mapnik[pid]: cannot add /etc/tirex/renderer/mapnik/osm.conf

Check your „fontdir“ setting in mapnik.conf (f. exp. located at /etc/tirex/renderer/mapnik.conf)

$ grep fontdir /etc/tirex/renderer/mapnik.conf
fontdir=/usr/lib/mapnik/fonts

You should have certain symlinks with the target /usr/share/fonts there are put the fonts into the directory /usr/lib/mapnik/fonts. Please keep in mind the fonts has to be registered too, so mapnik can use them.

$ ls -l /usr/lib/mapnik/fonts/
total 56
lrwxrwxrwx 1 root root 63 Jan 16 2013 DejaVuSans-BoldOblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
lrwxrwxrwx 1 root root 56 Jan 16 2013 DejaVuSans-Bold.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
lrwxrwxrwx 1 root root 72 Jan 16 2013 DejaVuSansCondensed-BoldOblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-BoldOblique.ttf
lrwxrwxrwx 1 root root 65 Jan 16 2013 DejaVuSansCondensed-Bold.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Bold.ttf
lrwxrwxrwx 1 root root 68 Jan 16 2013 DejaVuSansCondensed-Oblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-Oblique.ttf
lrwxrwxrwx 1 root root 60 Jan 16 2013 DejaVuSansCondensed.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
lrwxrwxrwx 1 root root 62 Jan 16 2013 DejaVuSans-ExtraLight.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-ExtraLight.ttf
lrwxrwxrwx 1 root root 67 Jan 16 2013 DejaVuSansMono-BoldOblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
lrwxrwxrwx 1 root root 60 Jan 16 2013 DejaVuSansMono-Bold.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
lrwxrwxrwx 1 root root 63 Jan 16 2013 DejaVuSansMono-Oblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
lrwxrwxrwx 1 root root 55 Jan 16 2013 DejaVuSansMono.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
lrwxrwxrwx 1 root root 59 Jan 16 2013 DejaVuSans-Oblique.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
lrwxrwxrwx 1 root root 51 Jan 16 2013 DejaVuSans.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
lrwxrwxrwx 1 root root 63 Jan 16 2013 DejaVuSerif-BoldItalic.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf
lrwxrwxrwx 1 root root 57 Jan 16 2013 DejaVuSerif-Bold.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
lrwxrwxrwx 1 root root 72 Jan 16 2013 DejaVuSerifCondensed-BoldItalic.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-BoldItalic.ttf
lrwxrwxrwx 1 root root 66 Jan 16 2013 DejaVuSerifCondensed-Bold.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Bold.ttf
lrwxrwxrwx 1 root root 68 Jan 16 2013 DejaVuSerifCondensed-Italic.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-Italic.ttf
lrwxrwxrwx 1 root root 61 Jan 16 2013 DejaVuSerifCondensed.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf
lrwxrwxrwx 1 root root 59 Jan 16 2013 DejaVuSerif-Italic.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf
lrwxrwxrwx 1 root root 52 Jan 16 2013 DejaVuSerif.ttf -> /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
lrwxrwxrwx 1 root root 45 Jan 16 2013 unifont.ttf -> /usr/share/fonts/truetype/unifont/unifont.ttf

Follow the relevant part the following blog post to integrate new fonts, so mapnik recognize them: http://sajjad.in/2010/05/setting-up-mapnik-for-rendering-tiles-in-your-language/

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert