I've got a PostGIS database which Mapnik and Tilestache pull from. The mapnik xml has multiple layers as I'm pulling from different tables depending on the zoom - and these different tables have different column names.

The issue is that I'm trying to get around is that it seems using multiple grids within tilestache requires the column names to be the same.

Here's the tilestache cfg:

                "name": "mapnik grid",
                "mapfile": "/usr/local/share/maps/style/OSMBright/OSMBright.xml",
                    [0, ["name", "employees"]],
                    [1, ["name", "employees"]],
                    [2, ["id", "employees"]],
                    [3, ["company_name", "employees"]]

Zooms at layers 0 and 1 work because they have similar column headers. It fails starting at layer 2:

RuntimeError: Postgis Plugin: ERROR: column "name" does not exist LINE 1: ...LECT ST_AsBinary("geom") AS geom,"employees","id","name" FRO... ^ in executeQuery Full sql was: 'SELECT ST_AsBinary("geom") AS geom,"employees","id","name" FROM ( SELECT geom, id, employees FROM blkgrp_2014 ) AS data WHERE "geom" && ST_SetSRID('BOX3D(-10693846.00520928 5028944.964938281,-10684062.06558878 5038728.904558787)'::box3d, 3857)'

For some reason it's looking for the column "name" even though my config has specified to look for "id" - so tilestache is obviously progressively combining the search.

Is there an obvious solution to this? Or do I just add a null value column to each table so the column names match? Seems hacky...

1 Answer 1


Looks like there's a pending merge request from 4 years ago that fixes this issue. I just updated my mapnik.py file to reflect these changes and it worked.

Tilestache Pull Request

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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