2

I was following the entire process found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/

I have an error though on Testing your tileserver part where i run the following commands

sudo -u username renderd -f -c /usr/local/etc/renderd.conf

Encountered this error: renderd[6166]: An error occurred while loading the map layer 'default': Could not create datasource. Required parameter 'type' is missing encountered during parsing of layer 'land-low' in Layer at line 48 of '/usr/local/share/maps/style/OSMBright/OSMBright.xml'

What have I missed?

Edit: Here are the lines in OSMBright.xml, the first line here is line 46 so line 48 is the line with srs

<Layer name="land-low"
status="on"
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>land-low</StyleName>
    <Datasource>
        <Parameter name="dbname"><![CDATA[osm]]></Parameter>
        <Parameter name="extent"><![CDATA[-20037508.34 -20037508.34 20037508.34 20037508.34]]></Parameter>
        <Parameter name="file"><![CDATA[/usr/local/share/maps/style/osm-bright-master/shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp]]></Parameter>
        <Parameter name="srs"><![CDATA[+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over]]></Parameter>
    </Datasource>
</Layer>
  • Can you add the cited line of OSMBright.xml to your question? – AndreJ Jul 14 '15 at 7:29
  • Edited the question. @AndreJ – The Bassman Jul 14 '15 at 7:38
2

I'm working on automating this guide so people won't have as much trouble, as I too struggled in some spots. Anyway your error is in this part of the guide:

Double check and make sure this is all correct.

vim osm-bright/osm-bright.osm2pgsql.mml

Find the lines with URLs pointing to shapefiles (ending .zip) and replace each one with these appropriate pairs of lines:

"file": "/usr/local/share/maps/style/osm-bright-master/shp/land-polygons-split-3857/land_polygons.shp", 
"type": "shape"

"file": "/usr/local/share/maps/style/osm-bright-master/shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp", 
"type": "shape",

"file": "/usr/local/share/maps/style/osm-bright-master/shp/ne_10m_populated_places_simple/ne_10m_populated_places_simple.shp", 
"type": "shape"
| improve this answer | |
1

I don't know if you found out what the problem was but in my case it was that the /usr/local/etc/renderd.conf file was wrongfully configurated. That tutorial says to put this:

plugins_dir=/usr/lib/mapnik/input

but it should be:

plugins_dir=/usr/local/lib/mapnik/input 

local is missing.

| improve this answer | |

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.