[Tile-serving] [openstreetmap/osm2pgsql] Progress info (#947)

mmd notifications at github.com
Sun Aug 18 08:59:57 UTC 2019


> To know how many nodes/ways/relations are in the import file in total, it would have to read it in completely just to count these, and then a 2nd time to actually process it. There is no header in OSM XML or .pbf files that would tell up front "This file contains x nodes, y ways, z relations"

`osmium fileinfo -e planet-latest.osm.pbf` can provide you with this kind of information, though it takes a few minutes to run on a recent planet pbf.

```
osmium fileinfo -e planet-latest.osm.pbf 
File:
  Name: planet-latest.osm.pbf
  Format: PBF
  Compression: none
  Size: 49682450814
Header:
  Bounding boxes:
    (-180,-90,180,90)
  With history: no
  Options:
    generator=planet-dump-ng 1.1.6
    osmosis_replication_timestamp=2019-08-05T02:00:01Z
    pbf_dense_nodes=true
    pbf_optional_feature_0=Has_Metadata
    pbf_optional_feature_1=Sort.Type_then_ID
    timestamp=2019-08-05T02:00:01Z
[======================================================================] 100% 
Data:
  Bounding box: (-180,-90,180,90)
  Timestamps:
    First: 2005-05-01T14:56:35Z
    Last: 2019-08-05T02:00:00Z
  Objects ordered (by type and id): yes
  Multiple versions of same object: no
  CRC32: e8fd7469
  Number of changesets: 0
  Number of nodes: 5369694269
  Number of ways: 595461781
  Number of relations: 6965603
  Largest changeset ID: 0
  Largest node ID: 6682397058
  Largest way ID: 710772838
  Largest relation ID: 9884757
```





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/947#issuecomment-522304189
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20190818/bbfb72ea/attachment.html>


More information about the Tile-serving mailing list