[talk-ch] Cyclic relationships

Simon Poole simon at poole.ch
Tue Nov 1 23:44:51 CET 2022


Hi Sascha

Yes they are a pesky annoyance :-)

Simon

Am 01.11.2022 um 23:29 schrieb Sascha Brawer:
> Hi all
>
> While writing some program that works with OSM relations, I found 
> cycles in the containment graph. For example, relation/2913585 
> <https://www.openstreetmap.org/relation/2913585> is part of 
> relation/12762833 <https://www.openstreetmap.org/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 <https://www.openstreetmap.org/relation/2913585> ⟶ 
> {relation/12762833, relation/12762834} ⟶  relation/2913585
> relation/4012524 <https://www.openstreetmap.org/relation/4012524> ⟶ 
> {relation/12762831, relation/12762832} ⟶  relation/4012524
> relation/9202820 <https://www.openstreetmap.org/relation/9202820> ⟶ 
>  relation/13987412 ⟶  relation/9202820
>
> Best,
>
> — Sascha
>
>
> _______________________________________________
> talk-ch mailing list
> talk-ch at openstreetmap.ch
> http://lists.openstreetmap.ch/mailman/listinfo/talk-ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.ch/pipermail/talk-ch/attachments/20221101/a8da9cc2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.ch/pipermail/talk-ch/attachments/20221101/a8da9cc2/attachment.sig>


More information about the talk-ch mailing list