From: Sarah Hoffmann Date: Wed, 25 Oct 2017 18:11:51 +0000 (+0200) Subject: placex must not return a lookup housenumber X-Git-Tag: v3.1.0~31 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/7eeb79ce67c7c411dee035638b98465e0afd8d30 placex must not return a lookup housenumber --- diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index a48f5597..6d190c2a 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -187,7 +187,7 @@ class PlaceLookup $sSQL .= ' rank_address,'; $sSQL .= ' min(place_id) AS place_id,'; $sSQL .= ' min(parent_place_id) AS parent_place_id,'; - $sSQL .= ' housenumber,'; + $sSQL .= ' -1 as housenumber,'; $sSQL .= ' country_code,'; $sSQL .= $this->langAddressSql('-1'); $sSQL .= ' get_name_by_language(name,'.$this->aLangPrefOrderSql.') AS placename,'; diff --git a/test/bdd/api/reverse/queries.feature b/test/bdd/api/reverse/queries.feature index b860823e..bc88db06 100644 --- a/test/bdd/api/reverse/queries.feature +++ b/test/bdd/api/reverse/queries.feature @@ -32,3 +32,16 @@ Feature: Reverse geocoding And result addresses contain | house_number | road | | 1410 | Juan Antonio Lavalleja | + + Scenario: Address with non-numerical house number + When sending jsonv2 reverse coordinates 53.579805460944,9.9475670458196 + Then result addresses contain + | house_number | road | + | 43 Haus 4 | Stellinger Weg | + + + Scenario: Address with numerical house number + When sending jsonv2 reverse coordinates 53.580206752486,9.9502944945198 + Then result addresses contain + | house_number | road | + | 5 | Clasingstraße |