Closed jgrocha closed 8 years ago
I was not able to isolate the problem.
What you you mean by "not able to isolate"? It sounds like an issue in your postgres setup, maybe something incredibly simple like two postgres versions running on different ports or dtwo tools working in similar named but different databases, but it might also be a bug in the way the importer creates the view, especially in regard to #6
Hi Guys,
I know it is an old thread, but did you find a solution? I am having a very similar issue.
File "./generate_image.py", line 42, in <module>
mapnik.load_map(m,mapfile)
RuntimeError: Postgis Plugin: ERROR: relation "gis_polygon" does not exist
LINE 3: from gis_polygon
^
in executeQuery Full sql was: 'SELECT * FROM (select way,aeroway,amenity,landuse,leisure,man_made,military,"natural",power,tourism,name,highway,
case when religion in ('christian','jewish') then religion else 'INT-generic'::text end as religion
from gis_polygon
where landuse is not null
or leisure is not null
or aeroway in ('apron','aerodrome')
or amenity in ('parking','university','college','school','hospital','kindergarten','grave_yard','prison')
or military in ('barracks','danger_area')
or "natural" in ('field','beach','desert','heath','mud','grassland','wood','sand','scrub')
or power in ('station','sub_station','generator')
or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')
or highway in ('services','rest_area')
order by z_order,way_area desc
) as leisure LIMIT 0'
encountered during parsing of layer 'landcover' in Layer at line 341 of 'osm.xml'
@TimMarlow haven't looked at this project for years, but gis* sounds wrong. The Script generates a postgresql-view, named something like hist, for rendering. This view is then a slice in time on which the rendering is performed. So I'd expect the style access some table named hist_, not gis_*.
On the other hand, this is a bug-tracker, not a user-question forum. You probably get a better answer on the osm-dev Mailinglist.
Hi @MaZderMind
Thanks for responding, I have managed to sort this, apologies for not updating the thread.
The issue was caused by my typo when setting up mapnik-stylesheets, I entered the wrong prefix for the DB tables in /inc/datasource-settings.xml
, confusing it with my DB name. Hence, when running generatetiles.py it was looking for tables that started `gisrather than the default of
planet_osm`.
I don't seem able to close this as I guess it isn't mine to close, but consider the matter sorted.
Hi,
I've imported the data to Postgis and it runs fine. When I run the render, I get an error.
I get the error:
Bu the view do exist in the database. If I copy and paste the query to pgAdmin, it runs.
I'm using: mapnik-input-plugin-postgis 2.3.0+dev20140426.git.a4985b3-1~trusty1 postgresql-9.3 "POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
I'm trying to find the problem.