mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 21:54:10 +03:00
replace final reference to way-node index with spatial lookup
This commit is contained in:
parent
27ce2afbcf
commit
1eb52879c6
@ -1546,9 +1546,9 @@ BEGIN
|
||||
|
||||
--RAISE WARNING 'x1';
|
||||
-- Is this node part of a way?
|
||||
FOR way IN select id from planet_osm_ways where nodes @> ARRAY[NEW.osm_id] LOOP
|
||||
--RAISE WARNING '%', way;
|
||||
FOR location IN select * from placex where osm_type = 'W' and osm_id = way.id
|
||||
FOR location IN select p.* from placex p, planet_osm_ways w
|
||||
where p.osm_type = 'W' and p.rank_search >= 26
|
||||
and p.geometry && NEW.geometry and p.osm_id = w.id and NEW.osm_id = any(w.nodes)
|
||||
LOOP
|
||||
--RAISE WARNING '%', location;
|
||||
-- Way IS a road then we are on it - that must be our road
|
||||
@ -1599,7 +1599,6 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
END LOOP;
|
||||
END LOOP;
|
||||
|
||||
END IF;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user