1OSMIUM-FILEINFO(1)                                          OSMIUM-FILEINFO(1)
2
3
4

NAME

6       osmium-fileinfo - show information about an OSM file
7

SYNOPSIS

9       osmium fileinfo [OPTIONS] OSM-FILE
10

DESCRIPTION

12       Shows various information about OSM files such as the file type, bound‐
13       ing boxes in the header, etc.
14
15       This command will usually only read the file  header.   Use  the  --ex‐
16       tended/-e option to show more information.
17
18       Normally  this command will output the data in human readable form.  If
19       the --json/-j option is used, the output will be  in  JSON  format  in‐
20       stead.
21
22       If  the  --get/-g  option is used, only the value of the named variable
23       will be printed.
24
25       The output is split into four sections:
26
27       File   This section shows the information available without opening the
28              file itself.  It contains the file name, the format deduced from
29              the file name, the compression used and the size of the file  in
30              bytes.
31
32       Header This  section shows the information available from the header of
33              the file (if available, OPL files have no header).   Any  avail‐
34              able  bounding boxes are shown as well as header options such as
35              the generator and file format version.
36
37       Data   This section shows the information available  from  reading  the
38              whole  file.   It  is only shown if the --extended/-e option was
39              used.  It shows the actual  bounding  box  calculated  from  the
40              nodes  in  the file, the first and last timestamp of all objects
41              in the file, a CRC32 checksum of the data in the file, the  num‐
42              ber of changesets, nodes, ways, and relations found in the file,
43              whether the objects in the file were  ordered  by  type  (nodes,
44              then ways, then relations) and id, and whether there were multi‐
45              ple versions of the same object in the file (history  files  and
46              change  files  can  have that).  See the osmium-sort(1) man page
47              for details of the expected ordering.
48
49       Metadata
50              This section shows which metadata attributes  are  used  in  the
51              file.   It contains information which attributes are used by all
52              objects in the file and which are only  used  by  some  objects.
53              This  section is only shown if the --extended/-e option was used
54              because the whole file has to be read.
55
56       This commands reads its input file only once, ie.   it  can  read  from
57       STDIN.
58

OPTIONS

60       -c, --crc
61              Calculate  the  CRC32.   This is the default if you use the JSON
62              output format.
63
64       --no-crc
65              Do not calculate the CRC32.  This is the default unless you  use
66              the JSON output format.
67
68       -e, --extended
69              Read the complete file and show additional information.  The de‐
70              fault is to read only the header of the file.
71
72       -g, --get=VARIABLE
73              Get value of VARIABLE.  Can not be used together with --json/-j.
74
75       -G, --show-variables
76              Show a list of all variable names.
77
78       -j, --json
79              Output in JSON format.  Can not be used together with --get/-g.
80
81       -t, --object-type=TYPE
82              Read only objects of given type (node,  way,  relation,  change‐
83              set).   By default all types are read.  This option can be given
84              multiple times.  This only takes effect if the --extended/-e op‐
85              tion is also used.
86

COMMON OPTIONS

88       -h, --help
89              Show usage help.
90
91       -v, --verbose
92              Set  verbose  mode.   The  program will output information about
93              what it is doing to STDERR.
94
95       --progress
96              Show progress bar.  Usually a progress bar is only displayed  if
97              STDOUT  and  STDERR  are detected to be TTY.  With this option a
98              progress bar is always shown.  Note that  a  progress  bar  will
99              never be shown when reading from STDIN or a pipe.
100
101       --no-progress
102              Do  not  show progress bar.  Usually a progress bar is displayed
103              if STDOUT and STDERR are detected to be a TTY.  With this option
104              the  progress  bar is suppressed.  Note that a progress bar will
105              never be shown when reading from STDIN or a pipe.
106

INPUT OPTIONS

108       -F, --input-format=FORMAT
109              The format of the input file(s).  Can be used to set  the  input
110              format  if it can’t be autodetected from the file name(s).  This
111              will set the format for all input files, there is no way to  set
112              the  format  for  some  input  files only.  See osmium-file-for‐
113              mats(5) or the libosmium manual for details.
114

VARIABLES

116       The following variables are available:
117
118              file.name - STRING
119              file.format - STRING: XML|PBF
120              file.compression - STRING: none|bzip2|gzip
121              file.size - INTEGER (always 0 when reading from STDIN)
122              header.boxes - STRING (could be multiline)
123              header.with_history - BOOL (yes|no)
124              header.option.generator - STRING
125              header.option.version - STRING
126              header.option.pbf_dense_nodes - BOOL (yes|no)
127              header.option.osmosis_replication_timestamp - STRING with TIMESTAMP
128              header.option.osmosis_replication_sequence_number - INTEGER
129              header.option.osmosis_replication_base_url - STRING
130              data.bbox - BOX
131                  (in JSON as nested ARRAY with coordinates)
132              data.timestamp.first - STRING with TIMESTAMP
133              data.timestamp.last - STRING with TIMESTAMP
134              data.objects_ordered - BOOL (yes|no)
135              data.multiple_versions - STRING (yes|no|unknown)
136                  (in JSON as BOOL and missing if "unknown")
137              data.crc32 - STRING with 8 hex digits
138              data.count.nodes - INTEGER
139              data.count.ways - INTEGER
140              data.count.relations - INTEGER
141              data.count.changesets - INTEGER
142              data.minid.nodes - INTEGER
143              data.minid.ways - INTEGER
144              data.minid.relations - INTEGER
145              data.minid.changesets - INTEGER
146              data.maxid.nodes - INTEGER
147              data.maxid.ways - INTEGER
148              data.maxid.relations - INTEGER
149              data.maxid.changesets - INTEGER
150              data.buffers.count - INTEGER
151              data.buffers.size - INTEGER
152              data.buffers.capcity - INTEGER
153              metadata.all_objects.version - BOOL (yes|no)
154              metadata.all_objects.timestamp - BOOL (yes|no)
155              metadata.all_objects.changeset - BOOL (yes|no)
156              metadata.all_objects.uid - BOOL (yes|no)
157              metadata.all_objects.user - BOOL (yes|no)
158              metadata.some_objects.version - BOOL (yes|no)
159              metadata.some_objects.timestamp - BOOL (yes|no)
160              metadata.some_objects.changeset - BOOL (yes|no)
161              metadata.some_objects.uid - BOOL (yes|no)
162              metadata.some_objects.user - BOOL (yes|no)
163
164       All timestamps are in the usual OSM  ISO  format  yy-mm-ddThh::mm::ssZ.
165       Boxes are in the format (xmin, ymin, xmax, ymax).
166
167       There  are two variables for each metadata field.  The metadata.all_ob‐
168       jects.* variables are true if all objects in the file have  the  attri‐
169       bute.   The  metadata.some_objects.* variables are true if at least one
170       object in the file has the attribute.  Please note  that  objects  last
171       modified  by  anonymous users (until 2007) do not have user and uid at‐
172       tributes and can lead to wrong results.
173

DIAGNOSTICS

175       osmium fileinfo exits with exit code
176
177       0      if everything went alright,
178
179       1      if there was an error processing the data, or
180
181       2      if there was a problem with the command line arguments.
182

MEMORY USAGE

184       osmium fileinfo does all its work on the fly and doesn’t keep much data
185       in main memory.
186

SEE ALSO

188osmium(1), osmium-file-formats(5), osmium-sort(1)
189
190       • Osmium website (https://osmcode.org/osmium-tool/)
191
193       Copyright (C) 2013-2023 Jochen Topf <jochen@topf.org>.
194
195       License  GPLv3+:  GNU  GPL  version  3  or  later  <https://gnu.org/li
196       censes/gpl.html>.  This is free software: you are free  to  change  and
197       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
198

CONTACT

200       If  you  have  any  questions  or  want  to  report a bug, please go to
201       https://osmcode.org/contact.html
202

AUTHORS

204       Jochen Topf <jochen@topf.org>.
205
206
207
208                                    1.16.0                  OSMIUM-FILEINFO(1)
Impressum