Re: [OSM-dev] Ways without nodes

2009-08-28 Thread andrzej zaborowski
[Resending the message because I noticed my oversize attachment
prevented it from getting through, sorry if you get it twice now]

2009/8/25 Stephan Knauss o...@stephans-server.de:
 andrzej zaborowski wrote:
 I can mass delete the empty relations (which are not members of other
 relations) like you did with ways but I will not go and check each one
 of the 7k.  Would someone object to me deleting them?  What are other
 ideas about the origin of empty relations?

 Can you post some typical examples? I did a search and found far less empty
 relations than you did:

 select id, tags from planet_osm_rels where # parts = 0 GROUP BY tags, id
 2939 rows retrieved.

Yes, 7000 turns out to have been exaggerated when I looked again.
There were 7000+ objects that were found in a planet snapshot of two
weeks ago and for which my program could not find the bbox.  This
includes relations with no members, the ways with no member (already
gone), relations with only a relation as a member (whose members are
also relations etc etc).  Apparently there are also many ways with
only 1 node.

There are only 4120 empty relations in my snapshot (see
http://openstreetmap.pl/balrog/emptyrels.html).
Examples:

 * some have had members and members were dropped in successive versions:
http://www.openstreetmap.org/browse/relation/47085/history

 * some had no members:
http://www.openstreetmap.org/browse/relation/32141/history

 * some had members which were dropped, _but_ have a please don't
delete me tag, I'm not sure what to do with those since this tag is
there since version 1 and may not apply anymore:
http://www.openstreetmap.org/browse/relation/168033/history

color = #FF
name = Tour Bike della Transumanza
network = mtb
note = PLEASE DON'T REMOVE - WILL BE USED FOR CYCLEMAP RENDERING
operator = Vallelongabike.net
rcn = yes
rcn_ref = 01
ref = 01
route = bicycle
type = route

There are 1279 address relations for each street in Minsk from a
osm-belarus import, whose only member is the city Minsk (role is_in)
and are not referenced otherwise (all successive id's between 80569
and 81927.


 It's easy with JOSM. Create a relation and upload. Not even a warning.

Yes, probably some counter measure should be added.

 About mass delete: I'm not sure about this on relations. Some of them are
 just a few hours old. Maybe the older ones not being referenced by anything.
 Reason would be no one could work with them without knowing their ID. The
 editors can not retrieve them.

Sounds like a good way forward, excepting also the relations with
don't delete me tags.

Cheers

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


Re: [OSM-dev] Ways without nodes

2009-08-25 Thread Stephan Knauss
andrzej zaborowski wrote:
 I can mass delete the empty relations (which are not members of other
 relations) like you did with ways but I will not go and check each one
 of the 7k.  Would someone object to me deleting them?  What are other
 ideas about the origin of empty relations?

Can you post some typical examples? I did a search and found far less 
empty relations than you did:

select id, tags from planet_osm_rels where # parts = 0 GROUP BY tags, id
2939 rows retrieved.

And this still contains empty relations referenced by others.

By looking at the tags a huge amount is from boundary import.
Others look like it was just a user deleting ways but not the now empty 
relation or adding a relation but not adding members.

It's easy with JOSM. Create a relation and upload. Not even a warning.
See here:
http://www.openstreetmap.org/browse/relation/215650

I will reuse this empty relation to tag an island by adding members 
later. In this state it's for demonstration of empty relations.

About mass delete: I'm not sure about this on relations. Some of them 
are just a few hours old. Maybe the older ones not being referenced by 
anything. Reason would be no one could work with them without knowing 
their ID. The editors can not retrieve them.

Stephan

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


Re: [OSM-dev] Ways without nodes

2009-08-25 Thread Marc Schütz
 I can mass delete the empty relations (which are not members of other
 relations) like you did with ways but I will not go and check each one
 of the 7k.  Would someone object to me deleting them?  What are other
 ideas about the origin of empty relations?

I'd say go ahead and delete those that are older than a few days (to avoid 
deleting ones that are currently being edited).

If the relation is still referenced by another one (as you thought could be the 
case), the delete will fail anyway, so you can't accidentally destroy something 
useful.

Regards, Marc

-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

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


Re: [OSM-dev] Ways without nodes

2009-08-25 Thread Stefan de Konink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

andrzej zaborowski schreef:
 I can mass delete the empty relations (which are not members of other
 relations) like you did with ways but I will not go and check each one
 of the 7k.  Would someone object to me deleting them?  What are other
 ideas about the origin of empty relations?

You can automatically check if it is referenced. Just run a query on a
OSM database... with that result you delete all.


Stefan
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkqTu4AACgkQYH1+F2Rqwn05JACfUb8485R6rotjCIMuH28MBPUw
l3sAn0AIAnExoriHPIQxvayDvH0X27tW
=RT3t
-END PGP SIGNATURE-

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


Re: [OSM-dev] Ways without nodes

2009-08-24 Thread andrzej zaborowski
2009/8/23 Stephan Knauss o...@stephans-server.de:
 Hi,

 is there any practical use for ways without nodes? There are over 600 of
 such ways in the database, latest one changed 2009-04-16

I also recently noticed that as many as some 7000 out of the 180k
relations there are in the database currently (so ~4%), have no
memebers.  They do have normal tags and they are spaced rather
randomly across the range of relation IDs in the database now so it's
not somebody's run away script.

I asked around on IRC and people did come up with ideas where they may
be justified, such as when your region has roads with ref=1, 2, 3, 4
and 5 but you only have any data at all about roads 1, 2, 3 at the
moment.  You might want to add relations for all five even if there's
no data about 4 and 5 yet.  Then to be able to find the relations you
would need one superrelation to have all the five as members.
Unlikely but possible.

Cheers

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


Re: [OSM-dev] Ways without nodes

2009-08-24 Thread Stephan Knauss
andrzej zaborowski wrote:
 Unlikely but possible.
Very unlikely. What too should find that relation? Josm will not. For 
which bounding box should the api return this empty relation?
So would need another relation with members.

The mentioned ways are not referred by any relation (except 7).

I believe more in a technical problem on the server side.

That one was done by a bot:
http://www.openstreetmap.org/browse/way/26859334/history

And here the same changeset added some information then a version later 
removed everything:
http://www.openstreetmap.org/browse/way/13465388/history

Dozens of different users, distributed across a large time frame, no 
specific editor.

As some timestamps go back to 2007-10, the newest from April this year I 
deleted all orphans with Changeset 2250280. No one should be missing them.
I did some random checks, the former ways seemed to be replaced by new 
ones already, so no need for a mass revert of those orphans.

Stephan

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


Re: [OSM-dev] Ways without nodes

2009-08-24 Thread andrzej zaborowski
2009/8/25 Stephan Knauss o...@stephans-server.de:
 andrzej zaborowski wrote:

 Unlikely but possible.

 Very unlikely. What too should find that relation? Josm will not. For which
 bounding box should the api return this empty relation?

Right that's the problem with empty relations and the only way they
could be justified is if they were a member of another relation, then
JOSM could download them.

I can mass delete the empty relations (which are not members of other
relations) like you did with ways but I will not go and check each one
of the 7k.  Would someone object to me deleting them?  What are other
ideas about the origin of empty relations?

Cheers

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


[OSM-dev] Ways without nodes

2009-08-23 Thread Stephan Knauss
Hi,

is there any practical use for ways without nodes? There are over 600 of 
such ways in the database, latest one changed 2009-04-16

SELECT id FROM planet_osm_ways  WHERE # nodes = 0

I dtored an extracted list here:
http://www.stephans-server.de/osm/zeroways.xml

The affected ways don't seam to have anything in common. Some changes 
had even been made by xybot.
Is this a known problem that somehow nodes can get lost during the upload?

Is it of any use for the project to fix these? I also extracted ways 
consisting of only a single node.

Should the API check this?

Stephan

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


Re: [OSM-dev] Ways without nodes

2009-08-23 Thread Stefan de Konink
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Stephan Knauss schreef:
 Is it of any use for the project to fix these? I also extracted ways 
 consisting of only a single node.

I think you should delete them in one go (changeset), the ZoneImport
script mentioned on the wiki shows you how to do it from the
commandline. If you need help, I'm willing to assist :)


Stefan
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkqRlrsACgkQYH1+F2Rqwn2AEwCcDd8+a2N1dcZA0DCaQJ2vq1Ty
VwsAn2Ggy6k3CFAeO5Blh6RmkIVTizEX
=lhJI
-END PGP SIGNATURE-

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