]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ReverseGeocode.php
add reverse zoom level that includes minor streets
[nominatim.git] / lib / ReverseGeocode.php
index ff20691a3912457ed99b3746da3f27e93e6f9cb9..50060ee00e91ba7dc4b05ca149af25c38ecfe5b2 100644 (file)
@@ -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';