Hi all

While writing some program that works with OSM relations, I found cycles in the containment graph. For example, relation/2913585 is part of relation/12762833, which is again part of the same relation where we started. If a naive implementation were to traverse this relationship graph, it would run into an infinite loop. This isn’t a serious problem though; checking for cycles is easy enough. But it seems like a particularly interesting type of tagging mistake, so I thought why not share the fun with you.

In Switzerland, there’s currently three such cycles:
relation/2913585 ⟶  {relation/12762833, relation/12762834} ⟶  relation/2913585
relation/4012524 ⟶  {relation/12762831, relation/12762832} ⟶  relation/4012524
relation/9202820 ⟶  relation/13987412 ⟶  relation/9202820

Best,

— Sascha