[osmosis-dev] Cannot represent -1 as a char.

Nakor nakor.osm at gmail.com
Sat Mar 5 22:55:43 GMT 2011


   Hello,

I have a set of file where I get the following error:

org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent 
-1 as a char.

It looks like if a PBF file has been generated with omitmetadata then 
osmosis is having trouble to read it.

If I start from 
http://planet.openstreetmap.org/pbf-experimental/planet-110302.osm.pbf 
and run

osmosis --read-pbf file=planet-110302.osm.pbf --way-key-value 
keyValueList=natural.coastline --used-node --write-pbf 
file=planet-110302_coastline.osm.pbf

Everything is fine.

If I now extract from this planet file or just rewrite it with omitmetada:

osmosis --read-pbf file=planet-110302.osm.pbf --write-pbf 
file=planet-110302_nomd.osm.pbf omitmetadata=true

and try to extract coastlines

osmosis --read-pbf file=planet-110302_nomd.osm.pbf --way-key-value 
keyValueList=natural.coastline --used-node --write-pbf 
file=planet-110302_coastline_nomd.osm.pbf

then I get the exception:

SEVERE: Thread for task 1-read-pbf failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent 
-1 as a char.
     at 
org.openstreetmap.osmosis.core.util.IntAsChar.intToChar(IntAsChar.java:35)
     at 
org.openstreetmap.osmosis.core.domain.v0_6.CommonEntityData.store(CommonEntityData.java:186)
     at 
org.openstreetmap.osmosis.core.domain.v0_6.Entity.store(Entity.java:138)
     at org.openstreetmap.osmosis.core.domain.v0_6.Node.store(Node.java:184)
     [...]

Other tasks like extracting a bounding box or writing to an XML file 
will work.

Is this a bug or should I proceed differently?

   Thanks,

N.



More information about the osmosis-dev mailing list