From: Sarah Hoffmann Date: Fri, 13 Dec 2024 08:00:26 +0000 (+0100) Subject: Merge pull request #3609 from lonvia/reverse-ignore-postcode-areas X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/046665f8d9b0cd11d59c8470e34833bc02b569ce?hp=0862671104461d470648f4052720bd055a276393 Merge pull request #3609 from lonvia/reverse-ignore-postcode-areas Ignore postcode areas on reverse --- diff --git a/src/nominatim_api/reverse.py b/src/nominatim_api/reverse.py index 8a75c5b9..c9f11b63 100644 --- a/src/nominatim_api/reverse.py +++ b/src/nominatim_api/reverse.py @@ -362,6 +362,8 @@ class ReverseGeocoder: # later only a minimum of results needs to be checked with ST_Contains. inner = sa.select(t, sa.literal(0.0).label('distance'))\ .where(t.c.rank_search.between(5, MAX_RANK_PARAM))\ + .where(t.c.rank_address != 5)\ + .where(t.c.rank_address != 11)\ .where(t.c.geometry.intersects(WKT_PARAM))\ .where(sa.func.PlacexGeometryReverseLookuppolygon())\ .order_by(sa.desc(t.c.rank_search))\