When you look up “Graix, France” and toggle the address near “La Chaperie” or “Valsoiron”, the address is the name of a housing estate that’s 10km away: “Lotissement Le Parc, La Barraque, Bourg-Argental”. I think it’s related to some property of the road D2 which is inbetween, but I couldn’t find how to remove or at least change it. I could use a little help.
Please note, however, that none of this will give the postal address. For that, you must put a suitable set of addr:xxxx tags on the building in question.
I looked at the roads near the place you mentioned, and none of them have addr tags. However, you may well be right that Nominatim will associate the road with a containing area, in which case you need to split the road at the boundaries.
As I said, you need to split the road, at the relevant boundaries. It probably is identifying the road as the thing with the address, and as it is a single way, the whole way will have the same, implied, is_in attributes.
It shows that “Lotissement Le Parc” is marked as a neighborhood and it’s a node. Since there are no other neighborhood nearby Nominatim just assumes that that is the neighborhood to which the D2 belongs.
I doubt that splitting the way will help. I know that some people do not like to have a boundary relation for a neighborhood, as the boundaries are vague, it’s the only way to stop Nominatim from returning the wrong neighborhood. Of course this can be seen a some form of “mapping for the geocoder”.
Alright ! So, thank you escada, it was indeed because the neighbourhood was a point that the road was considered as belonging to it. I turned the point to a polygon and my initial problem is now fixed. \o/
Nevertheless I have another one. As shown in the following picture, there is a fictive line (the red one I drew roughly) on the north side of which the address is “…Graix…”, and on the south side of which it’s “…Bourg-Argental…”. I couldn’t find why, because there is no boundary of any type there. How can I tell the map that La Chaperie belongs to Graix ? Besides La Chaperie is within the range of the commune (the territorial district of Graix) : http://www.openstreetmap.org/relation/907288#map=14/45.3606/4.5545
But the show address, picks a road (D2 / D8) depending on where you click. Depending on the road, you get Bourg/Graix.
Seems like “Show Address” tries to find the nearest road with a name and then work from there.
I think show address is basically doing a Nominatim search on the raw latitude and longitude. You get the same result if you do that directly in the search box.
My guess would be that Nominatim pre-computes is_in relations for all OSM ways and named nodes, but can’t do so for the infinite number of possible coordinate pairs, so uses the information from the nearest suitable object, rather than doing an expensive, first principle search. If it is doing that, splitting the way is likely to help, unless it tries to consolidate the way before assigning it to regions.