I am trying to tag a building but cannot get the city right. I have provided values for addr:housenumber, addr:street, addr:postcode and addr:city but when I right-click on the building in openstreetmap.org and ask for the address it gets everything right except for the city. We seem to be inheriting the name of an entity nearby that is characterized as follows:
I have tried using the tags addr:hamlet, addr:district, addr:province, addr:subdistrict, and addr:suburb but none of them work. Is there a way to override this default? asked 05 Dec '19, 19:26 edkademan
showing 5 of 6
show 1 more comments
|
The geocoder that powers that feature, https://nominatim.openstreetmap.org/, does not index those address tags. (it associates a The answered 05 Dec '19, 22:12 maxerickson |
It's best to think of the map at openstreetmap.org as a demo, of the OSM database and of some of the mapping technologies that have arisen along with it -- map rendering, map search, routing. In this case, the right-click "Show Address" feature demonstrates the reverse geocoding capabilities of the search tool Nominatim. "Reverse geocoding" means taking map coordinates and attempting to deduce the address. In its simplest form, it does not look at any of the data tags of the building, but instead just tries to make a best guess based on the coordinates. In this implementation it does try to pull some data from the building (the building name and housenumber) but takes the city name strictly from the coordinates, which, as Maxerikson mentioned, are outside the city limits of Batavia. My guess is that it assigns the city name Five Corners since it's the nearest placename that does not have distinct boundaries -- it's just indicated by a node. Nominatim "knows" the building isn't in Batavia so it's looking for the nearest place it might be in. I can see how this might not look like ideal behavior. Nominatim, like everything else in the OSM world, is under constant development, and you could open a issue at the Nominatim Github page to suggest different behavior. Don't hold your breath, though, because there may well be a very good reason for this design choice. The good news is that the city is tagged correctly on the building, so if you want to see the house with the correct address just use the link https://www.openstreetmap.org/way/182393593. Btw, it looks like as of now there's still one incorrect address tag, answered 06 Dec '19, 17:34 jmapb |
Thanks to all those who took the time to answer my question. I have a better appreciation for how openstreetmap and the geocoding applications relate now. answered 06 Dec '19, 23:20 edkademan |
Hi Ed, can you link to the building in question?
Hi, Thanks for responding. I'm not sure of the best way to supply a link but the following gets you in the neighborhood:
https://www.openstreetmap.org/#map=19/42.99725/-78.12668
I'm trying to get the address for the building labelled "Farm House" for example to include the city of Batavia but it gives "Five Corners" instead.
Here's the details page for the street: https://nominatim.openstreetmap.org/details.php?place_id=78244064
Do note that adding tags to manipulate the behavior of one service is frowned upon. I understand you are trying to find something that works at the moment, but the extra tags on the buildings should be cleaned up and so on.
Nominatim looks at the city boundaries (https://www.openstreetmap.org/relation/176203) and the street is outside. I know people on the ground often say a place belongs to a city when it's outside the boundaries, but it's harder for computers to know when to ignore information.
place_id changes whenever the database gets reimported. This is the same URL https://nominatim.openstreetmap.org/details.php?osmtype=W&osmid=20644760
furthermore, are "Barn" and "Garden Shed" really the names of the buildings? Or should that be tagged as building=barn and building=shed instead?