2

I try to use mapnik render for a tile server. During the initialization 'renderd -f -c /usr/local/etc/renderd.conf', the following error message is displayed :

An error occurred while loading the map layer 'xxx': Could not create 
datasource for type: 'postgis'  encountered during parsing of layer
'line features' in Layer at line 19 of 'XXX/test.xml'

There is no "No plugin found for type ' postgis '" displayed.

The file XXX/test.xml is the following :

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
 %entities;
 ]>

<Map bgcolor="#B5D2CE" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
<Style name="all_roads">
 <Rule>
  <LineSymbolizer>
   <CssParameter name="stroke">#800080</CssParameter>
   <CssParameter name="stroke-width">1.4</CssParameter>
  </LineSymbolizer>
 </Rule>
</Style>

<Layer name="line features" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">
 <StyleName>all_roads</StyleName>
  <Datasource>
   <Parameter name="type">postgis</Parameter>
   <Parameter name="password">XXX</Parameter>
   <Parameter name="host">localhost</Parameter>
   <Parameter name="port">5432</Parameter>
   <Parameter name="user">XXX</Parameter>
   <Parameter name="dbname">XXX</Parameter>
   <Parameter name="table">(select way from planet_osm_line where highway is not null) as roads</Parameter>
   <Parameter name="estimate_extent">false</Parameter>
   <Parameter name="extent">-20037508,-19929239,20037508,19929239</Parameter>
 </Datasource>
</Layer>
</Map>

Can you help me? Thanks

1

If you are using an earlier version of Mapnik, then I think you should update the Mapnik version to 2.x and build again from source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.