NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,
I am setting up mapserver on a local system following instructions at: https://switch2osm.org/manually-building-a-tile-server-18-04-lts. This went well and afterwords, I have tried to import entire planet (planet-latest.osm.pbf) using osm2pgsql the same way as mentioned in the post. After successful import, I have tried to pre-render tiles using render_list (render_list -m ajt -a -z $zoom_level -Z $zoom_level) and I did it from layer 0 to 14. During this time I observed an error in the log file saying that relation "planet_osm_polygon" does not exist and also map did not look at all like it had layer 14 pre-rendered (at zoom level 10 or so it was mostly blank). So, I stopped rendering and have tried to re-import a small island Saba (planet-saba-141121.osm.pbf) and I have tried to initiate rendering through zoom in/out on the map. This worked well for all layer. After that, I have tried to re-import South America and initiate rendering of some area again through zoom in/out, but rendering of certain areas resulted in the same error that I hit with render_list. Below is excerpt from the log file. I have checked postgres and table in question is there (see below). Could somebody please help me understand the problem and solve the issue? I am running this on a system that has 132GB memory and 16 Intel Xeon cpus @2.1GHz.
Thanks a lot!

renderd[3347]: Rendering projected coordinates 18 82368 123296 ->
-7445578.051206|1187525.671439 -7444355.058754|1188748.663892 to a 8 x 8 tile renderd[3347]: ERROR: failed to render TILE ajt 18 82368-82375 123296-123303 renderd[3347]:    reason: Postgis Plugin: ERROR:  relation "planet_osm_polygon" does not exist LINE 28:     FROM planet_osm_polygon
                  ^ in executeQuery Full sql was: 'SELECT ST_AsBinary("way") AS geom,"feature","name","religion","way_pixels" FROM (SELECT
    way, name, religion, way_pixels,
    COALESCE(aeroway, amenity, wetland, power, landuse, leisure, man_made, "natural", tourism, highway, railway) AS feature   FROM (SELECT
      way, COALESCE(name, '') AS name,
      ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,
      ('amenity_' || (CASE WHEN amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi',
                                            'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic', 'ferry_terminal',
                                            'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station',
                                            'fire_station', 'police') THEN amenity ELSE NULL END)) AS amenity,
      ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass',
                                            'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
                                            'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
                                            'brownfield', 'landfill', 'construction', 'plant_nursery', 'religious') THEN landuse ELSE NULL END)) AS landuse,
      ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden',
                                            'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch',
                                            'track', 'dog_park', 'fitness_station') THEN leisure ELSE NULL END)) AS leisure,
      ('man_made_' || (CASE WHEN man_made IN ('works', 'wastewater_plant', 'water_works') THEN man_made ELSE NULL END)) AS man_made,
      ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural",
      ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'marsh', 'mud') THEN (CASE WHEN "natural" IN ('marsh', 'mud') THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland,
      ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,
      ('tourism_' || (CASE WHEN tourism IN ('camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism,
      ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,
      ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,
      CASE WHEN religion IN ('christian', 'jewish', 'muslim') THEN religion ELSE 'INT-generic'::text END AS religion,
      way_area/NULLIF(0.597164::real*0.597164::real,0) AS way_pixels,
      way_area
    FROM planet_osm_polygon
    WHERE (landuse IS NOT NULL
      OR leisure IS NOT NULL
      OR aeroway IN ('apron', 'aerodrome')
      OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten',
                     'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility',
                     'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police')
      OR man_made IN ('works', 'wastewater_plant','water_works')
      OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')
      OR power IN ('station', 'sub_station', 'substation', 'generator')
      OR tourism IN ('camp_site', 'caravan_site', 'picnic_site')
      OR highway IN ('services', 'rest_area')
      OR railway = 'station')
      AND way_area > 1*0.597164::real*0.597164::real   ) AS landcover   ORDER BY way_area DESC, feature ) AS features WHERE "way" && ST_SetSRID('BOX3D(-7445654.48823473
1187449.234410851,-7444278.621725596 1188825.100919985)'::box3d, 3857)' renderd[3347]: DEBUG: DONE TILE ajt 18 82368-82375 123296-123303 in 0.027 seconds renderd[3347]: DEBUG: Sending render cmd(4 ajt 18/82368/123298) with protocol version 2 to fd 9

postgres=# \c gis
You are now connected to database "gis" as user "postgres".
gis=# \dt;
              List of relations
 Schema |        Name        | Type  | Owner 
--------+--------------------+-------+-------
 public | planet_osm_line    | table | user
 public | planet_osm_nodes   | table | user
 public | planet_osm_point   | table | user
 public | planet_osm_polygon | table | user
 public | planet_osm_rels    | table | user
 public | planet_osm_roads   | table | user
 public | planet_osm_ways    | table | user
 public | spatial_ref_sys    | table | user
(8 rows)

gis=# \dx;
                                     List of installed extensions
  Name   | Version |   Schema   |                             Description

---------+---------+------------+---------------------------------------------------------------------
 hstore  | 1.4     | public     | data type for storing sets of (key, value) pairs
 plpgsql | 1.0     | pg_catalog | PL/pgSQL procedural language
 postgis | 2.4.3   | public     | PostGIS geometry, geography, and raster spatial types and functions
(3 rows)

gis=#

asked 12 Dec '18, 14:57

brh2's gravatar image

brh2
11112
accept rate: 0%

edited 12 Dec '18, 15:21

I'm guessing that perhaps you're trying to access something in postgres that you don't have access to? Perhaps double-check the user you're doing things from?

(12 Dec '18, 17:52) SomeoneElse ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×440

question asked: 12 Dec '18, 14:57

question was seen: 2,936 times

last updated: 12 Dec '18, 17:52

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum