From a data and technical point of view this has always been possible  
in the API intentionally. It's just that no one has come up with a  
good use for it yet.

Shaun

On 13 Sep 2009, at 10:56, Andrew M. Bishop wrote:

> 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