#11010 closed defect (fixed)
Wrong order of objects uploaded
Reported by: | skyper | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.10 |
Component: | Core | Version: | latest |
Keywords: | template_report upload order | Cc: | naoliv |
Description
What steps will reproduce the problem?
- Tried to upload a partial revert with undeleted nodes and ways some being part of a relation
What is the expected result?
Upload works fine in one step
What happens instead?
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed
Please provide any additional information below. Attach a screenshot if possible.
Problem is that JOSM tries to upload the relations before uploading (undeleting) the ways. Same happens if you only try to upload only ways and nodes. Ways before nodes does not work.
Conclusion, I had to do the job for the software by first uploading nodes, then ways and last relations.
Please find attached file to reproduce but do not upload.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-01-22 02:34:20 Last Changed Author: Klumbumbus Revision: 7978 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-01-22 01:10:40 +0100 (Thu, 22 Jan 2015) Last Changed Rev: 7978 Identification: JOSM/1.5 (7978 en) Linux Debian GNU/Linux 7.8 (wheezy) Memory Usage: 386 MB / 882 MB (60 MB allocated, but free) Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u71-2.5.3-2~deb7u1 Dataset consistency test: No problems found Plugins: - OpeningHoursEditor (30892) - conflation (0.1.7) - download_along (30892) - imagery-xml-bounds (30892) - imagery_offset_db (30892) - jts (30892) - mirrored_download (30892) - photoadjust (30905) - reverter (30892) - terracer (30892) - todo (29154) - undelete (30892) - utilsplugin2 (30892) - waydownloader (30892) - wikipedia (30892) Last errors/warnings: - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Way 30324968 requires the nodes with id in (3115855346), which either do not exist, or are not visible.> - W: java.io.IOException: Server returned HTTP response code: 412 for URL: https://api.openstreetmap.org/api/0.6/changeset/28340555/upload. Cause: java.io.IOException: Server returned HTTP response code: 412 for URL: https://api.openstreetmap.org/api/0.6/changeset/28340555/upload - E: Error header: Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968 - W: Error header "Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968" did not match with an expected pattern - E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968>
Attachments (1)
Change History (9)
by , 10 years ago
Attachment: | partial_revert.osm added |
---|
comment:3 by , 8 years ago
Cc: | added |
---|
Still no fun to upload undeleted objects. Is it really that difficult to order the upload:
- first existing nodes
- than existing ways
- than all modified relations
- than deleted ways
- last deleted nodes
Thanks
comment:5 by , 8 years ago
Milestone: | → 16.10 |
---|
follow-ups: 7 8 comment:6 by , 8 years ago
Replying to simon04:
Now the uploaded objects are sorted as follows:
- added nodes
- added ways
- added relations
- modified nodes
- modified ways
- modified relations
- deleted relations
- deleted ways
- deleted nodes
No need to separate added and modified but it should work.
comment:7 by , 8 years ago
Replying to skyper:
No need to separate added and modified but it should work.
The separation is used for conflict checking.
comment:8 by , 8 years ago
Replying to skyper:
No need to separate added and modified but it should work.
Sorry, you did the right think. Did not thinkabout nested relations.
osm example file