[OSM-dev] OSM API 0.4 Specification update on error code 412 - Reviewers needed

michael_j at email.de michael_j at email.de
Sun Jul 1 19:04:18 BST 2007


Hi, 

the Wiki Specification of the OSM API 0.4 had been updated to cover the newly introducted error code "412 Precondition Failed". The update is found here. 

http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.4

As the information below is a little ambigous, review of the wiki documentation from involved database coders is very much needed.

Michael

---------------------------
Tom Hughes wrote:
... 

There are no changes to the API as such, it is just that the API now
polices the validity of the changes it is asked to make more carefully.

Specifically, the following things used to be allowed:

  - Deleting a node which was in use by a segment

  - Deleting a segment which was in use by a way

  - Creating duplicate segments by setting an ID value for the
    segment in the XML when calling create

  - Changing an existing segment to use a deleted node

  - Changing an existing way to use a deleted segment, or indeed
    a segment which simply did not exist

  - Creating a way with no segments, or changing an existing way
    to have no segments

All of the above will now give "412 Precondition Failed" if they are
tried.

The problem with JOSM was that if you deleted a way and all it's nodes
and segments then JOSM would try and upload the delete of the nodes
first, then the segments and then the way. Obviously that will no
longer work.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list