osm-search / Nominatim

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

display connected ways with same name and type as one result #114

Open pointhi opened 10 years ago

pointhi commented 10 years ago

As example: When I search the Street xyz, which is stored in OSM as several, together connected way's, nomatim give me one result per way.

It would be nicer, if nominatim connect this ways internal to an group, and display it as big group, and not as individual results.

My idea is, that together connected ways with the same name, and type (as example highway=residential) are grouped. tags like bridge=yes, tunnel=yes,parking-lanes, lanes=*,... are ignored because that tags represent only a part of the same street.

thx, pointhi

dracos commented 6 years ago

I understand that for a very long road, this would have its own issues, but I have just had this problem looking for a Main Road in the borough of Bromley (in Greater London). https://nominatim.openstreetmap.org/search.php?q=Main+Road%2C+Bromley gives you 15 results for one long Main Road (all in/around TN16 outer postcode), and then the road I was looking for (in BR5) is results 16-19.

Codain commented 3 years ago

If I may: One solution to improve existing situation in some regions knowing that it would not be enough to handle all cases would be to extand https://github.com/osm-search/Nominatim/issues/463#issuecomment-920369049 mechanism to index Relation:associatedStreet relations and hide its members. Where those relations exists it would do the job. But it would not help to group by ref or other criteria since its not there purpose. This would also means that bounding box for results would encompass addresses, which might be usefull (or not...).

Otherwise the solution I can see would be to add a cluttering/grouping process either at indexing time or at search time:

I think approach 2 would be the most flexible and the less bug prone but at the cost of an additional processing time/ressource.