use extra place_entrance table

This commit is contained in:
Sarah Hoffmann
2025-10-23 16:03:15 +02:00
parent b042eca382
commit a93113bc44
2 changed files with 2 additions and 9 deletions

View File

@@ -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

View File

@@ -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)