[josm-dev] JOSM file format extensions
Sebastian Klein
bastikln at googlemail.com
Fri Mar 19 20:42:53 GMT 2010
Hi,
there are 2 tickets that require an extension of the josm file format.
The first (#4043 - "Have an 'upload prohibited' flag in .osm files")
should be easy, something like that:
<osm version='0.6' generator='JOSM' uploadintended='no'>
...
</osm>
And simply drop that additional attribute if the layer was not
explicitly locked by the user.
Second one is #3804 - "Upload does upload unchanged
nodes/ways/relations". If you add a tag to some object and remove it
later, that object is still modified. This leads to duplicate entries in
the history when it is uploaded.
To prevent this, we either need to store the original object data (it is
in the undo buffer anyway, so no memory problem) or generate a hash.
The first way there would be two versions of the same object in the
saved file:
<osm version='0.6' generator='JOSM'>
<node id='2546783' version='4' ... >
<tag k='source' v='...' />
</node>
<node id='2546783' action='modify' version='-1' ... >
<tag k='source' v='...' />
<tag k='name' v='...' />
</node>
</osm>
For the second alternative there would be just another attribute:
<osm version='0.6' generator='JOSM'>
<node id='2546783' action='modify' originalcrc32='24a81d832'
version='4' ... >
<tag k='source' v='...' />
<tag k='name' v='...' />
</node>
</osm>
In the unlikely case of a check sum collision, it wouldn't cause much
harm. (It would work the same way it does now. :) )
What do you think? Feel free to suggest a better wording for the tags!
__
Sebastian
More information about the josm-dev
mailing list