Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing osm_timestamp tag when using --extra-attributes and .pbf files #137

Closed
dalek2point3 opened this issue Apr 29, 2014 · 10 comments
Closed

Comments

@dalek2point3
Copy link

When importing data from .pbf into the database, with --extra-attributes flag (and relevant settings in the style file) -- the metadata for osm_timestamp seems to be blank. I've checked the XML version of the file, and it seems to contain the timestamp metadata. Using an older version (0.83) returned blank for all metadata, while with v0.85 only the timestamp seems to be blank.

In order to recreate this issue:
run

osm2pgsql -U postgres -d gis -W austin.osm.pbf -s -S default.style --extra-attributes

with the following style file:
http://pastie.org/9121340

and the following OSM data file:
https://s3.amazonaws.com/metro-extracts.mapzen.com/austin.osm.pbf

This seems to be related to:
441bedb

@amandasaurus
Copy link
Contributor

I also have seen this problem

@amandasaurus
Copy link
Contributor

This must be a problem with handling pbf files. I tried with the ireland-and-nothern-ireland pbf and xml extract from geofabrik today. The pbf import has NULL for all osm_timestamp's, the XML file has actual data.

@pnorman
Copy link
Collaborator

pnorman commented Nov 7, 2014

I also have seen this problem

Version?

@amandasaurus
Copy link
Contributor

osm2pgsql SVN version 0.85.0 (64bit id space)

@lonvia
Copy link
Collaborator

lonvia commented Apr 3, 2015

There is a TODO for timestamps in the pdf parser: https://github.com/openstreetmap/osm2pgsql/blob/master/parse-pbf.cpp#L216

@pnorman
Copy link
Collaborator

pnorman commented Jun 27, 2015

@pnorman
Copy link
Collaborator

pnorman commented Jun 27, 2015

Just to note, PBFs store timestamp as int32 in the info message but sint64 delta encoded in a denseinfo message.

@lonvia
Copy link
Collaborator

lonvia commented Jul 23, 2015

This should be fixed with the latest version using libosmium. Someone care to check?

@nvkelso
Copy link

nvkelso commented Jul 23, 2015

+1 for getting a PBF fix in. Was able to work around the bug by using the XML file instead.

@pnorman
Copy link
Collaborator

pnorman commented Jul 23, 2015

This should be fixed with the latest version using libosmium. Someone care to check?

wfm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants