[OSM-dev] [OSM-talk] osmosis Problem with bounding-polygon and v0.6?
brett at bretth.com
Sun Apr 26 12:51:23 BST 2009
Marco Lechner - FOSSGIS e.V. wrote:
> An interesting additional behavior:
> If I use
> bzcat ../planet-090421.osm.bz2 | ./bin/osmosis --read-xml-0.6 file=-
> --bounding-polygon-0.6 file=../aoi.pff --write-xml-0.6
> instead of
> ./bin/osmosis --read-xml-0.6 file=path/planet-090421.osm.bz2
> compressionMethod=bzip2 --bounding-polygon-0.6 file=path/aoi.pff
> --write-xml-0.6 file=path/aoi_2009-04-21_v06.osm
> it seems to work (still running).
> Although using bzcat has a better performance, the build-in function
> should work, shouldn't it? But there seems to be a bug. Is this a bug?
> Can anybody reproduce this?
Marco, I've been able to reproduce the bug but I don't know how to fix
it. The bzip2 application used to compress the planet file uses
parallel processing across multiple cores and I have a sneaking
suspicion that it processes chunks of the file independently then just
appends them together. As a result the java bzip2 implementation that
I'm using hits what it thinks is the end of the compressed stream (when
it reality it is only the end of the first chunk) and stops processing.
There may be a way of coding around this but it would take me a long
time to figure out and it's not on top of the priority list right now.
I'll gladly welcome a patch if somebody finds a solution.
I can only suggest that you continue to use the bzcat command.
More information about the dev