From a93113bc44ac46fe5c7ae1e6fd19f4bff6c94e0b Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 23 Oct 2025 16:03:15 +0200 Subject: [PATCH] use extra place_entrance table --- lib-sql/functions/placex_triggers.sql | 5 ----- lib-sql/functions/utils.sql | 6 ++---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql index 600ba401..2e7911ee 100644 --- a/lib-sql/functions/placex_triggers.sql +++ b/lib-sql/functions/placex_triggers.sql @@ -683,11 +683,6 @@ DECLARE BEGIN {% if debug %}RAISE WARNING '% % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;{% endif %} - IF NEW.class IN ('routing:entrance', 'entrance') THEN - -- We don't need entrance nodes in the placex table. - RETURN NULL; - END IF; - NEW.place_id := nextval('seq_place'); NEW.indexed_status := 1; --STATUS_NEW diff --git a/lib-sql/functions/utils.sql b/lib-sql/functions/utils.sql index aea6d296..eeee4b0e 100644 --- a/lib-sql/functions/utils.sql +++ b/lib-sql/functions/utils.sql @@ -634,10 +634,8 @@ DECLARE BEGIN osm_ids := '{}'; FOR entrance in SELECT osm_id, type, geometry, extratags - FROM place - WHERE osm_type = 'N' - AND osm_id IN (SELECT unnest(nodes) FROM planet_osm_ways WHERE id=osmid) - AND class IN ('routing:entrance', 'entrance') + FROM place_entrance + WHERE osm_id IN (SELECT unnest(nodes) FROM planet_osm_ways WHERE id=osmid) LOOP osm_ids := array_append(osm_ids, entrance.osm_id); INSERT INTO placex_entrance (place_id, osm_id, type, location, extratags) -- 2.39.5