Imported just part of the world using osm2pgsql -d gis --slim -C 1000 --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua --hstore ~trent/data/oklahoma-latest.osm.pbf no issues. ran fine. use renderd An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR: relation "icesheet_polygons" does not exist LINE 1: SELECT ST_SRID("way") AS srid FROM icesheet_polygons WHERE "... ^ any ideas what I may be missing? asked 27 Jun '20, 20:35 Trent |
At the risk of stating the bleeding obvious, something has gone wrong with the way that you've loaded the data - the "Shapefile download" section in each of the guides at https://switch2osm.org has changed recently to matches the changes in OSM Carto itself. I'd rerun the steps from there downwards, keeping an eye on any errors displayed on screen. answered 27 Jun '20, 21:07 SomeoneElse ♦ |
Figured out what I was doing wrong. if I use --create on the osm2pgsql and dont rerun the scripts/get-shapefiles.py it will not be in the database. that got me past the earlier error. now I have this renderd[215378]: An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR: COALESCE types text and integer cannot be matched LINE 15: ORDER BY COALESCE(layer,0) ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, waterway, name, CASE WHEN tags->'intermittent' IN ('yes') OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season') THEN 'yes' ELSE 'no' END AS int_intermittent, CASE WHEN tunnel IN ('yes', 'culvert') OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge FROM planet_osm_line WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) ORDER BY COALESCE(layer,0) ) AS water_lines LIMIT 0' encountered during parsing of layer 'water-lines' in Layer at line 7054 of '/home/renderaccount/src/openstreetmap-carto/mapnik.xml' answered 28 Jun '20, 04:04 Trent |
Did you miss to include the style file in your osm2pgsql call? answered 28 Jun '20, 09:53 Spiekerooger |
As @Spekerooger pointed out I forgot my style file on import. Thank everyone Solved if you forget your style file expect the following renderd[215378]: An error occurred while loading the map layer 'ajt': Postgis Plugin: ERROR: COALESCE types text and integer cannot be matched LINE 15: ORDER BY COALESCE(layer,0) ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, waterway, name, CASE WHEN tags->'intermittent' IN ('yes') OR tags->'seasonal' IN ('yes', 'spring', 'summer', 'autumn', 'winter', 'wet_season', 'dry_season') THEN 'yes' ELSE 'no' END AS int_intermittent, CASE WHEN tunnel IN ('yes', 'culvert') OR waterway = 'canal' AND tunnel = 'flooded' THEN 'yes' ELSE 'no' END AS int_tunnel, 'no' AS bridge FROM planet_osm_line WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch') AND (bridge IS NULL OR bridge NOT IN ('yes', 'aqueduct')) ORDER BY COALESCE(layer,0) ) AS water_lines LIMIT 0' answered 28 Jun '20, 11:43 Trent |
Here is the import
osm2pgsql -d gis --create --slim -C 1000 --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua --hstore ~trent/data/oklahoma-latest.osm.bz2 osm2pgsql version 1.2.1 (64 bit id space)
Allocating memory for dense node cache Allocating dense node cache in one big chunk Allocating memory for sparse node cache Sharing dense sparse Node-cache: cache=1000MB, maxblocks=16000*65536, allocation method=11 Mid: pgsql, cache=1000 Setting up table: planet_osm_nodes Setting up table: planet_osm_ways Setting up table: planet_osm_rels Using lua based tag processing pipeline with script /home/renderaccount/src/openstreetmap-carto/openstreetmap-carto.lua Using projection SRS 3857 (Spherical Mercator) Setting up table: planet_osm_point Setting up table: planet_osm_line Setting up table: planet_osm_polygon Setting up table: planet_osm_roads
Reading in file: /home/trent/data/oklahoma-latest.osm.bz2 Using XML parser. Processing: Node(14516k 241.9k/s) Way(1034k 13.98k/s) Relation(7730 1932.50/s) parse time: 138s Node stats: total(14516137), max(7650266568) in 60s Way stats: total(1034427), max(819194812) in 74s Relation stats: total(12246), max(11228623) in 4s Sorting data and creating indexes for planet_osm_point Sorting data and creating indexes for planet_osm_line Sorting data and creating indexes for planet_osm_polygon Sorting data and creating indexes for planet_osm_roads Copying planet_osm_roads to cluster by geometry finished Creating geometry index on planet_osm_roads Copying planet_osm_point to cluster by geometry finished Creating geometry index on planet_osm_point Creating osm_id index on planet_osm_roads Creating indexes on planet_osm_roads finished All indexes on planet_osm_roads created in 7s Completed planet_osm_roads Stopping table: planet_osm_nodes Stopped table: planet_osm_nodes in 0s Stopping table: planet_osm_ways Building index on table: planet_osm_ways Creating osm_id index on planet_osm_point Creating indexes on planet_osm_point finished All indexes on planet_osm_point created in 13s Completed planet_osm_point Stopping table: planet_osm_rels Building index on table: planet_osm_rels Stopped table: planet_osm_rels in 1s Copying planet_osm_polygon to cluster by geometry finished Creating geometry index on planet_osm_polygon Creating osm_id index on planet_osm_polygon Creating indexes on planet_osm_polygon finished All indexes on planet_osm_polygon created in 40s Completed planet_osm_polygon Stopped table: planet_osm_ways in 79s Copying planet_osm_line to cluster by geometry finished Creating geometry index on planet_osm_line Creating osm_id index on planet_osm_line Creating indexes on planet_osm_line finished All indexes on planet_osm_line created in 97s Completed planet_osm_line
Osm2pgsql took 237s overall node cache: stored: 14516137(100.00%), storage efficiency: 55.33% (dense blocks: 654, sparse nodes: 10439284), hit rate: 100.00%
Can you provide more details about what versions of everything you are using?