Computed display names in my nominatim are wrong. #3767
Replies: 3 comments 1 reply
-
The dataset your are trying to use is in fact a bit tricky for Nominatim. When Nominatim computes the address for a POI like a hotel, then it tries to "cheat" by simply finding the nearest street and use the address from that street. That saves a lot of computation resources and usually gets a good-enough result. Except, when you have a dataset with places and POIs but almost no streets. No streets at all would be fine. Nominatim falls back to computing the address from the places. What I think happened here though is that your filtering for some reason let a few roads through. Anything even remotely close will now use the address of the roads that slipped past the filter. There are two ways to solve the problem:
|
Beta Was this translation helpful? Give feedback.
-
So, it says it figured Ibis Salmiya is on Block 7 Rumaithiya, fine, I look it up:
The hotel coordinates are not even within the bounding box of the area. So, I guess this confirms what you're saying @lonvia . Great and thanks for the quick response. Question: How does nominatim recognize roads/streets/etc. Is it a straightforward tag that I can filter out (or include in), or does it involve some magic? I can include the nodes but remove the tags if such tags are tripping nominatim. |
Beta Was this translation helpful? Give feedback.
-
Let me try. I still haven't figured out how to do custom import styles (just using the vanilla docker image with my custom extract). Will experiment a bit. Thanks again for your help. Much appreciated. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First off, thank you all for the great effort in putting this package together. I can imagine the complexity and the number of issues that you had to solve to get it where it is.
The problem
I'm building my local nominatim installation. I finally managed to get it running, after going through many trials. It's up, and I'm happy for that.
First address I tried is for a local hotel here.
This is the "official API" link, which provides CORRECT results.
Name: Hotel Ibis Salmiya Hotel, Salem Al-Mubarak Street, Salmiya - Block 4, Salmiya, Hawalli Governorate, 20004, Kuwait
Also:
https://nominatim.openstreetmap.org/ui/details.html?osmtype=N&osmid=1769820822
This is a link to my installation for the same node. The address is TOTALLY INCORRECT. It's off by a few kilometers.
display name: "Ibis Salmiya Hotel, Hassan Al-Banna Street, Block 7, Rumaithiya-Block 7, Rumaithiya, Hawalli Governorate, 20003, Kuwait"
Link: http://172.105.91.247:8081/details?osmtype=N&osmid=1769820822&addressdetails=1
How did I build the database?
I downloaded the planet-yyyy-mm-dd.obs.pbf file and wrote a program that extracts all nodes/ways/rels that have admin_level tag and boundary=administrative and also all nodes/ways/rels referenced by them. I also included anything with a tourism tag and again, with all nodes/ways/rels referenced by them. The resulting pbf file was 1.4GB containing all admin boundaries and tourism POIs in the world (which is what I need, or thought I need).
Digging into the location in reverse
Doing reverse lookup at the lat lon points to the same hotel,
http://172.105.91.247:8081/reverse?lat=29.3427005&lon=48.0765085&format=json&zoom=18
If I zoom a little bit up, I get:
http://172.105.91.247:8081/reverse?lat=29.3427005&lon=48.0765085&format=json&zoom=16
which is actually the CORRECT neighborhood.
So, something is off here in the construction of the database. I either extracted something when I shouldn't have, or forgot to include something that's essential, or something like that. Of course I'm new here, so, this was my first stab at the problem.
What was I trying to achieve in the first place.
I want accurate full names (or display names) of all touristic places (hotels, motels, museums, etc.) in the world. I used stuff tagged "tourism" and stuff tagged "admin_level" and "boundary=administrative" and everything needed by them. What did I miss? I have no idea what nodes/ways/rels nominatim uses internally, so, I'm totally in the dark here. Please help.
Beta Was this translation helpful? Give feedback.
All reactions