]> git.openstreetmap.org Git - nominatim.git/commitdiff
make sure step is taken into account for interpolations
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 9 Feb 2022 20:42:28 +0000 (21:42 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 9 Feb 2022 20:42:28 +0000 (21:42 +0100)
lib-php/SearchDescription.php

index a7b26c1281049e9b388640887ece1cce5d6db40b..fbf6b650bc9ee8dffcdfc738e15239e5d2bc69a9 100644 (file)
@@ -650,7 +650,8 @@ class SearchDescription
             if (preg_match('/^[0-9]+$/', $this->sHouseNumber)) {
                 $sIpolHnr = 'WHERE parent_place_id = sin.place_id ';
                 $sIpolHnr .= '  AND startnumber is not NULL AND sin.address_rank < 30';
-                $sIpolHnr .= '  AND '.$this->sHouseNumber.' between startnumber and endnumber ';
+                $sIpolHnr .= '  AND '.$this->sHouseNumber.' between startnumber and endnumber';
+                $sIpolHnr .= '  AND ('.$this->sHouseNumber.' - startnumber) % step = 0';
 
                 $sInterpolSql = 'SELECT array_agg(place_id) FROM location_property_osmline '.$sIpolHnr;
                 if (CONST_Use_US_Tiger_Data) {