mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
use centroid for near feature search on rank 30
Rank 30 has some very large geometries (peninsulas, time zones, etc.) for which a near feature search for the full geometry is too expensive, so do the search on the centroid only.
This commit is contained in:
@@ -1681,8 +1681,10 @@ BEGIN
|
|||||||
-- RAISE WARNING ' getNearFeatures(%,''%'',%,''%'')',NEW.partition, place_centroid, search_maxrank, isin_tokens;
|
-- RAISE WARNING ' getNearFeatures(%,''%'',%,''%'')',NEW.partition, place_centroid, search_maxrank, isin_tokens;
|
||||||
FOR location IN
|
FOR location IN
|
||||||
SELECT * from getNearFeatures(NEW.partition,
|
SELECT * from getNearFeatures(NEW.partition,
|
||||||
CASE WHEN NEW.rank_search >= 26 THEN NEW.geometry
|
CASE WHEN NEW.rank_search >= 26
|
||||||
ELSE place_centroid END,
|
AND NEW.rank_search < 30
|
||||||
|
THEN NEW.geometry
|
||||||
|
ELSE place_centroid END,
|
||||||
search_maxrank, isin_tokens)
|
search_maxrank, isin_tokens)
|
||||||
LOOP
|
LOOP
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user