Qwant / kartotherian_docker

Docker deployment for Qwant Maps tile server, based on Kartotherian (https://github.com/kartotherian/kartotherian)
Apache License 2.0
29 stars 12 forks source link

exec.py load-db fails at update_osm_city_point #144

Closed dspangenberg closed 2 years ago

dspangenberg commented 2 years ago

Hi,

unfortunately, the docker command fails on update_osm_city_point:

./exec.py load-db

...

load_all:ERR] psql:/tmp/tmpe7d6ylt_:3368: NOTICE:  trigger "trigger_flag" for relation "osm_city_point" does not exist, skipping
[load_all:ERR] psql:/tmp/tmpe7d6ylt_:3369: NOTICE:  schema "place_city" does not exist, skipping
[load_all:ERR] psql:/tmp/tmpe7d6ylt_:3371: NOTICE:  extension "unaccent" already exists, skipping
[load_all:ERR] psql:/tmp/tmpe7d6ylt_:3418: ERROR:  column ne.gn_ascii does not exist
[load_all:ERR] LINE 13:           ne.gn_ascii ILIKE osm.name OR
[load_all:ERR]                    ^
[load_all:ERR] QUERY:  WITH important_city_point AS (
[load_all:ERR]       SELECT osm.geometry, osm.osm_id, osm.name, osm.name_en, ne.scalerank, ne.labelrank
[load_all:ERR]       FROM ne_10m_populated_places AS ne, osm_city_point AS osm
[load_all:ERR]       WHERE
[load_all:ERR]       (
[load_all:ERR]           (osm.tags ? 'wikidata' AND osm.tags->'wikidata' = ne.wikidataid) OR
[load_all:ERR]           ne.name ILIKE osm.name OR
[load_all:ERR]           ne.name ILIKE osm.name_en OR
[load_all:ERR]           ne.namealt ILIKE osm.name OR
[load_all:ERR]           ne.namealt ILIKE osm.name_en OR
[load_all:ERR]           ne.meganame ILIKE osm.name OR
[load_all:ERR]           ne.meganame ILIKE osm.name_en OR
[load_all:ERR]           ne.gn_ascii ILIKE osm.name OR
[load_all:ERR]           ne.gn_ascii ILIKE osm.name_en OR
[load_all:ERR]           ne.nameascii ILIKE osm.name OR
[load_all:ERR]           ne.nameascii ILIKE osm.name_en OR
[load_all:ERR]           ne.name = unaccent(osm.name)
[load_all:ERR]       )
[load_all:ERR]       AND osm.place IN ('city', 'town', 'village')
[load_all:ERR]       AND ST_DWithin(ne.geometry, osm.geometry, 50000)
[load_all:ERR]   )
[load_all:ERR]   UPDATE osm_city_point AS osm
[load_all:ERR]   -- Move scalerank to range 1 to 10 and merge scalerank 5 with 6 since not enough cities
[load_all:ERR]   -- are in the scalerank 5 bucket
[load_all:ERR]   SET "rank" = CASE WHEN scalerank <= 5 THEN scalerank + 1 ELSE scalerank END
[load_all:ERR]   FROM important_city_point AS ne
[load_all:ERR]   WHERE osm.osm_id = ne.osm_id
[load_all:ERR] CONTEXT:  PL/pgSQL function update_osm_city_point() line 11 at SQL statement
Docker command failed

The config is unchanged and it fails on Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2; Hardware: AMD EPYC 7451 24-Core Processor with 256GB RAM and 633GB left on SSD.

Has anyone a clue how to fix this?

Thank and best regards, Danny

remi-dupre commented 2 years ago

Hi! Sorry for the slow response, we had very few time to work on the tile generation recently. It appears that it was due to a change in the natural earth schema a while ago, which was fixed by #146