[josm-dev] JOSM version detect
frederik at remote.org
Mon Apr 6 19:28:27 BST 2009
> I will modify JOSM to store a version number with each data set. When
> you load data from a file, it has the version number given in the file.
> When you download data from the server, JOSM will (for performance)
> first try the configured version number but if that fails, it will make
> a capabilities request and use the version number supported by the
> server (if JOSM is capable of speaking that version of course).
I have now implemented most of this and just checked it in. I found the
whole data upload/download thing to be somewhat over-engineered and
tried to make it a bit simpler and easier to work with. It is still some
way to go to perfect clarity but I think it was a first step in the
All API requests are now channeled through the OsmApi class which also
takes care of using the right version to talk to the server. Objects are
still built with the help of OsmWriter but we're not using the rather
complex interface and stream stuff but simply create strings containing XML.
What I have just committed seems to work all right with 0.5 and 0.6
servers. The cancel and error situation handling still needs to be
checked and probably improved. Also, I have to check whether it always
behaves right when dealing with 0.5 and 0.6 files and mixing them.
Of course, anyone is welcome to look at my code and fix things. There
are a few situations where I think I have not yet found the best design
decision especially concerning the division of labour between
OsmServerWriter and OsmApi. Maybe they should be merged.
If you find any strangeness regarding server up-/download on josm-latest
in the next few days, send me a quick e-mail and I'll investigate.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the josm-dev