1OSMIUM-ADD-LOCATIONS-TO-WAYS(1) OSMIUM-ADD-LOCATIONS-TO-WAYS(1)
2
3
4
6 osmium-add-locations-to-ways - add node locations to ways in OSM file
7
9 osmium add-locations-to-ways [OPTIONS] OSM-FILE...
10
12 Usually only nodes have locations and the ways refer to those locations
13 via the IDs of the nodes. This program will copy the input file(s) to
14 the output, taking the locations from the nodes and adding them to the
15 ways. This makes it easier for other programs to assemble the way ge‐
16 ometries.
17
18 The input file must contain all nodes needed for the ways, otherwise
19 there will be an error. You can change this behaviour using the --ig‐
20 nore-missing-nodes option.
21
22 Nodes without any tags will not be copied (unless the --keep-untagged-
23 nodes/-n option is used). The size of the output file will be similar
24 or a bit smaller than the input file (unless the --keep-untagged-
25 nodes/-n option is used in which case it will be a lot bigger).
26
27 Note that the OSM files generated by this command use a non-standard
28 format extension.
29
30 The osmium add-locations-to-ways command has to keep an index of the
31 node locations in memory or in a temporary file on disk while doing its
32 work. There are several different ways it can do that which have dif‐
33 ferent advantages and disadvantages. The default is good enough for
34 most cases, but see the osmium-index-types(5) man page for details.
35
36 If the --keep-untagged-nodes/-n option is used, files created by this
37 command can be updated with the apply-changes command using the --loca‐
38 tions-on-ways option.
39
40 This command will not work on full history files.
41
42 The command will work with negative IDs. The index types for positive
43 IDs and negative IDs are set separately with the --index-type/-i and
44 --index-type-neg options, respectively.
45
46 This commands reads its input file(s) only once and writes its output
47 file in one go so it can be streamed, ie. it can read from STDIN and
48 write to STDOUT.
49
51 -i, --index-type=TYPE
52 Set the index type for positive IDs. For details see the os‐
53 mium-index-types(5) man page.
54
55 --index-type-neg=TYPE
56 Set the index type for negative IDs. For details see the os‐
57 mium-index-types(5) man page.
58
59 -I, --show-index-types
60 Shows a list of available index types. For details see the os‐
61 mium-index-types(5) man page.
62
63 -n, --keep-untagged-nodes
64 Keep the untagged nodes in the output file.
65
66 --ignore-missing-nodes
67 If this is not set a missing node needed for a way results in an
68 error. If this is set, errors are ignored and the way will have
69 an invalid location set for the missing node.
70
72 -h, --help
73 Show usage help.
74
75 -v, --verbose
76 Set verbose mode. The program will output information about
77 what it is doing to STDERR.
78
79 --progress
80 Show progress bar. Usually a progress bar is only displayed if
81 STDOUT and STDERR are detected to be TTY. With this option a
82 progress bar is always shown. Note that a progress bar will
83 never be shown when reading from STDIN or a pipe.
84
85 --no-progress
86 Do not show progress bar. Usually a progress bar is displayed
87 if STDOUT and STDERR are detected to be a TTY. With this option
88 the progress bar is suppressed. Note that a progress bar will
89 never be shown when reading from STDIN or a pipe.
90
92 -F, --input-format=FORMAT
93 The format of the input file(s). Can be used to set the input
94 format if it can’t be autodetected from the file name(s). This
95 will set the format for all input files, there is no way to set
96 the format for some input files only. See osmium-file-for‐
97 mats(5) or the libosmium manual for details.
98
100 -f, --output-format=FORMAT
101 The format of the output file. Can be used to set the output
102 file format if it can’t be autodetected from the output file
103 name. See osmium-file-formats(5) or the libosmium manual for
104 details.
105
106 --fsync
107 Call fsync after writing the output file to force flushing buf‐
108 fers to disk.
109
110 --generator=NAME
111 The name and version of the program generating the output file.
112 It will be added to the header of the output file. Default is
113 “osmium/” and the version of osmium.
114
115 -o, --output=FILE
116 Name of the output file. Default is `-' (STDOUT).
117
118 -O, --overwrite
119 Allow an existing output file to be overwritten. Normally os‐
120 mium will refuse to write over an existing file.
121
122 --output-header=OPTION=VALUE
123 Add output header option. This command line option can be used
124 multiple times for different OPTIONs. See the libosmium manual
125 for a list of available header options. For some commands you
126 can use the special format “OPTION!” (ie. an exclamation mark
127 after the OPTION and no value set) to set the value to the same
128 as in the input file.
129
131 osmium add-locations-to-ways exits with exit code
132
133 0 if everything went alright,
134
135 1 if there was an error processing the data, or
136
137 2 if there was a problem with the command line arguments.
138
140 osmium add-locations-to-ways will usually keep all node locations in
141 memory. For larger data files, this can need several tens of GBytes of
142 memory. See the osmium-index-types(5) man page for details.
143
145 Add node locations to an extract keeping all nodes:
146
147 osmium add-locations-to-ways -n -o germany-low.osm.pbf germany.osm.pbf
148
149 Add node locations to a planet file (without untagged nodes):
150
151 osmium add-locations-to-ways -i dense_mmap_array -o planet-low.osm.pbf planet.osm.pbf
152
154 • osmium(1), osmium-file-formats(5), osmium-index-types(5)
155
156 • Osmium website (https://osmcode.org/osmium-tool/)
157
159 Copyright (C) 2013-2021 Jochen Topf <jochen@topf.org>.
160
161 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/li‐
162 censes/gpl.html>. This is free software: you are free to change and
163 redistribute it. There is NO WARRANTY, to the extent permitted by law.
164
166 If you have any questions or want to report a bug, please go to
167 https://osmcode.org/contact.html
168
170 Jochen Topf <jochen@topf.org>.
171
172
173
174 1.13.1 OSMIUM-ADD-LOCATIONS-TO-WAYS(1)