Hi
I installed mod_tile and mapnik via github. I used the latest version of mod_tile and mapnik 2.2.3
Mapnik is generating tiles, but just when I remove the layer-tags in my mapnik.xml-file.
Otherwise I get the following error messages:
renderd[30711]: An error occurred while loading the map layer 'default': Could not create datasource for type: 'shape'
encountered during parsing of layer 'world' in Layer at line 57 of '/home/user/src/mapnik-style/mapnik.xml'
renderd[30711]: An error occurred while loading the map layer 'default': Could not create datasource for type: 'postgis'
encountered during parsing of layer 'landcover' in Layer at line 87 of '/home/user/src/mapnik-style/mapnik.xml'
I checked the following things and everything looks good for me. Any ideas whats going wrong here?
# cat /etc/renderd.conf
[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile
stats_file=/var/run/renderd/renderd.stats
[mapnik]
plugin_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/truetype
font_dir_recurse=1
[default]
URI=/osm_tiles
TILEDIR=/var/lib/mod_tile
XML=/home/user/src/mapnik-style/mapnik.xml
HOST=localhost
TILESIZE=256
# cat /home/user/src/mapnik-style/mapnik.xml
...
< Layer name="vector" srs="+init=epsg:4236" >
< StyleName > polygon < / StyleName >
< Datasource >
< Parameter name="type" > shape < / Parameter >
< Parameter name="file" > shape/simplified_land_polygons.shp < / Parameter >
< / Datasource >
< / Layer >
...
# ls -l /usr/local/lib/mapnik/input/
-rwxrwxr-x 1 root root 1877090 Apr 23 18:53 gdal.input
-rwxrwxr-x 1 root root 2035952 Apr 23 18:53 ogr.input
-rwxrwxr-x 1 root root 1979191 Apr 23 18:53 postgis.input
-rwxrwxr-x 1 root root 1946084 Apr 23 18:53 raster.input
-rwxrwxr-x 1 root root 3945430 Apr 23 18:53 shape.input
-rwxrwxr-x 1 root root 1981870 Apr 23 18:53 sqlite.input
# cat /usr/lib/python2.7/dist-packages/mapnik/paths.py
"""Configuration paths of Mapnik fonts and input plugins (auto-generated by SCons)."""
from os.path import normpath,join,dirname
mapniklibpath = '/usr/local/lib/mapnik'
mapniklibpath = normpath(join(dirname(__file__),mapniklibpath))
inputpluginspath = join(mapniklibpath,'input')
fontscollectionpath = join(mapniklibpath,'fonts')
__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]
# python -c "from mapnik import DatasourceCache as c; print ','.join(c.plugin_names())"
gdal,ogr,postgis,raster,shape,sqlite
asked
23 Apr '14, 20:53
wqeqew
41●2●2●5
accept rate:
0%
mapnik installed everyhing under /usr/local/lib/mapnik but datasource_cache.cpp tried to load the input-files from /usr/local/lib64/mapnik.
A link or a change in the source code helped here: /usr/local/lib64/mapnik -> /usr/local/lib/mapnik