I created my osm file in JOSM, and i imported it to my database by osm2pgsql tool. I created new layer in my osm.xml file, which selecting data with query:
select way from planet_osm_line,
(select parts from planet_osm_rels WHERE (((hstore(tags)->'level')) = '0')) p
where osm_id = any (p.parts))
when i run my python script to generate png file i got an error:
RuntimeError: Postgis Plugin: PostGIS: unable to query the layer extent of table 'planet_osm_rels' because we cannot determine the geometry field name. Please provide either an 'extent' parameter to skip this query, a 'geometry_field' and/or 'geometry_table' parameter, or add a record to the 'geometry_columns' for your table.
is any one can tell me what i'm doing wrong and how i can fix that?