JuergenL wrote: > Hi > > I try to extract a polygon out of a osm file using osmosis and I get > an error reading the osm file. I use > http://albspotter.org/osm/test-osmosis.osm but also tried other > osm-files and different versions of osmosis. > > This is the output from osmosis --read-xml file="test-osmosis.osm" > --write-xml file="out.osm" > > 26.05.2009 14:08:46 org.openstreetmap.osmosis.core.Osmosis run > INFO: Osmosis Version 0.31.1 > 26.05.2009 14:08:46 org.openstreetmap.osmosis.core.Osmosis run > INFO: Preparing pipeline. > 26.05.2009 14:08:46 org.openstreetmap.osmosis.core.Osmosis run > INFO: Launching pipeline execution. > 26.05.2009 14:08:46 org.openstreetmap.osmosis.core.Osmosis run > INFO: Pipeline executing, waiting for completion. > 26.05.2009 14:08:47 > org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager > waitForCompletion > SCHWERWIEGEND: Thread for task 1-read-xml failed > java.lang.NullPointerException > at > org.openstreetmap.osmosis.core.xml.common.ElementWriter.escapeData(ElementWriter.java:112) > at > org.openstreetmap.osmosis.core.xml.common.ElementWriter.addAttribute(ElementWriter.java:197) > at > org.openstreetmap.osmosis.core.xml.v0_6.impl.RelationMemberWriter.processRelationMember(RelationMemberWriter.java:43) > Line 43 of RelationMemberWriter above deals with the relation member role. Your osm file above is missing all of the role attributes on relation members which would cause this problem to occur.
Perhaps xapi doesn't include the role attribute if it is empty ... I thought it was mandatory ... _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

