mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-09 11:34:07 +00:00
use extra place_entrance table
This commit is contained in:
@@ -683,11 +683,6 @@ DECLARE
|
|||||||
BEGIN
|
BEGIN
|
||||||
{% if debug %}RAISE WARNING '% % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type;{% endif %}
|
{% 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.place_id := nextval('seq_place');
|
||||||
NEW.indexed_status := 1; --STATUS_NEW
|
NEW.indexed_status := 1; --STATUS_NEW
|
||||||
|
|
||||||
|
|||||||
@@ -634,10 +634,8 @@ DECLARE
|
|||||||
BEGIN
|
BEGIN
|
||||||
osm_ids := '{}';
|
osm_ids := '{}';
|
||||||
FOR entrance in SELECT osm_id, type, geometry, extratags
|
FOR entrance in SELECT osm_id, type, geometry, extratags
|
||||||
FROM place
|
FROM place_entrance
|
||||||
WHERE osm_type = 'N'
|
WHERE osm_id IN (SELECT unnest(nodes) FROM planet_osm_ways WHERE id=osmid)
|
||||||
AND osm_id IN (SELECT unnest(nodes) FROM planet_osm_ways WHERE id=osmid)
|
|
||||||
AND class IN ('routing:entrance', 'entrance')
|
|
||||||
LOOP
|
LOOP
|
||||||
osm_ids := array_append(osm_ids, entrance.osm_id);
|
osm_ids := array_append(osm_ids, entrance.osm_id);
|
||||||
INSERT INTO placex_entrance (place_id, osm_id, type, location, extratags)
|
INSERT INTO placex_entrance (place_id, osm_id, type, location, extratags)
|
||||||
|
|||||||
Reference in New Issue
Block a user