From e47c19beb94c9f7f1fbff1ba7b89a04cb0759ed3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 13 Oct 2020 22:36:17 +0200 Subject: [PATCH] exclude rank 25 when computing addresses of streets Address rank 25 is used for squares which are address-wise on the same level as streets. --- sql/functions/placex_triggers.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/functions/placex_triggers.sql b/sql/functions/placex_triggers.sql index aac7cafc..d8472824 100644 --- a/sql/functions/placex_triggers.sql +++ b/sql/functions/placex_triggers.sql @@ -895,8 +895,9 @@ BEGIN 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 -- 2.39.5