From: Sarah Hoffmann Date: Mon, 15 Apr 2019 20:43:07 +0000 (+0200) Subject: add reverse zoom level that includes minor streets X-Git-Tag: v3.3.0~10 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/a9ae2c74571a56dc5b89a8a8ac1acc91b3f1e285 add reverse zoom level that includes minor streets Zoom 17 now also resolves service roads and similar. Fixes #1350. --- diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index ff20691a..50060ee0 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -36,8 +36,8 @@ class ReverseGeocode 13 => 18, 14 => 22, // Suburb 15 => 22, - 16 => 26, // Street, TODO: major street? - 17 => 26, + 16 => 26, // major street + 17 => 27, // minor street 18 => 30, // or >, Building 19 => 30, // or >, Building ); @@ -246,12 +246,7 @@ class ReverseGeocode $sSQL .= ' placex'; $sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', geometry, '.$fSearchDiam.')'; $sSQL .= ' AND'; - // only streets - if ($iMaxRank == 26) { - $sSQL .= ' rank_address = 26'; - } else { - $sSQL .= ' rank_address between 26 and '.$iMaxRank; - } + $sSQL .= ' rank_address between 26 and '.$iMaxRank; $sSQL .= ' and (name is not null or housenumber is not null'; $sSQL .= ' or rank_address between 26 and 27)'; $sSQL .= ' and (rank_address between 26 and 27';