]> git.openstreetmap.org Git - nominatim.git/commitdiff
exclude rank 25 when computing addresses of streets
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 13 Oct 2020 20:36:17 +0000 (22:36 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 13 Oct 2020 20:36:17 +0000 (22:36 +0200)
Address rank 25 is used for squares which are address-wise on the
same level as streets.

sql/functions/placex_triggers.sql

index aac7cafcdca0cb24768ba2ec874b3ec0c61b9a22..d847282486391566fc5393d2647813c4bc03dce7 100644 (file)
@@ -895,8 +895,9 @@ BEGIN
   END IF;
 
   SELECT * FROM insert_addresslines(NEW.place_id, NEW.partition,
   END IF;
 
   SELECT * FROM insert_addresslines(NEW.place_id, NEW.partition,
-                                    CASE WHEN NEW.rank_address = 0
-                                      THEN NEW.rank_search ELSE NEW.rank_address END,
+                                    CASE WHEN NEW.rank_address = 0 THEN NEW.rank_search
+                                         WHEN NEW.rank_address > 25 THEN 25::smallint
+                                         ELSE NEW.rank_address END,
                                     NEW.address,
                                     CASE WHEN NEW.rank_search >= 26
                                              AND NEW.rank_search < 30
                                     NEW.address,
                                     CASE WHEN NEW.rank_search >= 26
                                              AND NEW.rank_search < 30