1OSMIUM-FILEINFO(1) OSMIUM-FILEINFO(1)
2
3
4
6 osmium-fileinfo - show information about an OSM file
7
9 osmium fileinfo [OPTIONS] OSM-FILE
10
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 –extended
16 option to show more information.
17
18 Normally this command will output the data in human readable form. If
19 the -j, –json option is used, the output will be in JSON format
20 instead.
21
22 If the -g, –get 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 option was used.
39 It shows the actual bounding box calculated from the nodes in
40 the file, the first and last timestamp of all objects in the
41 file, a CRC32 checksum of the data in the file, the number of
42 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 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
60 -e, –extended
61 Read the complete file and show additional information. The
62 default is to read only the header of the file.
63
64 -g, –get=VARIABLE
65 Get value of VARIABLE. Can not be used together with –json.
66
67 -G, –show-variables
68 Show a list of all variable names.
69
70 -j, –json
71 Output in JSON format. Can not be used together with –get.
72
74 -h, –help
75 Show usage help.
76
77 -v, –verbose
78 Set verbose mode. The program will output information about
79 what it is doing to STDERR.
80
81 –progress
82 Show progress bar. Usually a progress bar is only displayed if
83 STDOUT and STDERR are detected to be TTY. With this option a
84 progress bar is always shown. Note that a progress bar will
85 never be shown when reading from STDIN or a pipe.
86
87 –no-progress
88 Do not show progress bar. Usually a progress bar is displayed
89 if STDOUT and STDERR are detected to be a TTY. With this option
90 the progress bar is suppressed. Note that a progress bar will
91 never be shown when reading from STDIN or a pipe.
92
94 -F, –input-format=FORMAT
95 The format of the input file(s). Can be used to set the input
96 format if it can't be autodetected from the file name(s). This
97 will set the format for all input files, there is no way to set
98 the format for some input files only. See osmium-file-for‐
99 mats(5) or the libosmium manual for details.
100
102 The following variables are available:
103
104 file.name - STRING
105 file.format - STRING: XML|PBF
106 file.compression - STRING: none|bzip2|gzip
107 file.size - INTEGER (always 0 when reading from STDIN)
108 header.with_history - BOOL (yes|no)
109 header.option.generator - STRING
110 header.option.version - STRING
111 header.option.pbf_dense_nodes - BOOL (yes|no)
112 header.option.osmosis_replication_timestamp - STRING with TIMESTAMP
113 header.option.osmosis_replication_sequence_number - INTEGER
114 header.option.osmosis_replication_base_url - STRING
115 data.bbox - BOX
116 (in JSON as nested ARRAY with coordinates)
117 data.timestamp.first - STRING with TIMESTAMP
118 data.timestamp.last - STRING wih TIMESTAMP
119 data.objects_ordered - BOOL (yes|no)
120 data.multiple_versions - STRING (yes|no|unknown)
121 (in JSON as BOOL and missing if "unknown")
122 data.crc32 - STRING with 8 hex digits
123 data.count.nodes - INTEGER
124 data.count.ways - INTEGER
125 data.count.relations - INTEGER
126 data.count.changesets - INTEGER
127 data.minid.nodes - INTEGER
128 data.minid.ways - INTEGER
129 data.minid.relations - INTEGER
130 data.minid.changesets - INTEGER
131 data.maxid.nodes - INTEGER
132 data.maxid.ways - INTEGER
133 data.maxid.relations - INTEGER
134 data.maxid.changesets - INTEGER
135 metadata.all_objects.version - BOOL (yes|no)
136 metadata.all_objects.timestamp - BOOL (yes|no)
137 metadata.all_objects.changeset - BOOL (yes|no)
138 metadata.all_objects.uid - BOOL (yes|no)
139 metadata.all_objects.user - BOOL (yes|no)
140 metadata.some_objects.version - BOOL (yes|no)
141 metadata.some_objects.timestamp - BOOL (yes|no)
142 metadata.some_objects.changeset - BOOL (yes|no)
143 metadata.some_objects.uid - BOOL (yes|no)
144 metadata.some_objects.user - BOOL (yes|no)
145
146 All timestamps are in the usual OSM ISO format yy-mm-ddThh::mm::ssZ.
147 Boxes are in the format (xmin, ymin, xmax, ymax).
148
149 There are two variables for each metadata field. The meta‐
150 data.all_objects.* variables are true if all objects in the file have
151 the attribute. The metadata.some_objects.* variables are true if at
152 least one object in the file has the attribute. Please note that
153 objects last modified by anonymous users (until 2007) do not have user
154 and uid attributes and can lead to wrong results.
155
157 osmium fileinfo exits with exit code
158
159 0 if everything went alright,
160
161 1 if there was an error processing the data, or
162
163 2 if there was a problem with the command line arguments.
164
166 osmium fileinfo does all its work on the fly and doesn't keep much data
167 in main memory.
168
170 · osmium(1), osmium-file-formats(5), osmium-sort(1)
171
172 · Osmium website (https://osmcode.org/osmium-tool/)
173
175 Copyright (C) 2013-2018 Jochen Topf <jochen@topf.org>.
176
177 License GPLv3+: GNU GPL version 3 or later
178 <https://gnu.org/licenses/gpl.html>. This is free software: you are
179 free to change and redistribute it. There is NO WARRANTY, to the
180 extent permitted by law.
181
183 If you have any questions or want to report a bug, please go to
184 https://osmcode.org/contact.html
185
187 Jochen Topf <jochen@topf.org>.
188
189
190
191 1.9.1 OSMIUM-FILEINFO(1)