[OSM-dev] Bug in XAPI or Osmosis?

Stephan Plepelits skunk at xover.htu.tuwien.ac.at
Thu Dec 3 08:28:59 GMT 2009


Hi!

I found a bug either in XAPI or Osmosis:

If you download relations from XAPI, members of relations without a role,
don't get an attribute 'role', which breaks Osmosis processing that file.
Osmosis (0.31) gets a NullPointerException, if no role is defined.

E.g.
<relation id='1'>
  <member type='node' ref='1'>
</relation

Something like this works for Osmosis:
<relation id='1'>
  <member type='node' ref='1' role=''>
</relation

For now I wrote a workaround via sed:
sed "s/<member \(.*\) ref='\([0-9]*\)'/<member \1 ref='\2' role=''/" file.osm

But I think, somebody should either fix Osmosis, so I works without roles,
or fix XAPI, that it returns empty roles.

greetings,
        Stephan
-- 
Seid unbequem, seid Sand, nicht Öl im Getriebe der Welt! - Günther Eich
,---------------------------------------------------------------------.
| Stephan Plepelits,                                                  |
| Technische Universität Wien   -    Studien Informatik & Raumplanung |
| > openstreetbrowser.org > couchsurfing.org > tubasis.at > bl.mud.at |
| skunk at xover.htu.tuwien.ac.at       -       My Blog: http://plepe.at |
`---------------------------------------------------------------------'




More information about the dev mailing list