Get building polygon using reverse geocoding #3696
-
I need to search for a building polygon. I am about to install my own nominatim server, so, maybe there is a way to import only buildings or solve this problem by some configuration trick? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Reverse geocoding tries to return the most specific result it can find. A point in a building is considered more specific than a building. That's why you get the shop. The shop does have an address, which is why it matches the |
Beta Was this translation helpful? Give feedback.
Done, see #3700. Your example now returns the mall building when used with
layer=address
:https://nominatim.openstreetmap.org/reverse?lat=55.619467&lon=37.50928&format=geojson&polygon_geojson=1&layer=address
Note that this only works as long as the
addr:*
tags are really on the building, Whenaddr:*
tags are on nodes, then you still get the node returned. Nominatim cannot inherit towards building polygons yet, see #2926 among others.(I've presumed here that you are not really interested in building polygons without any address. Please, correct me if that assumption is wrong.)