.TH "OSMIUM-FILEINFO" "1" "1.6.1" "" "" .SH NAME .PP osmium\-fileinfo \- show information about an OSM file .SH SYNOPSIS .PP \f[B]osmium fileinfo\f[] [\f[I]OPTIONS\f[]] \f[I]OSM\-FILE\f[] .SH DESCRIPTION .PP Shows various information about OSM files such as the file type, bounding boxes in the header, etc. .PP This command will usually only read the file header. Use the \f[B]\-\-extended\f[] option to show more information. .PP Normally this command will output the data in human readable form. If the \f[B]\-j\f[], \f[B]\-\-json\f[] option is used, the output will be in JSON format instead. .PP If the \f[B]\-g\f[], \f[B]\-\-get\f[] option is used, only the value of the named variable will be printed. .PP The output is split into three sections: .TP .B 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. .RS .RE .TP .B 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. .RS .RE .TP .B Data This section shows the information available from reading the whole file. It is only shown if the \f[B]\-\-extended\f[] option 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). .RS .RE .SH OPTIONS .TP .B \-e, \-\-extended Read the complete file and show additional information. The default is to read only the header of the file. .RS .RE .TP .B \-g, \-\-get=VARIABLE Get value of VARIABLE. Can not be used together with \-\-json. .RS .RE .TP .B \-G, \-\-show\-variables Show a list of all variable names. .RS .RE .TP .B \-j, \-\-json Output in JSON format. Can not be used together with \-\-get. .RS .RE .SH COMMON OPTIONS .TP .B \-h, \-\-help Show usage help. .RS .RE .TP .B \-v, \-\-verbose Set verbose mode. The program will output information about what it is doing to \f[I]stderr\f[]. .RS .RE .TP .B \-\-progress Show progress bar. Usually a progress bar is only displayed if STDERR is detected to be a 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. .RS .RE .TP .B \-\-no\-progress Do not show progress bar. Usually a progress bar is displayed if STDERR is 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. .RS .RE .SH INPUT OPTIONS .TP .B \-F, \-\-input\-format=FORMAT The format of the input file(s). Can be used to set the input format if it can\[aq]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. See \f[B]osmium\-file\-formats\f[](5) or the libosmium manual for details. .RS .RE .SH VARIABLES .PP The following variables are available: .IP .nf \f[C] 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.maxid.nodes\ \-\ INTEGER data.maxid.ways\ \-\ INTEGER data.maxid.relations\ \-\ INTEGER data.maxid.changesets\ \-\ INTEGER \f[] .fi .PP All timestamps are in the usual OSM ISO format \f[C]yy\-mm\-ddThh::mm::ssZ\f[]. Boxes are in the format \f[C](xmin,\ ymin,\ xmax,\ ymax)\f[]. .SH DIAGNOSTICS .PP \f[B]osmium fileinfo\f[] exits with exit code .TP .B 0 if everything went alright, .RS .RE .TP .B 1 if there was an error processing the data, or .RS .RE .TP .B 2 if there was a problem with the command line arguments. .RS .RE .SH MEMORY USAGE .PP \f[B]osmium fileinfo\f[] does all its work on the fly and doesn\[aq]t keep much data in main memory. .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1), \f[B]osmium\-file\-formats\f[](5) .IP \[bu] 2 Osmium website (http://osmcode.org/osmium-tool/) .SH COPYRIGHT .PP Copyright (C) 2013\-2017 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH CONTACT .PP If you have any questions or want to report a bug, please go to http://osmcode.org/contact.html .SH AUTHORS Jochen Topf .