forked from hans/Nominatim
replace final reference to way-node index with spatial lookup
This commit is contained in:
@@ -1546,9 +1546,9 @@ BEGIN
|
|||||||
|
|
||||||
--RAISE WARNING 'x1';
|
--RAISE WARNING 'x1';
|
||||||
-- Is this node part of a way?
|
-- Is this node part of a way?
|
||||||
FOR way IN select id from planet_osm_ways where nodes @> ARRAY[NEW.osm_id] LOOP
|
FOR location IN select p.* from placex p, planet_osm_ways w
|
||||||
--RAISE WARNING '%', way;
|
where p.osm_type = 'W' and p.rank_search >= 26
|
||||||
FOR location IN select * from placex where osm_type = 'W' and osm_id = way.id
|
and p.geometry && NEW.geometry and p.osm_id = w.id and NEW.osm_id = any(w.nodes)
|
||||||
LOOP
|
LOOP
|
||||||
--RAISE WARNING '%', location;
|
--RAISE WARNING '%', location;
|
||||||
-- Way IS a road then we are on it - that must be our road
|
-- Way IS a road then we are on it - that must be our road
|
||||||
@@ -1599,7 +1599,6 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END LOOP;
|
END LOOP;
|
||||||
END LOOP;
|
|
||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user