Re: [OSM-dev] Recursive relations

2009-09-14 Thread Andrew M. Bishop
Shaun McDonald sh...@shaunmcdonald.me.uk writes:

 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.

 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.

Since I can't see any purpose that it can serve for a route or a
boundary I have edited the relations listed in my original e-mail and
removed the self-recursion.

As others have pointed out JOSM warned me that the relations were
self-recursive when I edited them and offered to automatically fix the
problem.  The JOSM validator doesn't check for this condition though.


For reference I created two changesets, one for route relations 12179,
15852, 80545, 101440, 163368, 165638, 167468, 170290 and one for
boundary relation 57535.  There are no other self-recursive relations
within the UK.  For the route relations the changeset is 2478746 and
for the boundary relation the changeset is 2478757.


 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

-- 
Andrew.
--
Andrew M. Bishop a...@gedanken.demon.co.uk
  http://www.gedanken.demon.co.uk/

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


[OSM-dev] Recursive relations

2009-09-13 Thread Andrew M. Bishop
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


Re: [OSM-dev] Recursive relations

2009-09-13 Thread Shaun McDonald
 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


Re: [OSM-dev] Recursive relations

2009-09-13 Thread Karl Guggisberg
 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


Re: [OSM-dev] Recursive relations

2009-09-13 Thread Maarten Deen
Karl Guggisberg wrote:
 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.

JOSM has in the past accepted recursive relations and it is very likely that 
people still have versions running that do so.

Maarten


 -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