On 18 July 2013 03:42, Ariel Nunez <[email protected]> wrote: > Hello all, > > I am trying to run osmosis on a planet file to filter out nodes, ways and > relations tagged with building=*. > > osmosis --read-pbf-fast file="$PLANET_FILE" --tf accept-ways "building=*" > --write-pbf file="buildings.osm.pbf" > > returns with: > > SEVERE: Thread for task 1-read-pbf-fast failed > java.lang.NegativeArraySizeException [1] > > How can I debug further? The same query ran on an Indonesian country dump > without issue. > > Thanks in advance, > Ariel. > > > > [1] Rest of the exception: > SEVERE: Thread for task 1-read-pbf-fast failed > java.lang.NegativeArraySizeException > at > org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfStreamSplitter.readHeader(PbfStreamSplitter.java:47) > at > org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfStreamSplitter.getNextBlob(PbfStreamSplitter.java:81) > at > org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfStreamSplitter.hasNext(PbfStreamSplitter.java:99) > at > org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfDecoder.processBlobs(PbfDecoder.java:117) > at > org.openstreetmap.osmosis.pbf2.v0_6.impl.PbfDecoder.run(PbfDecoder.java:175) > at org.openstreetmap.osmosis.pbf2.v0_6.PbfReader.run(PbfReader.java:80) > at java.lang.Thread.run(Thread.java:680) > Jul 17, 2013 4:43:50 AM org.openstreetmap.osmosis.core.Osmosis main >
I've just checked that line of code and it is trying to instantiate an array to hold PBF header data based on a header size field but the size is negative. In other words, a header size field in the PBF file is set to a negative value. At first glance it appears as if the file is corrupt. Does the same file work using --read-pbf? Are you able to make the file available somewhere? Brett
_______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev
