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

I have an OSM tile server that I built using switch2osm "Building a tile server from packages". It works fine. Now I want to make some styling changes. I have set up openstreetmap-carto as per the instructions. When I create the xml file I get the same error as described in a previous post

I took the advice there and now get SQL errors:

ERROR:  column "pixel_width" does not exist LINE 2: ...y, "natural", waterway, landuse, name, way_area/(!pixel_widt...                                                              ^ Full sql was: 'SELECT * FROM (SELECT     way, "natural", waterway, landuse, name, way_area/(!pixel_width!*!pixel_height!) AS way_pixels   FROM planet_osm_polygon   WHERE     (waterway IN ('dock', 'riverbank', 'canal')       OR landuse IN ('reservoir','basin')       OR "natural" IN ('lake','water','land','glacier','mud'))     AND building IS NULL     AND way_area/(!pixel_width!*!pixel_height!) > 0.01   ORDER BY z_order, way_area) AS water_areas LIMIT 0'  (encountered during parsing of layer 'water-areas' in map '/etc/mapnik-carto/ma

Any help would be fantastic.

Harold Ship

asked 01 Oct '14, 12:57

haroldship's gravatar image

accept rate: 0%


A couple of notes from IRC when this was first raised:

The required mapnik version was increased to 2.1.0 in May. I'm fairly sure that someone's been through the "packages" switch2osm instructions since then (though perhaps with a different stylesheet?) so maybe there wasn't a requirement for Mapnik 2.1 immediately.

The lines causing the error with your older Mapnik seem to have been introduced on August 14th. One workaround would be to get a local copy of openstreetmap-carto via "git clone" and then checkout an earlier version from there, perhaps via:

git checkout `git rev-list -n 1 --before="2014-08-14 00:01" master`

That might work.

In the longer term an update to or a replacement for the "packages" version of the switch2osm instructions (which is under way, I believe) is probably what's needed.

(01 Oct '14, 14:04) SomeoneElse ♦

You need to upgrade your Mapnik version. Without knowing details about how you installed Mapnik and OS versions and other information, I can't suggest an exact course of action but you might want to

permanent link

answered 02 Oct '14, 16:03

pnorman's gravatar image

accept rate: 18%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 01 Oct '14, 12:57

question was seen: 41,981 times

last updated: 02 Oct '14, 16:03

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