[josm-dev] New GPX implementation

Henrik Niehaus henrik.niehaus at gmx.de
Wed May 6 17:51:39 BST 2009


Frederik Ramm schrieb:
> Hi,
> 
> Henrik Niehaus wrote:
>> At the moment JOSM puts most of the GPX elements into a map like
>> (tag_name, value). If the user decides to write the file back to disk
>> the order of the elements is random. So there is a good chance that you
>> get an invalid file.
> 
> That could be trivially fixed by using a LinkedHashMap which preserves 
> order, could it not?
> 

I don't think so. I shouldn't have call it order, but 
structure/hierarchy instead. If you want to keep a map like storage and 
than write it to file, you have do many if/then switches to write valid gpx.

>> I decided to rewrite the GPX code, because I had a look at the old one
>> and tried to solve some tickets from trac.
>> The effort to make the old code compatible with the GPX standard is very
>> high and you will probably end up with messy code. In my opinion, the
>> current code is not suitable for the GPX standard.
> 
> What exactly is the use case for supporting the "GPX standard" and 
> writing GPX files? Who uses it, and what for (or if it currently is so 
> broken that it isn't usable then who would like to use it and what for)?

The use case of supporting the "GPX standard" is equal to the use case 
of supporting GPX, in my opinion. Do it right or leave it be.
I don't know the use case of GPX export, because I don't use it (just 
wanted to fix the GPX implementation), but users are using the GPX im- 
and export. Otherwise we wouldn't have the tickets in trac.

> 
> Bye
> Frederik
> 





More information about the josm-dev mailing list