[OSM-dev] Bug in XAPI or Osmosis?

80n 80n80n at gmail.com
Thu Dec 3 09:14:06 GMT 2009


I've fixed this in XAPI.

80n

On Thu, Dec 3, 2009 at 8:28 AM, Stephan Plepelits <
skunk at xover.htu.tuwien.ac.at> wrote:

> 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 |
> `---------------------------------------------------------------------'
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20091203/110d24ea/attachment.html>


More information about the dev mailing list