OSMIUM-FILEINFO(1)
π osmium-fileinfo β bestie's guide to peeking at your OSM file π
okay so like, this is the osmium-fileinfo manual page, from the osmium fam (manual section 1). it's giving "tell me everything about this file, but like, politely" β¨
πΈ NAME πΈ
osmium-fileinfo β show information about an OSM file
no cap, that's literally the whole job. it spills the tea on your OSM file. π«
β¨ SYNOPSIS β¨
osmium fileinfo [OPTIONS] OSM-FILE
π DESCRIPTION π
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/-e option to show more information.
Normally this command will output the data in human readable form. If the --json/-j option is used, the output will be in JSON format instead.
If the --get/-g option is used, only the value of the named variable will be printed.
The output is split into four sections:
- File β This section shows the information available without opening the file itself. It contains the file name, the format deduced from the file name, the compression used and the size of the file in bytes.
- Header β This section shows the information available from the header of the file (if available, OPL files have no header). Any available bounding boxes are shown as well as header options such as the generator and file format version.
- Data β This section shows the information available from reading the whole file. It is only shown if the
--extended/-eoption was used. It shows the actual bounding box calculated from the nodes in the file, the first and last timestamp of all objects in the file, a CRC32 checksum of the data in the file, the number of changesets, nodes, ways, and relations found in the file, whether the objects in the file were ordered by type (nodes, then ways, then relations) and id, and whether there were multiple versions of the same object in the file (history files and change files can have that). See theosmium-sort(1)man page for details of the expected ordering. - Metadata β This section shows which metadata attributes are used in the file. It contains information which attributes are used by all objects in the file and which are only used by some objects. This section is only shown if the
--extended/-eoption was used because the whole file has to be read.
This commands reads its input file only once, ie. it can read from STDIN. π (one pass, no double-dipping, we love efficiency)
π OPTIONS π
-c,--crcβ Calculate the CRC32. This is the default if you use the JSON output format.--no-crcβ Do not calculate the CRC32. This is the default unless you use the JSON output format.-e,--extendedβ Read the complete file and show additional information. The default is to read only the header of the file.-g,--get=VARIABLEβ Get value of VARIABLE. Can not be used together with--json/-j.-G,--show-variablesβ Show a list of all variable names.-j,--jsonβ Output in JSON format. Can not be used together with--get/-g.-t,--object-type=TYPEβ Read only objects of given type (node, way, relation, changeset). By default all types are read. This option can be given multiple times. This only takes effect if the--extended/-eoption is also used.
π§ COMMON OPTIONS π§
-h,--helpβ Show usage help.-v,--verboseβ Set verbose mode. The program will output information about what it is doing to STDERR.--progressβ Show progress bar. Usually a progress bar is only displayed if STDOUT and STDERR are detected to be TTY. With this option a progress bar is always shown. Note that a progress bar will never be shown when reading from STDIN or a pipe.--no-progressβ Do not show progress bar. Usually a progress bar is displayed if STDOUT and STDERR are detected to be a TTY. With this option the progress bar is suppressed. Note that a progress bar will never be shown when reading from STDIN or a pipe.
π INPUT OPTIONS π
-F,--input-format=FORMATβ The format of the input file(s). Can be used to set the input format if it canβt be autodetected from the file name(s). This will set the format for all input files, there is no way to set the format for some input files only. Seeosmium-file-formats(5)or the libosmium manual for details.
π¦ VARIABLES π¦
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.boxes - STRING (could be multiline)
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 with 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.
β οΈ bestie heads up: that last bit is a real gotcha β anonymous-user edits from before 2007 have no user/uid, so your results can come out wrong. not a vibe, but forewarned is forearmed π
π DIAGNOSTICS π
osmium fileinfo exits with exit code
0β if everything went alright,1β if there was an error processing the data, or2β if there was a problem with the command line arguments.
π MEMORY USAGE π
osmium fileinfo does all its work on the fly and doesnβt keep much data in main memory.
(lowkey iconic. it's giving main character energy with a tiny memory footprint β¨)
π«Ά SEE ALSO π«Ά
osmium(1),osmium-file-formats(5),osmium-sort(1)- Osmium website
π COPYRIGHT π
Copyright (C) 2013-2026 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.
πΈ CONTACT πΈ
If you have any questions or want to report a bug, please go to <https://osmcode.org/contact.html>
β AUTHORS β
Jochen Topf <jochen@topf.org>.
and that's the whole thing bestie π
this was version 1.19.1, dated OSMIUM-FILEINFO(1) in the footer β go forth and fileinfo, you absolute icon πβ¨
π¦ where this page comes from
- fedora 44: osmium-tool 1.19.1-1.fc44 Β· GPL-3.0-only
- nixos 26.05: osmium-tool 1.19.1
- nixpkgs unstable: osmium-tool 1.19.1
- ubuntu stonking: osmium-tool 1.19.1-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms