Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-15 Thread Shaun McDonald

On 15 Jan 2009, at 01:52, Erik Lundin wrote:

 Hi,

 Frederik Ramm skrev:

 Using my binary search technique mentioned above, I found that the
 relation upload fails as soon as you include way 4258639. It  
 succeeds if
 that way is removed from the relation (which I now have done).

 Thanks! I have now modified my script to find references to non- 
 existent
 ways as well, and this works for the mentioned way.

You should add a search for non-existent relations too, and I think  
they need to be checked recursively.

Shaun


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


[OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Erik Lundin
Hi,

When I try to upload any change to relation 36947 (route E 18) from 
JOSM, the answer gets

upload to: http://www.openstreetmap.org/api/0.5/relation/36947...connected
got return: 412 with id 36947
...

It seems to be the combination of JOSM and this certain relation that 
fails, because I managed to edit the relation from Potlatch, and JOSM 
has no problems with for instance relation 20773 (route E 45).

Has the relation got corrupted somehow, or is it a bug in JOSM?

Regards,
Erik

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Dermot McNally
2009/1/14 Erik Lundin erik.lun...@aol.se:

 When I try to upload any change to relation 36947 (route E 18) from
 JOSM, the answer gets

 upload to: http://www.openstreetmap.org/api/0.5/relation/36947...connected
 got return: 412 with id 36947

I got this same error trying to operate on members of the relation for
route E 201, which has more than 1000 members. It looks like either
JOSM or API has a lot of work to do in such cases, and if processing
takes too long, the operation times out. I too found that Potlatch
would succeed in cases where JOSM would not, but that could be a
simple matter of a more generous timeout.

What I'm not clear about is whether relations with so many members are
a good idea.

Dermot

-- 
--
Iren sind menschlich

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Frederik Ramm
Hi,

Dermot McNally wrote:
 2009/1/14 Erik Lundin erik.lun...@aol.se:
 
 When I try to upload any change to relation 36947 (route E 18) from
 JOSM, the answer gets

 upload to: http://www.openstreetmap.org/api/0.5/relation/36947...connected
 got return: 412 with id 36947
 
 I got this same error trying to operate on members of the relation for
 route E 201, which has more than 1000 members.

The reason for this error is that the API will reject (with 
precondition failed) any relation which contains a way where one of 
the nodes in that way is deleted.

This should not happen (ways should never reference deleted nodes) but 
it does happen.

The more members a relation has, the likelier it is to stumble across 
one such inconsistency.

Please do not create relations of that size, it helps nobody.

The way I usually fix this is by saving the relation XML to a file and 
then using binary search and the -- -- operators to narrow down the 
area in the XML that contains the buggy way, until I find the (usually 
one) way which I can leave out and make everything work.

There may be other options, perhaps it is possible to download all 
relation members in JOSM and check which is flagged incomplete afterwards.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09 E008°23'33

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Dermot McNally
2009/1/14 Frederik Ramm frede...@remote.org:

 Please do not create relations of that size, it helps nobody.

+999. This relation wasn't my doing, it just showed up one day. Having
said that, if we are going to have a route relation and if E-routes
are routes...

 The way I usually fix this is by saving the relation XML to a file and then
 using binary search and the -- -- operators to narrow down the area in
 the XML that contains the buggy way, until I find the (usually one) way
 which I can leave out and make everything work.

How does Potlatch get around this issue, as a matter of interest? And
will API 0.6 help us avoid it?

Thanks,
Dermot

-- 
--
Iren sind menschlich

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Erik Lundin
Frederik Ramm skrev:
 The reason for this error is that the API will reject (with 
 precondition failed) any relation which contains a way where one of 
 the nodes in that way is deleted.

 There may be other options, perhaps it is possible to download all 
 relation members in JOSM and check which is flagged incomplete 
 afterwards.

I downloaded all members in JOSM and saved to a file, and then wrote a 
script that checked that all nodes referenced from ways existed. 
Surprisingly I didn't find any references to non-existent nodes.

Except from that, I've cleaned the relation's ways from duplicate nodes 
etc., so there's no validation errors from the validator in JOSM. 
However, the problem is still there.

Erik

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Karl Eichwalder
Frederik Ramm frede...@remote.org writes:

 Dermot McNally wrote:

 I got this same error trying to operate on members of the relation for
 route E 201, which has more than 1000 members.

 Please do not create relations of that size, it helps nobody.

Yes, I think the same.  But what's the best way to split such a
relation?  Long distance hiking routes tend to be that large and I'd
like split them, e.g., the still incomplete Frankenweg in Franconia,
Germany, that right now features more than 500 members and there are
probably 1000 members to come.

-- 
Karl Eichwalder

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Frederik Ramm
Hi,

 I downloaded all members in JOSM and saved to a file, and then wrote a 
 script that checked that all nodes referenced from ways existed. 
 Surprisingly I didn't find any references to non-existent nodes.

I downloaded the relation and saved it to a file. The file had 666 
lines. Need I say more ;-)?

Using my binary search technique mentioned above, I found that the 
relation upload fails as soon as you include way 4258639. It succeeds if 
that way is removed from the relation (which I now have done).

After that I tried to analyse what was wrong with way 4258639. Easy: It 
has been deleted more than a week ago. I'm surprised you were able to 
download the relation in JOSM; it should have been flagged incomplete.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09 E008°23'33

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Erik Lundin
Hi,

Frederik Ramm skrev:
 I downloaded the relation and saved it to a file. The file had 666 
 lines. Need I say more ;-)?

To get all members you have to open the relation editor and choose to 
retrieve all incomplete members. Doing this gives me a file with 26288 
lines.

 Using my binary search technique mentioned above, I found that the 
 relation upload fails as soon as you include way 4258639. It succeeds if 
 that way is removed from the relation (which I now have done).

Thanks! I have now modified my script to find references to non-existent 
ways as well, and this works for the mentioned way.

 After that I tried to analyse what was wrong with way 4258639. Easy: It 
 has been deleted more than a week ago. I'm surprised you were able to 
 download the relation in JOSM; it should have been flagged incomplete.

Can't help with this, but I'm using the latest JOSM.

Erik

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Erik Lundin
Hi,

Frederik Ramm skrev:
 I downloaded the relation and saved it to a file. The file had 666 
 lines. Need I say more ;-)?

To get all members you have to open the relation editor and choose to 
retrieve all incomplete members. Doing this gives me a file with 26288 
lines.

 Using my binary search technique mentioned above, I found that the 
 relation upload fails as soon as you include way 4258639. It succeeds if 
 that way is removed from the relation (which I now have done).

Thanks! I have now modified my script to find references to non-existent 
ways as well, and this works for the mentioned way.

 After that I tried to analyse what was wrong with way 4258639. Easy: It 
 has been deleted more than a week ago. I'm surprised you were able to 
 download the relation in JOSM; it should have been flagged incomplete.

Can't help with this, but I'm using the latest JOSM.

Erik

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


Re: [OSM-talk] Upload of relation from JOSM fails

2009-01-14 Thread Jukka Rahkonen
Karl Eichwalder ke at gnu.franken.de writes:

 
 Frederik Ramm frederik at remote.org writes:
 
  Dermot McNally wrote:
 
  I got this same error trying to operate on members of the relation for
  route E 201, which has more than 1000 members.
 
  Please do not create relations of that size, it helps nobody.
 
 Yes, I think the same.  But what's the best way to split such a
 relation?  Long distance hiking routes tend to be that large and I'd
 like split them, e.g., the still incomplete Frankenweg in Franconia,
 Germany, that right now features more than 500 members and there are
 probably 1000 members to come.

Introducing a new 'relation collection' metarelation, that can have only
relations as members?
When it comes to E-highways I don't quite understand why to use relations at all
for them because they all have the int_ref tag end selecting everything tagged
as E 201 should give the same result. Or is it because some road sections are
belonging to more than one E-highway?


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