[osmosis-dev] [patch] Suboptimal handling of the compressionMethod parameter in xml tasks
Igor Podolskiy
igor.podolskiy at vwi-stuttgart.de
Sat Feb 5 17:12:32 GMT 2011
Hello everybody,
first of all, thank you all for developing Osmosis! :)
I currently have some issues with the compressionMethod parameter in the
XML tasks. This is just a minor annoyance but nevertheless:
The compressionMethod parameter of the --[fast]-read-xml task is
currently handled somewhat differently than most other parameters in
Osmosis. CompressionMethod has three official values (none, gzip,
bzip2), but actually there is a fourth option (autodetect) which can
only be specified implicitly by omitting compressionMethod altogether.
Although this is documented in the wiki, it creates problems for people
who build tools around Osmosis which read and/or generate Osmosis
command lines automatically, and even for a human user, this is another
special case which you need to think of (no other parameter in any task
works this way).
This can easily be fixed by creating an explicit fourth value (say,
"auto") for compressionMethod, and making it the default value. This
change doesn't break old scripts and streamlines the parameters for new
ones. The attached patch against current trunk does this (and the trunk
still passes all unit tests with the patch applied).
It would be cool if you could integrate this into the next version of
Osmosis. If you have any questions or if the patch needs some
improvement, I'll be here on the mailing list :).
Best regards
Igor
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: compressionmethod-auto.patch
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20110205/d97b8f16/attachment.ksh>
More information about the osmosis-dev
mailing list