[OSM-dev] Planetfile with ChangeSet

Matt Amos zerebubuth at gmail.com
Wed Jun 3 15:02:23 BST 2009


On Wed, Jun 3, 2009 at 1:38 PM, Tom Hughes <tom at compton.nu> wrote:
> Frederik Ramm wrote:
>> m2huber at hsr.ch wrote:
>>> But with bzcat and the direct piping into Osmosis worked well.
>>> We tried on our project to read the bz2 File directly, which didn't work with the same exception as in osmosis.
>>
>> There seems to be an issue with the libbz2 library and the way the
>> planet files are bzipped (they use a multi-threaded bz2 program that
>> creates slightly different bz2 files which *should* be fully compatible
>> but seem to be not).
>
> No, libbz2 is fine (if you use it right), the problem is with the pure
> Java bz2 implementation that osmosis uses.

to clarify, "if you use it right" means "if you don't use the
zlib-like interface".

pbzip2 makes use of the multiple streams feature of the bz2 format*,
which isn't supported by the zlib-like interface to libbz2 or, it
seems, the Java implementation.

cheers,

matt

*: basically, you can get an end-of-stream before the end-of-file -
you just have to reopen the stream and see if there's any more data
present.




More information about the dev mailing list