Set better names on places returned by forward search
@jonasdn
Submitted by Jonas Danielsson Link to original bug (#721340)
Description
Created attachment 265135 Searching for high street with current master
I've been bothered by the results returned when searching for a common street name in London. I got results that was hard to distinguish from each others. See the attached image for what I mean.
I got to debugging a bit to see what the data from Nominatim was for each item. Data to separate the results from each other is there, but not used by Geocode. Or rather the code filters them out.
I will attach a patch that changes how the attributes are filtered in or out. So that results will have the general form of: [name], [suburb], [county], [postcode], [state], [country] If the attributes are available.
Also, I will post a patch that fixes a typo that caused postcode never to be included.
See image attached soon, of how the same search looks with the patch.
The way geocode decides what attributes to include in the name attribute of GeocodePlace is still a bit shaky I feel. Maybe the best approach would just be to set a simple name, e.g. "High Street". And let the application that uses it construct the full name for it self using GeocodePlace attributes. Or maybe add some kind of "simple name" attribute to GeocodePlace for the same reason.
Attachment 265135, "Searching for high street with current master":