I want to use a JOSM overpass query to exclude from a "building=" download all buildings that have an "entrance=" node that has "addr:housenumber" or "addr:street".


asked 14 May '19, 12:33

Alan01730's gravatar image

accept rate: 0%

Here's a basic sketch of how to do it:

// find buildings
// nodes that are part of a building that also have an entrance tag
// buildings that have entrances
// the difference between the sets
(.buildings; - .entranced;);
out geom;

You can see that the Walmart in the bounding box is not in the result set, as it does have an entrance. You'll need to add some rules to deal with the requirement for an address component and you might want to handle relations in addition to ways, but the basic pattern is to find the buildings, use the node recursion filter to find the entrances, use the way (and maybe relation) recursion filters to find the buildings those nodes are members of, and then take the difference between that and the initial set of buildings.

permanent link

answered 15 May '19, 02:35

maxerickson's gravatar image

accept rate: 31%

Thanks @maxerickson that's a great answer, especially with the sample code. You are a good teacher. I always knew I'd have to learn more than just the "Wizard"

(15 May '19, 21:38) Alan01730
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 14 May '19, 12:33

question was seen: 837 times

last updated: 15 May '19, 21:38

powered by OSQA