In osm. I can map building with tag building = residential also can map Residential way with tag landuse = residential but how to map The building belongs to residential? I thought of a way map the building with operator = 'xxxx'. But it does not seem right


Firstly, I would expand your buildings tags to include not just 'residential' but also other appropriate tags like 'apartments', 'house', 'detached' etc (see OSM documentation) as these are also indicators of a building being residential.

To link buildings to roads and areas, you could do a spatial join of buildings to residential areas (landuse=residential) or residential roads (e.g. highway='residential' don't forget the other residential-type tags for roads like 'living_street'). There is also another tag that might prove useful and that is 'abutters'. This specifically describes the buildings beside the road. However, I am not sure how widespread the use of this tag is so a little investigation in your area of interest would be advisable.

In any of these options, if your purpose is just a visual map, then an appropriate solution may be as simple as applying a distinctive style to the residential areas or roads and then a user of your map can infer that the buildings there are residential (in this scenario you would not need to even do the spatial join). In this scenario, you may want to mark specifically non-residential buildings (commercial, place_of_worship etc).

  • The abutters tag isn't really in use any more, better avoid it. – scai Jun 7 '17 at 6:33
  • spatial join is the responsibility of the search engine, does not osm tag have this semantic expression? – Susu Jun 7 '17 at 6:49
  • Why? The buildings are already contained in the landuse area. An additional tag is not needed and would be redundant. – scai Jun 7 '17 at 7:06
  • @scai in overpass , i can find building entrance very simply because a entrance node is a subnode from a building , , and find admin subarea and find traffic signal in highway and so on .. why i need spatial join for find buildings in residential? – Susu Jun 7 '17 at 7:25
  • and I remember that overpass does not support polygon queries – Susu Jun 7 '17 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.