kartograph/kartograph.py

Can't draw polygons with key 'natural' from postgis

Opened this issue · 0 comments

I'd like to draw polygons representing rivers and such. Checking from openstreetmap, I know that the polygons I want to draw are only tagged as natural: water. Making sure that 'natural' column is in default.style file, I try to generate the map, only to yield a syntax error:
cli.py, in render_map()
71: K.generate(cfg, args.output, preview=args.preview, format=format, stylesheet=css) kartograph.py, in generate()
46: _map = Map(opts, self.layerCache, format=format) map.py, in init()
61: layer.get_features() maplayer.py, in get_features()
81: charset=layer.options['charset'] layersource/postgislayer.py, in get_features()
64: cur.execute('SELECT "%s" FROM %s WHERE %s' % ('", "'.join(fields), self.table, query))
syntax error at or near "="
LINE 1: ...ea", "way" FROM planet_osm_polygon WHERE (natural = 'water')...

My json configuration is as follows:

"layers": {

    "water": {
        "src": "postgis:dbname=osm",
        "table": "planet_osm_polygon",
        "query": "natural = 'water'"}

}