Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1207 closed defect (invalid)

Precondition failed 412 still here

Reported by: jpeterson@… Owned by: Chris Browet
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

I get the following error frequently when editing (deleting) pre-existing overlapping ways. This happens a lot with US Census data.

There was an error uploading this request (412) Server message is 'Precondition Failed'

<OK>

I don't think I get this based on my own edits alone.

It's particularly obnoxious that I can't get rid of the offending non-deleteable points from my dirty buffer and that If I keep editing and uploading I have to suffer the dialog box each time.

I had thought this bug was gone in this version; I think it's just improved.

I was able to see it happen just by downloading a map, deleteing a partially overlapping railway line and uploading it.

Attachments (1)

overlap_bug.zip (225.2 KB) - added by jpeterson@… 11 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 11 years ago by Chris Browet

Owner: changed from cbro@… to Chris Browet
Status: newassigned

Could you please give me the bounding box/IDs of the

I was able to see it happen just by downloading a map, deleteing a partially overlapping railway line and uploading it.

Thanks

comment:2 Changed 11 years ago by jpeterson@…

Here's the bounding box

http://www.openstreetmap.org/export/embed.html? bbox=-74.13203,40.95961,-74.12558,40.96526

There used to be two railways uploaded (the slippy map shows this)

I kept the longer one labelled New Jersey Transit - Main Line and deleted the one labelled Erie Lackawanna Railroad or possibly Conrail Railroad ...

There were many instances like this along the railways in northern new jersey.

I also see similar but more confusing problems trying to fix up interchanges along the highways in the area.

The problem seems to be related to existing ways, not to ones created newly by merkaartor. Any given instance is not reproducable once the fix has been made, and I didn't save files of the before state.

comment:3 Changed 11 years ago by Chris Browet

I have the same problem as in #1195.

The 412 is at the end of the chain and is caused by something going wrong during the session.

I tried a simple case of overlapping roads but cannot reproduce.

Without an MDC, it is virtually impossible to debug.

comment:4 Changed 11 years ago by jpeterson@…

I was able to find a similar set of tracks and repeat the problem.

1) select a section of track near Suffern (overlap_before.mdc)

2) make a small edit to keep the ends of the Norfork Southern Railway (overlap_2.mdc)

3) delete the middle of the Norfork Southern line (overlap_3.mdc)

Get the following error:

Merkaartor Remove trackoint node_262822671

Error uploading Request There was an error uploadin this request (412) Server message is 'Precondition Failed' <OK>

The .mdc from each step are saved and attached

Changed 11 years ago by jpeterson@…

Attachment: overlap_bug.zip added

comment:5 Changed 11 years ago by Chris Browet

In this instance, it is quite normal, as the node also used by way 24176004.

The actual question is why are you editing a region where not all features are downloaded? Did you do a "Download" or "Download More" before starting editing?

If yes, could give me an overview on how you routinely proceed, because I wouldn't understand why features are missing.

Just to be sure we understand each other, Merkaartor can only work on (and take into account) data which is downloaded.

comment:6 Changed 11 years ago by jpeterson@…

In this test the only operation used to create the .mdc file was "Download". I began from a newly opened instance of Mercaartor and pulled down a region specified by the slippy map. That was saved as the first .mdc file.

This edit is a simple version of something I do all the time -- cleaning up obsolete US Census data derived ways.

Apparently this is a Download bug -- but it's still serious because I can run into many 412's per edit session. This morning I tried to convert part of route 80 from a single line motorway to the four line motorway it actually is. This involved deleteing various incorrect access ramps, which resulted in about 12 412 errors.

I had to give up in the middle (after an intermediate upload) and start with download over again or suffer the 412 dialog box each time I upload, for each node that has the problem.

I typically make changes, move off the area I've downloaded and then download more -- but need to upload my changes before download more in case they are overwritten (and reverted). If download more would leave my edits alone when it merges that would help alot. Then only the final upload would have the 412 problem from the original defective download.

Typical tasks that have this problem

-- adding railway stations to an entire railway line (which doesn't fit in one download region) -- cleaning up highway exits along a section of interstate -- the census data is notoriously bad at interstate highways (motorways). The next exit is likely off the current downloaded map.

comment:7 Changed 11 years ago by Chris Browet

I wonder if you don't falsely assume that because there are some roads, the download is complete. The OSM api downloads completely the roads intersecting with the area you ask for download, but that doesn't mean that everything is downloaded.

If you activate "View-Show downloaded areas", the regions in red are not downloaded completely, and shouldn't be touched. The transparent ones are where you can safely edit.

BTW, the "Download more" issue should be solved. I'd be great if you could confirm.

comment:8 Changed 11 years ago by jpeterson@…

You are correct -- I had no idea that some areas I can safely edit and others not.

It is clear that some roads are not downloaded -- and the features I'm trying to edit routinely extend beyond edit region boundaries. It's not very obvious when you have a feature that extends beyond the safe region. I have trouble successfully downloading large regions -- there's a lot of xml in the New York area.

Perhaps I really want to do unsafe edits, but have nicer editor behaviour when I hit the inevitable error conditions.

Alternately, I would like to have the editor download all the ways connected to the feature (way) I'm interested in.

comment:9 Changed 11 years ago by Chris Browet

Resolution: invalid
Status: assignedclosed

That's the main reason of the "Download More". You don't have to download all at once. Move out of the safe area, "Download More" and the safe area is extended. Check "View-Show downloaded areas" to confirm.

Fact is, the editor has no way to know whether all is downloaded or not. The 412 you receive is because you are trying to delete stuff (mostly nodes, I suppose) which are used by other ways on the server.

The server informs us of that with the 412.

As for the suggestion of downloading all interconnected ways, it would be technically feasible, I guess, with the api. But that would mean, for each and every node downloaded, to check the server if there are other ways, not downloaded, connected to it. That would probably mean recusrsion, too (where to stop?). That would make a download last an unbearable amount of time...

If you don't mind, I'll close this ticket. If you encounter unexpected behaviour after a 412, please open another one.

comment:10 Changed 11 years ago by Colin Marquardt

Is it possible to figure out which ways reference a certain node though? If so, then one could e.g. download the other way, highlight the involved elements and display a dialog offering a fix ("Other way(s) use a node you have deleted. [Delete from other ways] [Undelete]")

comment:11 Changed 11 years ago by Chris Browet

Don't you think pressing Ctrl-Shift-D before deleting it is more simple? The "[Delete from other ways]" would mean that anyway. I won't allow "blind" delete.

What I could do is displaying a nagging message if you edit outside the downloaded area... but do you really want that?

comment:12 in reply to:  11 Changed 11 years ago by Colin Marquardt

Replying to koying:

Don't you think pressing Ctrl-Shift-D before deleting it is more simple? The "[Delete from other ways]" would mean that anyway. I won't allow "blind" delete.

But learning *after* the fact (the 412) that I should have pressed Ctrl-Shift-D first won't help me, unless there is a (documented) way to recover. (I admit that I don't know what happens when I have a 412 and download more later.)

What I could do is displaying a nagging message if you edit outside the downloaded area... but do you really want that?

I don't know... Would there be a legit use case for editing there? Probably not. How about just not allowing editing there, if that's possible? The status bar could display why deleting is not possible.

Note: See TracTickets for help on using tickets.