rinigus / geocoder-nlp

Geocoder library based on libpostal normalization of libosmscout generated database
MIT License
21 stars 1 forks source link

Please don't merge POI tags #36

Closed palbr closed 6 years ago

palbr commented 6 years ago

From: https://talk.maemo.org/showthread.php?p=1539768#post1539768

Do you do some kind of tag merging, when creating the OSM Scout Server database? In OsmAnd I can search for POI with tag "amenity _library" or "amenity_police". In OSM Scout Server database libraries and police stations in my hometown can be found, but only by their name. And the type is listed by PoorMaps as "Building".

In my opinion, it would be helpful, to be able to explicitly search for "libraries" or "police stations" by tag, since if I am new in town, I don't know the name of the library.

@rinigus:

As far as I remember, types are merged in the import and assigned as only one for POI. Hence the problem. ... When designing geocoder, I was mainly focused on getting results by name since that was really poor. Now it's time to look into search by type as in nearby search and make it work well.

rinigus commented 6 years ago

Hi! I am working on geocoder now and would like to look into this issue. Would you mind to send an example for this case?

palbr commented 6 years ago

Nice to hear that. My problem back in January 2018 was: When I want to search for a "police station", searching the POI database of OSM Scout Server via PoorMaps did not bring up any POIs when searching with the string "police". Same result (no hits) when searching with string "library".

The reason seemed to be that those POIs have not been stored in the database with the tag "library" or "amenity_library" but only with the tag "building".

I don't know, if this issue is still valid. I need to update OSM Scout Server, PoorMaps and the map data to test this again. Hope I will find some time at the weekend.

rinigus commented 6 years ago

OK, amenity_police was missing. I have added it now. As for why library was merged with building, I need to check. Please send me specific example (address, OSM URL, or something else which will allow me to find it on OSM). In my town, libraries are shown as such. See https://www.openstreetmap.org/way/26900375 for example

rinigus commented 6 years ago

PS: If you wish, you could send me PM with the details at TMO

palbr commented 6 years ago

For todays test I used:

Detailled Example:

Let's imagine this use case: I traveled to the German City "Nürnberg" and want to find a library there.

In this example I used the "Stadtbibliothek Zentrum" (https://www.openstreetmap.org/way/135339856). This library is registered in OSM and I can find it in WhoGo Maps (with OSM Scout Server as backend) when searching for its name "Stadtbibliothek" (near "Nürnberg", search radius = "5 km"). But if I change "type" in the search dialog from "Stadtbibliothek" to "library", I get no search results.

For me it looks like:

palbr commented 6 years ago

Working well:

Using the tag "restaurant" to find something to eat, this mechanism is working fine already. Restaurants like "Kokoro" (https://www.openstreetmap.org/node/775972744) can be found by name and POI type / tag.

Also works nice for: "pharmacy"

palbr commented 6 years ago

Failing, too: Those searches also failed when searching for POI type / tag, but worked when searching for POI name:

Those searches also failed when searching for POI type / tag (they don't have POI names):

rinigus commented 6 years ago

Library, police, and playground were missing as types, now added. Also shop types are not specified (will be addressed at https://github.com/rinigus/geocoder-nlp/issues/48).

But do you have a node where library AND police station were specified as amenity together? If its in separate nodes then I think we should be fine. I was told that, in general, these types should be at separate nodes / areas

palbr commented 6 years ago

Thanks for fixing this issue. :+1:

But do you have a node where library AND police station were specified as amenity together?

No, I do not know such a node.

rinigus commented 6 years ago

Great! Then I will have to go through your examples and, after that, mark this as resolved as well.

rinigus commented 6 years ago

Thank you for reporting it and working on it. I have opened an issue regarding shop types and will address it soon. As for this issue, closing it since we don't have any POI types that were merged as such.