I'll need to take a closer look. My guess is that the entity
de-serializer doesn't create the user as OsmUser.NONE, but instead a
normal OsmUser with an id of -1. The XML writer might deal with it
okay, but the binary writer might be getting confused. If that's the
case it should be fixable, just need all parties to agree on a
representation of missing user.

On 30/11/2010, at 7:39, Frederik Ramm <[email protected]> wrote:

> Hi,
>
>  whenever relations without userid are temporarily stored by Osmosis, they 
> end up changed somehow.
>
> If I take this file:
>
> <osm version="0.6">
>  <relation id="1" version="9" timestamp="2010-06-25T11:33:43Z" changeset="1" 
> />
> </osm>
>
> and convert it to PBF:
>
> osmosis --rx test.osm --write-bin test.osm.pbf
>
> I end up with a 58 byte file that can be converted back to the above with 
> either osmosis or pbf2osm.
>
> But when I run
>
> osmosis --rx test.osm --sort --write-bin test.osm.pbf
>
> then the resulting file has 65 bytes. It can still be converted back to the 
> above with osmosis, but if I run pbf2osm on it I get:
>
> <osm version="0.6" generator="pbf2osm">
>    <relation id="1" version="9" changeset="1" user="" uid="-1" 
> timestamp="2010-06-25T11:33:43Z"/>
> </osm>
>
> Somehow the information that user ID and user name were unset has been lost 
> when the relation was temporarily stored.
>
> Can it be fixed?
>
> Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail [email protected]  ##  N49°00'09" E008°23'33"
>
> _______________________________________________
> osmosis-dev mailing list
> [email protected]
> http://lists.openstreetmap.org/listinfo/osmosis-dev

_______________________________________________
osmosis-dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/osmosis-dev

Reply via email to