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

Given relation ID, get ways with role and nodes fields

0

I have a relation, and need to get its ways along with role (inner/outer) and node IDs.

If I make this query:

[out:json]; rel(16357218); out geom;

I get type, ref, role, geometry for each member (but no nodes IDs).

If I make this query:

[out:json]; rel(16357218); way(r); out geom;

I get nodes for each way, but no role.

How can I get both fields for each way, given relation ID?

asked 22 Sep '23, 06:54

Oleg%20V9's gravatar image

Oleg V9
26112
accept rate: 0%


One Answer:

1

I solved this issue with the following query:

[out:json]; rel(16357218); out; way(r); out geom;

answered 22 Sep '23, 08:38

Oleg%20V9's gravatar image

Oleg V9
26112
accept rate: 0%

OSZAR »