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
73 -t, –object-type=TYPE
74 Read only objects of given type (node, way, relation, change‐
75 set). By default all types are read. This option can be given
76 multiple times. This only takes effect if the –extended option
77 is also used.
78
80 -h, –help
81 Show usage help.
82
83 -v, –verbose
84 Set verbose mode. The program will output information about
85 what it is doing to STDERR.
86
87 –progress
88 Show progress bar. Usually a progress bar is only displayed if
89 STDOUT and STDERR are detected to be TTY. With this option a
90 progress bar is always shown. Note that a progress bar will
91 never be shown when reading from STDIN or a pipe.
92
93 –no-progress
94 Do not show progress bar. Usually a progress bar is displayed
95 if STDOUT and STDERR are detected to be a TTY. With this option
96 the progress bar is suppressed. Note that a progress bar will
97 never be shown when reading from STDIN or a pipe.
98
100 -F, –input-format=FORMAT
101 The format of the input file(s). Can be used to set the input
102 format if it can't be autodetected from the file name(s). This
103 will set the format for all input files, there is no way to set
104 the format for some input files only. See osmium-file-for‐
105 mats(5) or the libosmium manual for details.
106
108 The following variables are available:
109
110 file.name - STRING
111 file.format - STRING: XML|PBF
112 file.compression - STRING: none|bzip2|gzip
113 file.size - INTEGER (always 0 when reading from STDIN)
114 header.with_history - BOOL (yes|no)
115 header.option.generator - STRING
116 header.option.version - STRING
117 header.option.pbf_dense_nodes - BOOL (yes|no)
118 header.option.osmosis_replication_timestamp - STRING with TIMESTAMP
119 header.option.osmosis_replication_sequence_number - INTEGER
120 header.option.osmosis_replication_base_url - STRING
121 data.bbox - BOX
122 (in JSON as nested ARRAY with coordinates)
123 data.timestamp.first - STRING with TIMESTAMP
124 data.timestamp.last - STRING wih TIMESTAMP
125 data.objects_ordered - BOOL (yes|no)
126 data.multiple_versions - STRING (yes|no|unknown)
127 (in JSON as BOOL and missing if "unknown")
128 data.crc32 - STRING with 8 hex digits
129 data.count.nodes - INTEGER
130 data.count.ways - INTEGER
131 data.count.relations - INTEGER
132 data.count.changesets - INTEGER
133 data.minid.nodes - INTEGER
134 data.minid.ways - INTEGER
135 data.minid.relations - INTEGER
136 data.minid.changesets - INTEGER
137 data.maxid.nodes - INTEGER
138 data.maxid.ways - INTEGER
139 data.maxid.relations - INTEGER
140 data.maxid.changesets - INTEGER
141 data.buffers.count - INTEGER
142 data.buffers.size - INTEGER
143 data.buffers.capcity - INTEGER
144 metadata.all_objects.version - BOOL (yes|no)
145 metadata.all_objects.timestamp - BOOL (yes|no)
146 metadata.all_objects.changeset - BOOL (yes|no)
147 metadata.all_objects.uid - BOOL (yes|no)
148 metadata.all_objects.user - BOOL (yes|no)
149 metadata.some_objects.version - BOOL (yes|no)
150 metadata.some_objects.timestamp - BOOL (yes|no)
151 metadata.some_objects.changeset - BOOL (yes|no)
152 metadata.some_objects.uid - BOOL (yes|no)
153 metadata.some_objects.user - BOOL (yes|no)
154
155 All timestamps are in the usual OSM ISO format yy-mm-ddThh::mm::ssZ.
156 Boxes are in the format (xmin, ymin, xmax, ymax).
157
158 There are two variables for each metadata field. The meta‐
159 data.all_objects.* variables are true if all objects in the file have
160 the attribute. The metadata.some_objects.* variables are true if at
161 least one object in the file has the attribute. Please note that
162 objects last modified by anonymous users (until 2007) do not have user
163 and uid attributes and can lead to wrong results.
164
166 osmium fileinfo exits with exit code
167
168 0 if everything went alright,
169
170 1 if there was an error processing the data, or
171
172 2 if there was a problem with the command line arguments.
173
175 osmium fileinfo does all its work on the fly and doesn't keep much data
176 in main memory.
177
179 · osmium(1), osmium-file-formats(5), osmium-sort(1)
180
181 · Osmium website (https://osmcode.org/osmium-tool/)
182
184 Copyright (C) 2013-2018 Jochen Topf <jochen@topf.org>.
185
186 License GPLv3+: GNU GPL version 3 or later
187 <https://gnu.org/licenses/gpl.html>. This is free software: you are
188 free to change and redistribute it. There is NO WARRANTY, to the
189 extent permitted by law.
190
192 If you have any questions or want to report a bug, please go to
193 https://osmcode.org/contact.html
194
196 Jochen Topf <jochen@topf.org>.
197
198
199
200 1.10.0 OSMIUM-FILEINFO(1)