1OSMIUM-ADD-LOCATIONS-TO-WAYS(1)                OSMIUM-ADD-LOCATIONS-TO-WAYS(1)
2
3
4

NAME

6       osmium-add-locations-to-ways - add node locations to ways in OSM file
7

SYNOPSIS

9       osmium add-locations-to-ways [OPTIONS] OSM-FILE...
10

DESCRIPTION

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  format  exten‐
28       sion.   Most programs reading OSM files will not understand this exten‐
29       sion and should ignore the extra data.
30
31       The osmium add-locations-to-ways command has to keep an  index  of  the
32       node locations in memory or in a temporary file on disk while doing its
33       work.  There are several different ways it can do that which have  dif‐
34       ferent  advantages  and  disadvantages.  The default is good enough for
35       most cases, but see the osmium-index-types(5) man page for details.
36
37       If the --keep-untagged-nodes/-n option is used, files created  by  this
38       command can be updated with the apply-changes command using the --loca‐
39       tions-on-ways option.
40
41       This command will not work on full history files.
42
43       The command will work with negative IDs (unless the  option  –keep-mem‐
44       ber-nodes  is used).  The index types for positive IDs and negative IDs
45       are set separately with the --index-type/-i  and  --index-type-neg  op‐
46       tions, respectively.
47
48       This  commands reads its input file(s) only once (unless the –keep-mem‐
49       ber-nodes option is used) and writes its output file in one  go  so  it
50       can  be streamed, ie.  it can read from STDIN and write to STDOUT.  The
51       input file must be sorted in the usual order: first nodes,  then  ways,
52       then  relations, objects of each type ordered by id.  If there are mul‐
53       tiple input files, they will be read in the order specified on the com‐
54       mand  line.   They  must  together  have the correct order, so, for in‐
55       stance, the first one can have all the sorted nodes, the second all the
56       sorted  ways, etc.  If this is not the case use osmium merge on the in‐
57       puts first.
58

OPTIONS

60       -i, --index-type=TYPE
61              Set the index type for positive IDs.  For details  see  the  os‐
62              mium-index-types(5) man page.
63
64       --index-type-neg=TYPE
65              Set  the  index  type for negative IDs.  For details see the os‐
66              mium-index-types(5) man page.
67
68       -I, --show-index-types
69              Shows a list of available index types.  For details see the  os‐
70              mium-index-types(5) man page.
71
72       -n, --keep-untagged-nodes
73              Keep the untagged nodes in the output file.
74
75       --keep-member-nodes
76              Keep  the nodes that are referenced from relations.  If this op‐
77              tion is specified the input file(s) are read twice.   Note  that
78              the  nodes  kept  when this option is set are a strict subset of
79              the nodes kept when –keep-untagged-nodes is set, so setting both
80              options is unnecessary.
81
82       --ignore-missing-nodes
83              If this is not set a missing node needed for a way results in an
84              error.  If this is set, errors are ignored and the way will have
85              an invalid location set for the missing node.
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

OUTPUT OPTIONS

116       -f, --output-format=FORMAT
117              The format of the output file.  Can be used to  set  the  output
118              file  format  if  it  can’t be autodetected from the output file
119              name.  See osmium-file-formats(5) or the  libosmium  manual  for
120              details.
121
122       --fsync
123              Call  fsync after writing the output file to force flushing buf‐
124              fers to disk.
125
126       --generator=NAME
127              The name and version of the program generating the output  file.
128              It  will  be added to the header of the output file.  Default is
129osmium/” and the version of osmium.
130
131       -o, --output=FILE
132              Name of the output file.  Default is `-' (STDOUT).
133
134       -O, --overwrite
135              Allow an existing output file to be overwritten.   Normally  os‐
136              mium will refuse to write over an existing file.
137
138       --output-header=OPTION=VALUE
139              Add  output header option.  This command line option can be used
140              multiple times for different OPTIONs.   See  the  osmium-output-
141              headers(5) man page for a list of available header options.  For
142              some commands you can use the special format “OPTION!” (ie.   an
143              exclamation  mark  after the OPTION and no value set) to set the
144              value to the same as in the input file.
145

DIAGNOSTICS

147       osmium add-locations-to-ways exits with exit code
148
149       0      if everything went alright,
150
151       1      if there was an error processing the data, or
152
153       2      if there was a problem with the command line arguments.
154

MEMORY USAGE

156       osmium add-locations-to-ways will usually keep all  node  locations  in
157       memory.  For larger data files, this can need several tens of GBytes of
158       memory.  See the osmium-index-types(5) man page for details.
159

EXAMPLES

161       Add node locations to an extract keeping all nodes:
162
163              osmium add-locations-to-ways -n -o germany-low.osm.pbf germany.osm.pbf
164
165       Add node locations to a planet file (without untagged nodes):
166
167              osmium add-locations-to-ways -i dense_mmap_array -o planet-low.osm.pbf planet.osm.pbf
168

SEE ALSO

170osmium(1), osmium-file-formats(5), osmium-index-types(5), osmium-out‐
171         put-headers(5)
172
173       • Osmium website (https://osmcode.org/osmium-tool/)
174
176       Copyright (C) 2013-2022 Jochen Topf <jochen@topf.org>.
177
178       License  GPLv3+:  GNU  GPL  version  3  or  later  <https://gnu.org/li
179       censes/gpl.html>.  This is free software: you are free  to  change  and
180       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
181

CONTACT

183       If  you  have  any  questions  or  want  to  report a bug, please go to
184       https://osmcode.org/contact.html
185

AUTHORS

187       Jochen Topf <jochen@topf.org>.
188
189
190
191                                    1.14.0     OSMIUM-ADD-LOCATIONS-TO-WAYS(1)
Impressum