> This is probably something that the OSM editors should warn users about
when they try to create such a relation.
JOSM doesn't allow to create recursive relations, but it accepts them when
they are present in the data.

-- Karl

-----Ursprüngliche Nachricht-----
Von: dev-boun...@openstreetmap.org [mailto:dev-boun...@openstreetmap.org] Im
Auftrag von Andrew M. Bishop
Gesendet: Sonntag, 13. September 2009 11:56
An: dev@openstreetmap.org
Betreff: [OSM-dev] Recursive relations

In OSM a relation can contain other relations but it seems that there is
nothing to check that a relation doesn't contain itself.  I can't think of
any legitimate reason that it should be allowed though.

For example relation 15852 has contained itself since version 108 which was
created at the beginning of July (changeset 1754423).

Within the UK alone the following route relations all contain
themselves:

12179
15852
80545
101440
163368
165638
165638
167468
168189
170290
170290

Also within the UK there is one boundary relation that contains
itself:

57535


Obviously it is possible to ignore these when parsing the data (which is
what I do and what alerted me to them in the first place) but it would be
better if it didn't happen.


This is probably something that the OSM editors should warn users about when
they try to create such a relation.

Is there somebody that can find and fix all such relations on the server (if
they have no legitimate use)?

Obviously self-recursion is easy to find; there might be mutually recursive
relations as well but I haven't looked for them.

--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             a...@gedanken.demon.co.uk

UK OpenStreetMap Route Relations:
        http://www.gedanken.org.uk/mapping/osm-routes/route.html

UK OpenStreetMap Boundary Relations:
        http://www.gedanken.org.uk/mapping/osm-boundaries/boundary.html

_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to