osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3.14k stars 715 forks source link

Geocoding fails when searching for both name and house number #164

Closed scaidermern closed 4 years ago

scaidermern commented 10 years ago

As reported via help.openstreetmap.org the search yields no result when searching for both the name and the house number. Example:

hohl commented 9 years ago

May be related to my bug: When searching for a full address (like "Sample Street 123") it always finds "Sample Street" but not the exact house. (But the exact house number is noted correctly in OSM) Seems to be related with how long the street is too.

arvindkartik commented 5 years ago

I came across a similar issue. Searching for "Upper Camden Street, Saint Kevin's, Dublin 2" would work, but adding a house number to the query would not give any results.

Search query up to street level succeeds

Search query with house number fails

joy-yyd commented 4 years ago

Hello, Regarding the problem mentioned in #1821, we've modified the tag to addr:place=place_name and load the data in local Nominatim, it seems still not able to find the place with House number. Is it possible to add more tags to the parent node? Thanks a lot for your help!

joy-yyd commented 4 years ago

We were testing our data of Austria (downloaded from https://www.geofabrik.de/) with the new release 3.5.1, however, we found many issues with the house number, e.g. 1) We found: https://nominatim.openstreetmap.org/search.php?q=Universit%C3%A4tsklinikum+St.+P%C3%B6lten%2C+Sankt+P%C3%B6lten%2C+3100&polygon_geojson=1&viewbox= Not found with house number: https://nominatim.openstreetmap.org/search.php?q=Universit%C3%A4tsklinikum+St.+P%C3%B6lten%2C+1%2C+Sankt+P%C3%B6lten%2C+3100&polygon_geojson=1&viewbox= 2) Found https://nominatim.openstreetmap.org/search.php?q=Universit%C3%A4tsklinikum+Tulln%2CAlter+Ziegelweg%2CTulln%2C3430&polygon_geojson=1&viewbox= Not found: https://nominatim.openstreetmap.org/search.php?q=Universit%C3%A4tsklinikum+Tulln%2C10%2CAlter+Ziegelweg%2CTulln%2C3430&polygon_geojson=1&viewbox= 3) Found: https://nominatim.openstreetmap.org/search.php?q=Krankenhaus+Theresienhof%2C+Frohnleiten%2C+8130&polygon_geojson=1&viewbox= Not found: https://nominatim.openstreetmap.org/search.php?q=Krankenhaus+Theresienhof+%2C3-5%2CFrohnleiten%2C+8130&polygon_geojson=1&viewbox= We have modified/added the place tags to the data and imported to the database, but not able to fix the issues. Is there a plan to fix this bug in the new release? Thanks a lot for your advice!

lonvia commented 4 years ago

There are no immediate plans for a fix. It's not exactly trivial.

joy-yyd commented 4 years ago

Hello Sarah, I modified the _addressrank as $aTerms[] = 'address_rank between 16 and 30'; in https://github.com/osm-search/Nominatim/blob/master/lib/SearchDescription.php#L660. Wit this change, it seems to have found the places by name with house number for the examples above in Austria. Then, I tested some addresses for the house number with the street and no house number search, the results are the same as the original code. I am wondering if there is a downside of this fix? Or I can ask for a pull request for the change. Many thanks!

lonvia commented 4 years ago

This might work. I don't think there is too much overlap with streets and POI names here. Feel free to do a PR.

lonvia commented 4 years ago

Fixed by #1874.

joy-yyd commented 4 years ago

Hello Sarah, As we are testing the Release 3.5.1, we found that the code seems not changed, though the pull request has been merged, as the following: https://github.com/osm-search/Nominatim/blob/168c2e222ee3792e5c2e9261e2196e182523bce6/lib/SearchDescription.php#L660 Could you help us to merge it again if the code is reverted? Thanks a lot! Joy

lonvia commented 4 years ago

1874 is not in the 3.5.1 release as it was merged later.

joy-yyd commented 4 years ago

ok, thank you Sarah!

juanpelegrina commented 4 years ago

1874 is not in the 3.5.1 release as it was merged later.

any idea on when the next release is planned?

lonvia commented 4 years ago

Tomorrow. However, this particular feature will only be included when we do the 3.6 release which is still a couple of months away.