OSMIUM-FILEINFO(1) | OSMIUM-FILEINFO(1) |
osmium-fileinfo - show information about an OSM file
osmium fileinfo [OPTIONS] OSM-FILE
Shows various information about OSM files such as the file type, bounding boxes in the header, etc.
This command will usually only read the file header. Use the –extended option to show more information.
Normally this command will output the data in human readable form. If the -j, –json option is used, the output will be in JSON format instead.
If the -g, –get option is used, only the value of the named variable will be printed.
The output is split into four sections:
This commands reads its input file only once, ie. it can read from STDIN.
The following variables are available:
file.name - STRING file.format - STRING: XML|PBF file.compression - STRING: none|bzip2|gzip file.size - INTEGER (always 0 when reading from STDIN) header.with_history - BOOL (yes|no) header.option.generator - STRING header.option.version - STRING header.option.pbf_dense_nodes - BOOL (yes|no) header.option.osmosis_replication_timestamp - STRING with TIMESTAMP header.option.osmosis_replication_sequence_number - INTEGER header.option.osmosis_replication_base_url - STRING data.bbox - BOX (in JSON as nested ARRAY with coordinates) data.timestamp.first - STRING with TIMESTAMP data.timestamp.last - STRING wih TIMESTAMP data.objects_ordered - BOOL (yes|no) data.multiple_versions - STRING (yes|no|unknown) (in JSON as BOOL and missing if "unknown") data.crc32 - STRING with 8 hex digits data.count.nodes - INTEGER data.count.ways - INTEGER data.count.relations - INTEGER data.count.changesets - INTEGER data.minid.nodes - INTEGER data.minid.ways - INTEGER data.minid.relations - INTEGER data.minid.changesets - INTEGER data.maxid.nodes - INTEGER data.maxid.ways - INTEGER data.maxid.relations - INTEGER data.maxid.changesets - INTEGER data.buffers.count - INTEGER data.buffers.size - INTEGER data.buffers.capcity - INTEGER metadata.all_objects.version - BOOL (yes|no) metadata.all_objects.timestamp - BOOL (yes|no) metadata.all_objects.changeset - BOOL (yes|no) metadata.all_objects.uid - BOOL (yes|no) metadata.all_objects.user - BOOL (yes|no) metadata.some_objects.version - BOOL (yes|no) metadata.some_objects.timestamp - BOOL (yes|no) metadata.some_objects.changeset - BOOL (yes|no) metadata.some_objects.uid - BOOL (yes|no) metadata.some_objects.user - BOOL (yes|no)
All timestamps are in the usual OSM ISO format yy-mm-ddThh::mm::ssZ. Boxes are in the format (xmin, ymin, xmax, ymax).
There are two variables for each metadata field. The metadata.all_objects.* variables are true if all objects in the file have the attribute. The metadata.some_objects.* variables are true if at least one object in the file has the attribute. Please note that objects last modified by anonymous users (until 2007) do not have user and uid attributes and can lead to wrong results.
osmium fileinfo exits with exit code
osmium fileinfo does all its work on the fly and doesn't keep much data in main memory.
Copyright (C) 2013-2018 Jochen Topf <jochen@topf.org>.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html
Jochen Topf <jochen@topf.org>.
1.10.0 |