This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

[JOSM] Are parent and child relations related to role=subarea?

2

IMU it is only when relations have members with role=subarea (eg:

considered as "Optional, disputed and redundant" in the wiki, that the child relations tab like

is filled and parent relations tab like

is filled if the relation is itself a member with role=subarea of a parent relation. Am I correct?

If so, as the use of this role is not recommended yet, we should expect no information in those tabs for administrative=boundary relations?

asked 15 Apr '20, 17:08

SeverinGeo's gravatar image

SeverinGeo
81558
accept rate: 0%


One Answer:

0

Yes, you are correct. And it's true that you shouldn't expect any info in those tabs if the relation don't have any relations as members.

I guess the wiki should clarify this when it talks about the subarea role.

One clarification in general: a relation P will have X children relations if it has that same X number of relations as members, independently of the role type of each of those members (or even if those members have a void role). And each of those relations will have as a parent the relation P.

For example:

<?xml version='1.0' encoding='UTF-8'?> <osm version='0.6' generator='JOSM'>
<relation id='-1' action='modify' visible='true'>
    <tag k='type' v='typea' />
    <tag k='name' v='Child relation A' />
</relation>
<relation id='-2' action='modify' visible='true'>
    <tag k='type' v='typeb' />
    <tag k='name' v='Child relation A' />
</relation>
<relation id='-3' action='modify' visible='true'>
    <member type='relation' ref='-1' role='rolea' />
    <member type='relation' ref='-2' role='' />
    <tag k='type' v='typec' />
    <tag k='name' v='I am parent of the relations A and B' />
</relation>
</osm>

The last relation is parent of the first 2 relations. And each of those 2 relations have as parent the last relation.

answered 16 Apr '20, 17:53

edvac's gravatar image

edvac
6652619
accept rate: 15%

edited 16 Apr '20, 17:56