[OSM-talk] Proposed mechanical edit: Empty Relations

MP singularita at gmail.com
Sat Apr 14 00:48:04 BST 2012


I guess it should be ok if you limit the wipeout only on some
carefully selected types of relation (for example type=multipolygon as
multipoly without members really does not make sense), perhaps
checking for other tags as well (i.e. delete only type=multipolygon
without any other tags, or with certain whitelisted key=value parts
like natural=forest ...)

This will remove useless stuff while keeping stuff that may still be
potentially used.

I know of one occurrence of empty relation where having empty relation
makes sense - in Prague transport, one route was temporarily disabled
due to repairs, but was expected to be re-established soon, so the
relation "route" remained, but was empty without members (so it won't
lose tags). Later it was restored once that line went back to service.
Though in this case the empty relation was still member of "network"
relation, so it can't be deleted without breaking referential
integrity.

Martin

On Fri, Apr 13, 2012 at 14:31, andrzej zaborowski <balrogg at gmail.com> wrote:
> On 13 April 2012 11:12, Paul Norman <penorman at mac.com> wrote:
>> Through editor errors or other mistakes there are a number of relations in
>> OSM which have no members. I propose a mechanical edit to delete these where
>> they are not members of some other way. My proposed procedure, documented at
>> http://wiki.openstreetmap.org/wiki/Mechanical_Edits/pnorman_imports is to
>> identify these with my pgsnapshot database and delete them if they aren't
>> referenced by any other relation.
>>
>> If they are referenced by another relation I will investigate them and deal
>> with them manually.
>>
>> I've investigated a few of them and they appear to be caused by people
>> deleting ways from multipolygons but not deleting the relation. I don't want
>> to investigate all 5200 by hand so I'm proposing the mechanical edit.
>>
>> I will filter out ones touched in the last 24 hours to avoid conflicting
>> with anyone.
>
> This thread comes up every some time
> (http://lists.openstreetmap.org/pipermail/dev/2009-August/016658.html,
> http://lists.openstreetmap.org/pipermail/talk/2010-November/055075.html).
>  In 2009 I ran a very similar operation with 4.5k relations deleted as
> discussed in the first thread I linked.  The lesson from it was that
> some relations are referenced from outside of the database, mainly
> from the OSM wiki.  Those should not be deleted automatically either
> or it'll upset some users.
>
> Cheers
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk



More information about the talk mailing list