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:

  • place hamlet
  • gnis:Class Populated Place

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's gravatar image

edkademan
11112
accept rate: 0%

Hi Ed, can you link to the building in question?

(05 Dec '19, 20:40) jmapb

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.

(06 Dec '19, 09:50) edkademan

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.

(06 Dec '19, 11:02) maxerickson
2

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.

(06 Dec '19, 11:29) mtmail
2

place_id changes whenever the database gets reimported. This is the same URL https://nominatim.openstreetmap.org/details.php?osmtype=W&osmid=20644760

(06 Dec '19, 11:31) mtmail

furthermore, are "Barn" and "Garden Shed" really the names of the buildings? Or should that be tagged as building=barn and building=shed instead?

(07 Dec '19, 07:03) escada
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 highway with a given city and then links addresses to that highway)

The place=hamlet tag might be sensibly changed to something else, if the thing really is something else. The gnis:Class tag is from the import of the data and not really used by anything.

permanent link

answered 05 Dec '19, 22:12

maxerickson's gravatar image

maxerickson
11.5k1077161
accept rate: 30%

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, addr:province=Batavia. Best to delete that.

permanent link

answered 06 Dec '19, 17:34

jmapb's gravatar image

jmapb
2.2k72443
accept rate: 20%

edited 06 Dec '19, 17:44

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.

permanent link

answered 06 Dec '19, 23:20

edkademan's gravatar image

edkademan
11112
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×599
×91

question asked: 05 Dec '19, 19:26

question was seen: 367 times

last updated: 07 Dec '19, 07:03

powered by OSQA