1

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?

2
  • Did you ever figure this out? I suspect it's to do with the -> operation (which I don't know about) because I get this error when using "SUBSTRING" in my query. Commented Jun 5, 2012 at 17:34
  • i still didn't solve that, operation -> is in some extension to postgres (don't remember the name of it), hstore() change list to hashmap and operator -> returns value from hashmap with given key
    – user902383
    Commented Jul 3, 2012 at 8:44

0

Your Answer

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