[GIS] Starting Tile Sever Rendering Error: OSMBright.xml

apachemapnikopenstreetmappostgistile-server

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>

Best Answer

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"
Related Question