[OSM-dev] Conflict with 0.6 wiki page and JOSM implementation

Shaun McDonald shaun at shaunmcdonald.me.uk
Wed Oct 8 23:05:18 BST 2008


On 8 Oct 2008, at 22:24, Martijn van Oosterhout wrote:

> On Wed, Oct 8, 2008 at 6:24 PM, Shaun McDonald
> <shaun at shaunmcdonald.me.uk> wrote:
>> Hi,
>> It seems that according
>> to:http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.6#Modifications_related_to_the_abovewhen 
>>  you
>> upload a node, way or relation, the version that was downloaded,  
>> should be
>> in the xml of the upload too. However JOSM is sending
>> old_version.
>
> Well actually, that was deliberate (I wrote that code). Basically, the
> client sending "version" is wrong because what's being uploaded is not
> that version at all. If anything "version" should be "old_version"+1
> but that's even more confusing.
>
> AIUI the server currently expects "old_version", or is that not true?

I'm yet to come across old_version in the server code.

The version check (that was there when I started working on the code)  
takes the current version number that the client has and checks to see  
if that is the same as the version that is stored. If it is not the  
same, then a OSM::APIVersionMismatchError is raised.
http://trac.openstreetmap.org/browser/sites/rails_port_branches/api06/app/models/node.rb#L151

This information is available on the API 0.6 wiki page:
http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.6#Version_numbers



In the code changes I done today, I'm also exposing the changeset_id  
for every node, way and relation. JOSM should use the particular  
changeset for that particular upload, rather than the downloaded one.

Shaun





More information about the dev mailing list