NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

0
1

Hello,

I'm rather new to JOSM, so please bear with me, and thanks in advance for any advice.

I'm working on a quite dense and complicated area, and would like to isolate "building" ways and their dependencies using the "filter object" tool - but I see no straightforward way to do this. I can isolate the ways containing the "building" tag, but I am not sure how to "chase" the member ways if they are part of a multipolygon.

Can anyone please show me how to do this?

Best,

ThePromenader.

asked 08 Apr '11, 15:52

ThePromenader's gravatar image

ThePromenader
16223
accept rate: 0%


If you want to select all objects in the relation #1.374.453 you make a filter like:

child id:1374453

You can find the relation id in the title bar of the relation editor (and probably somewhere else). Then tick the Inverse Filter box and everything else will be unselected.

permanent link

answered 08 Apr '11, 17:31

gnurk's gravatar image

gnurk
6.1k106096
accept rate: 15%

Thank you for your reply - but egads, my goal is to isolate buildings in a dataset containing over 1m objects.

I seem to be in a catch-22 situation here: if I do a '-building' (or inverted 'building') filter, I will show all the "role:outer" polygons (as these are the only ones with the "building" tag), but what I need to do is a) find what relation (#?) that 'outer' polygon belongs to, then b) find all of that relation's children. As far as I know, it is not possible to 're-select' any object already de-selected by the filter.

(08 Apr '11, 17:41) ThePromenader

You cannot trust that the building tag is placed on the outer polygons. In fact the recommended way is to put the tags on the relation itself: http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Tagging

The building in my answer is done like that: http://www.openstreetmap.org/browse/relation/1374453

(08 Apr '11, 17:50) gnurk

...exactly! Yet as far as my target is concerned (Paris, France), this is not the case. I've managed a workaround through extraction through Osmosis (to a mysql database), then reiteration through php - but I think this sort of 'data isolation' should be possible directly through JOSM. In spite of all its positive aspects, I see a lot of inconsistancies in OSM's treatment of data... every point and polygon, if it is a member of something, should be indicated as such. If every way of every building (multipolygon or no) had a building tag, my problem would be easily resolved.

(08 Apr '11, 18:28) ThePromenader

Your question has given me unexpected understanding why one should put the tags on the relation and not on the members.

It may be easy for your specific task if there were building tags on every way, but what if two multipolygon buildings share the same wall and have different building=<building typology="">?

Outer-tagging gives you surprises in JOSM even with simple filters. Apply "-(parent building)" to Musée du Petit Palais http://www.openstreetmap.org/?lat=48.866102&lon=2.315534&zoom=18&layers=M and watch which areas get selected.

It took me hours to realize that it's not a bug in JOSM.

(08 Apr '11, 21:24) gnurk

Yep, it's not a bug, it's just the way the data was uploaded. I do understand the concept of an "role:outer" polygon assuming the "master" role (thus getting all the tags), but from a data point of view, and especially in regards to how (J)OSM works, this is not the best approach, as it makes selecting/editing certain elements in groups well-neigh impossible.

(09 Apr '11, 05:46) ThePromenader

P.S.: I managed to isolate all multipolygon buildings by using an inverted "child parent building" filter. To display both non-multipolygon buildings and multipolygon buildings, though...

I see where this has caused problems - the shapefile output from cloudmade.com for the Paris area does not include building 'child' polygons - only the "master" polygon is shown (meaning some buildings have no 'holes').

(09 Apr '11, 06:15) ThePromenader

But an inverted "child parent building" will not give you just the buildings. It must have been more complicated. Probably the filter should look something like this:

-(-((parent((role:outer) -building))|-parent building) | child(-((parent((role:outer) -building))|-parent building))|building|child building)

That filter selects ways, relations and some nodes of outer-tagged buildings, relation-tagged buildings and non-relation buildings. But it doesn't select all nodes, so it probably needs to be even more complicated.

(09 Apr '11, 06:35) gnurk

Thanks for that. I think 'child parent building' worked because it selects "all the children of elements that are the parent of a building) - but as I said, I could only get multipolygon buildings (both inner and outer) with that command.

Your filter example is quite logical - I'll play around with it today. Thanks!

(09 Apr '11, 09:00) ThePromenader

But does your simple filter handle the case when the outer wall of a building also has the inner role of a surrounding area in another relation, like Musée du Petit Palais http://www.openstreetmap.org/?lat=48.866102&lon=2.315534&zoom=18&layers=M ?

'parent building' will select the relations for both the surrounding gravel area and the building, and then 'child parent building' selects both the house and the surroundings.

It is complicated to cover all cases when multiple objects share the same way, and there may be houses inside houses and so on.

(09 Apr '11, 09:12) gnurk

Ah, but I consider that to be a mistake - the same is repeated to the nearby eastern end of the Champs-Elysées (the buildings there are "inner" polygons of its surrounding garden multipolygon). By what logic would a building be a member of the outline of the land it is upon (no matter what use the land has)? Is every city building a member of the city block it is upon? In fact, if you look above and to the left of the Grand Palais, you'll see that the round building within isn't rendered correctly at all (in Potlatch or JOSM).

(09 Apr '11, 09:39) ThePromenader
showing 5 of 10 show 5 more comments

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:

×132
×75
×66
×18
×9

question asked: 08 Apr '11, 15:52

question was seen: 7,304 times

last updated: 10 Apr '11, 19:56

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum