Comfortably select drawn buildings in JOSM

Posted by xeen on 28 December 2010 in English (English)

I'm currently tracing a lot of buildings from Bing imagery and while the "Buildings Tool" [1] is a big help, it doesn't cover all possible cases. Especially in naturally-grown town centres the shapes aren't always rectangular and many connected houses result in complex forms.

It's quite annoying to stop and tag each house with "building=yes", so I take advantage of JOSM's built in search feature. To select all ways which need the building tag I search for:

id:0 untagged type:way -role:inner

* id:0 limits the search to objects that have been created in the current session and not been uploaded yet. Essentially, this prevents the search from selecting other people's objects.
* untagged eliminates all objects, which I might have tagged while tracing (e.g. a plaza).
* type:way includes ways and removes all nodes and relations from the results.
* role:inner selects all objects that are part of a relation and have the role 'inner'. The minus in front of it negates the filter, thus "-role:inner" excludes all "inner" ways, i.e. the holes in buildings.

By default an object must fulfill all search criteria to be matched, thus the query above in normal English would be:

Select all new ways that aren't tagged and don't have the role "inner".

Luckily JOSM remembers the previous searches, so you don't have to copy&paste the search string each time :)


Comment from Chaos99 on 29 December 2010 at 00:04

A very simplistic solution to the same problem is: Just copy a tagged building (I additionally use source = Bing sat map) and past the tagges to all new buildingd. Thats just one key combo when the created way is still selected.

But your solution has more style, granted.

Hide this comment

Comment from bleakgadfly on 29 December 2010 at 06:11

Do you tag buildings with anything else than building=yes?

Hide this comment

Comment from EdLoach on 29 December 2010 at 09:29

If the ways have the role "outer" then shouldn't the tag go on the relation rather than the way? And as bleakgadfly suggests, if you do use anything than building=yes (such as building=house, building=garage, building=shop or whatever) then I guess you tag these as you go along and only tag the remaining buildings with the search described above?

Hide this comment

Comment from xeen on 29 December 2010 at 12:30

I haven't yet found any buildings that were distinctively enough to tell if it's a shop, supermarket or something else. So building=yes has been sufficient for me. The tag should probably go into the relation, but tagging the way is a possible case if it serves no other function (and it does not for the buildings I draw).

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

  • Image

    ![Alt text](URL)

Login to leave a comment