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

API allows duplicate ways within a relation

0

I realised API 0.6 allows relations to contain duplicate ways (ways with exactly the same ID). This does not make any sense to me. Is there a particular reason for this state? If there isn't, will it be denied (maybe in next version of API)?

asked 04 Oct '11, 21:07

Kozuch's gravatar image

Kozuch
1.7k587285
accept rate: 8%

edited 05 Oct '11, 01:27

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866


One Answer:

6

It might not make sense to you but then you don't know what others might want to do with it. For example, it is conceivable that a bus uses a bit of road (say, at a complex intersection) more than once on its journey. With relations being ordered, one would then expect the relation to contain the same bit of road twice at different points in the sequence.

Generally, relations are a flexible tool that people can and will use to model all kinds of things, and some of these might well require the same object being a member more than once. It is unlikely that this flexibility will be dropped.

answered 04 Oct '11, 21:17

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .