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

How do I realize a node or way is a member of a relation?

1

Is it possible at all or is it one way relationship only?

asked 25 Sep '10, 21:55

Kozuch's gravatar image

Kozuch
1.7k587285
accept rate: 8%


2 Answers:

2

You can ask the OSM API with a special API call. Basically you do something like this: GET /api/0.6/[node|way|relation]/#id/relations . See the link for details. If you are using the planet file or some extract of it, there is no direct link from the member object to the relation. You have to go through all the relations and look at each member.

answered 26 Sep '10, 08:10

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

0

The question did not seem to specify whether this is a programmatic or user level question. So, if you are using JOSM, for example, all relations the selected feature is member of will appear in the Properties/Memberships pane

answered 26 Sep '10, 19:31

Richlv's gravatar image

Richlv
1.7k153142
accept rate: 22%

Source code available on GitHub .