]> git.openstreetmap.org Git - nominatim.git/commitdiff
placex must not return a lookup housenumber
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Oct 2017 18:11:51 +0000 (20:11 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 25 Oct 2017 18:11:51 +0000 (20:11 +0200)
lib/PlaceLookup.php
test/bdd/api/reverse/queries.feature

index a48f5597e66c2218cd1d79891e382b281a20756d..6d190c2a8047c0f5230504dd013189f69437a2fd 100644 (file)
@@ -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,';
index b860823e596d3dea7bd7795a7186c5f056606cdc..bc88db063b18740bd212e7f12b5e0ef0e7d28caa 100644 (file)
@@ -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 |