Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Precondition failed 412 still here #1207

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 12 comments
Closed

Precondition failed 412 still here #1207

openstreetmap-trac opened this issue Jul 23, 2021 · 12 comments

Comments

@openstreetmap-trac
Copy link

Reporter: jpeterson[at]abinitio.com
[Submitted to the original trac issue database at 6.26am, Friday, 26th September 2008]

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'

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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 9.47am, Friday, 26th September 2008]

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

@openstreetmap-trac
Copy link
Author

Author: jpeterson[at]abinitio.com
[Added to the original trac issue at 12.42am, Saturday, 27th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 12.24pm, Sunday, 28th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: jpeterson[at]abinitio.com
[Added to the original trac issue at 5.50pm, Sunday, 28th September 2008]

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'

The .mdc from each step are saved and attached

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 11.38am, Monday, 29th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: jpeterson[at]abinitio.com
[Added to the original trac issue at 5.12pm, Monday, 29th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 5.57pm, Monday, 29th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: jpeterson[at]abinitio.com
[Added to the original trac issue at 6.36pm, Monday, 29th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 6.58pm, Monday, 29th September 2008]

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.

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 7.36pm, Monday, 29th September 2008]

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]")

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 7.51pm, Monday, 29th September 2008]

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?

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 8.22pm, Monday, 29th September 2008]

Replying to [comment:11 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant