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

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's gravatar image

wqeqew
41225
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

(24 Apr '14, 13:13) wqeqew
Be the first one to answer this question!
toggle preview

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:

×1

question asked: 23 Apr '14, 20:53

question was seen: 7,619 times

last updated: 24 Apr '14, 14:03

Related questions

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