diff --git a/modules/OsmPbf_libosmbf.py b/modules/OsmPbf_libosmbf.py index 2219aefc3..0580012ff 100644 --- a/modules/OsmPbf_libosmbf.py +++ b/modules/OsmPbf_libosmbf.py @@ -85,35 +85,35 @@ def CopyTo(self, output): osm_pbf_parser.read_osm_pbf(self._pbf_file, self) - def node(self, osmid, lon, lat, tags): + def node(self, osmid, lon, lat, tags, timestamp): data = { 'id': osmid, 'lon': lon, 'lat': lat, 'tag': tags, #'version' - #'timestamp' + 'timestamp': timestamp, #'uid' } self._output.NodeCreate(data) - def way(self, osmid, tags, refs): + def way(self, osmid, tags, refs, timestamp): data = { 'id': osmid, 'tag': tags, 'nd': refs, #'version' - #'timestamp' + 'timestamp': timestamp, #'uid' } self._output.WayCreate(data) - def relation(self, osmid, tags, ref): + def relation(self, osmid, tags, ref, timestamp): data = { 'id': osmid, 'tag': tags, #'version' - #'timestamp' + 'timestamp': timestamp, #'uid' 'member': ref, } diff --git a/modules/osm_pbf_parser/osm_pbf_parser.cc b/modules/osm_pbf_parser/osm_pbf_parser.cc index 9dac4dae6..9126ad546 100644 --- a/modules/osm_pbf_parser/osm_pbf_parser.cc +++ b/modules/osm_pbf_parser/osm_pbf_parser.cc @@ -80,7 +80,7 @@ struct Visitor void node_callback(uint64_t osmid, double lon, double lat, const Tags & tags, const uint64_t timestamp) { if (!tags.empty() && (since_timestamp == 0 || timestamp == 0 || timestamp >= since_timestamp)) { - call_method(self, "node", osmid, lon, lat, tagsToDict(tags)); + call_method(self, "node", osmid, lon, lat, tagsToDict(tags), timestamp); } else { filtered_nodes_osmid.push_back(osmid); } @@ -92,7 +92,7 @@ struct Visitor void way_callback(uint64_t osmid, const Tags & tags, const std::vector & refs, const uint64_t timestamp) { if (since_timestamp == 0 || timestamp == 0 || timestamp >= since_timestamp) { - call_method(self, "way", osmid, tagsToDict(tags), nodeIdToList(refs)); + call_method(self, "way", osmid, tagsToDict(tags), nodeIdToList(refs), timestamp); } else { filtered_ways_osmid.push_back(osmid); } @@ -104,7 +104,7 @@ struct Visitor void relation_callback(uint64_t osmid, const Tags & tags, const References & refs, const uint64_t timestamp) { if (since_timestamp == 0 || timestamp == 0 || timestamp >= since_timestamp) { - call_method(self, "relation", osmid, tagsToDict(tags), referencesToDict(refs)); + call_method(self, "relation", osmid, tagsToDict(tags), referencesToDict(refs), timestamp); } else { filtered_relations_osmid.push_back(osmid); }