[osmosis-dev] Full History pbf's DenseInfo Values are Doubled for Timestamp, Changeset and Uid

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[osmosis-dev] Full History pbf's DenseInfo Values are Doubled for Timestamp, Changeset and Uid

Pbf Crasher
Hi,

I was reading full history pbf published on planet website and realized that timestamp, changeset and uid values (which are delta coded) in DenseInfo are all doubled. Anybody aware of this?

For example, if you read DenseNodes in history-190916.osm.pbf. 

First DenseNodes block:
DenseNode[0]: id: 1, lat: 0, lon: 0
DenseInfo[0]: timestamp: 2294571334 (1147285667 x 2 => May 10, 2006 6:27:47 PM), changeset: 18514 (9257 x 2), uid: 2596 (1298 x 2 https://www.openstreetmap.org/api/0.6/user/1298), version: 1

DenseNode[1]: id: 1, lat: 20000000, lon: 20000000
DenseInfo[1]: timestamp: 184876220 ((2294571334 + 184876220) / 2 = 1239723777), changeset: 1030752 ((18514 + 1030752) / 2 = 524633), uid: 7732 ((2596 + 7732) / 2 = 5164 => https://www.openstreetmap.org/api/0.6/user/5164), version: 3

Second DenseNodes block:
DenseNode[0]: id: 80923, lat: 584375459, lon: 155271244
DenseInfo[0]: timestamp: 2845668844 (1422834422 x 2 => February 1, 2015 11:47:02 PM), changeset: 57117152 (28558576 x 2), uid: 57550 (28775 x 2 => https://www.openstreetmap.org/api/0.6/user/28775), version: 4

DenseNode[1]: id: 80923, lat: 584374940, lon: 155271345
DenseInfo[1]: timestamp: 80492406 ((80492406 + 2845668844) / 2 = 1463080625 => May 12, 2016 7:17:05 PM), changeset: 21434884 ((57117152 + 21434884) / 2 = 39276018), uid: 109452 ((57550 + 109452) / 2 = 83501 => https://www.openstreetmap.org/api/0.6/user/83501), version: 5

_______________________________________________
osmosis-dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/osmosis-dev
Reply | Threaded
Open this post in threaded view
|

Re: [osmosis-dev] Full History pbf's DenseInfo Values are Doubled for Timestamp, Changeset and Uid

Jochen123
Hi!

What you are seeing as doubling might be the zigzag-encoding of signed
integers. See here:
https://developers.google.com/protocol-buffers/docs/encoding#signed-integers

Jochen

On Thu, Sep 26, 2019 at 01:14:03PM -0700, Pbf Crasher wrote:

> Date: Thu, 26 Sep 2019 13:14:03 -0700
> From: Pbf Crasher <[hidden email]>
> To: [hidden email]
> Subject: [osmosis-dev] Full History pbf's DenseInfo Values are Doubled for
>  Timestamp, Changeset and Uid
>
> Hi,
>
> I was reading full history pbf published on planet website and realized
> that timestamp, changeset and uid values (which are delta coded) in
> DenseInfo are all doubled. Anybody aware of this?
>
> For example, if you read DenseNodes in history-190916.osm.pbf
> <https://planet.openstreetmap.org/pbf/full-history/history-190916.osm.pbf>.
>
> *First DenseNodes block:*
> https://www.openstreetmap.org/node/1/history
> DenseNode[0]: id: 1, lat: 0, lon: 0
> DenseInfo[0]: timestamp: 2294571334 (1147285667 x 2 => May 10, 2006 6:27:47
> PM), changeset: 18514 (9257 x 2), uid: 2596 (1298 x 2
> https://www.openstreetmap.org/api/0.6/user/1298), version: 1
>
> DenseNode[1]: id: 1, lat: 20000000, lon: 20000000
> DenseInfo[1]: timestamp: 184876220 ((2294571334 + 184876220) / 2 =
> 1239723777), changeset: 1030752 ((18514 + 1030752) / 2 = 524633), uid: 7732
> ((2596 + 7732) / 2 = 5164 => https://www.openstreetmap.org/api/0.6/user/5164),
> version: 3
>
> *Second DenseNodes block:*
> https://www.openstreetmap.org/node/80923/history
> DenseNode[0]: id: 80923, lat: 584375459, lon: 155271244
> DenseInfo[0]: timestamp: 2845668844 (1422834422 x 2 => February 1, 2015
> 11:47:02 PM), changeset: 57117152 (28558576 x 2), uid: 57550 (28775 x 2 =>
> https://www.openstreetmap.org/api/0.6/user/28775), version: 4
>
> DenseNode[1]: id: 80923, lat: 584374940, lon: 155271345
> DenseInfo[1]: timestamp: 80492406 ((80492406 + 2845668844) / 2 = 1463080625
> => May 12, 2016 7:17:05 PM), changeset: 21434884 ((57117152 + 21434884) / 2
> = 39276018), uid: 109452 ((57550 + 109452) / 2 = 83501 =>
> https://www.openstreetmap.org/api/0.6/user/83501), version: 5

> _______________________________________________
> osmosis-dev mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/osmosis-dev


--
Jochen Topf  [hidden email]  https://www.jochentopf.com/  +49-351-31778688

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