.TH "OSMIUM-ADD-LOCATIONS-TO-WAYS" "1" "1.13.1" "" "" .SH NAME .PP osmium-add-locations-to-ways - add node locations to ways in OSM file .SH SYNOPSIS .PP \f[B]osmium add-locations-to-ways\f[R] [\f[I]OPTIONS\f[R]] \f[I]OSM-FILE\f[R]\&... .SH DESCRIPTION .PP Usually only nodes have locations and the ways refer to those locations via the IDs of the nodes. This program will copy the input file(s) to the output, taking the locations from the nodes and adding them to the ways. This makes it easier for other programs to assemble the way geometries. .PP The input file must contain all nodes needed for the ways, otherwise there will be an error. You can change this behaviour using the \f[B]--ignore-missing-nodes\f[R] option. .PP Nodes without any tags will not be copied (unless the \f[B]--keep-untagged-nodes/-n\f[R] option is used). The size of the output file will be similar or a bit smaller than the input file (unless the \f[B]--keep-untagged-nodes/-n\f[R] option is used in which case it will be a lot bigger). .PP Note that the OSM files generated by this command use a non-standard format extension. .PP The \f[B]osmium add-locations-to-ways\f[R] command has to keep an index of the node locations in memory or in a temporary file on disk while doing its work. There are several different ways it can do that which have different advantages and disadvantages. The default is good enough for most cases, but see the \f[B]osmium-index-types\f[R](5) man page for details. .PP If the \f[B]--keep-untagged-nodes/-n\f[R] option is used, files created by this command can be updated with the \f[B]apply-changes\f[R] command using the \f[B]--locations-on-ways\f[R] option. .PP This command will not work on full history files. .PP The command will work with negative IDs. The index types for positive IDs and negative IDs are set separately with the \f[B]--index-type/-i\f[R] and \f[B]--index-type-neg\f[R] options, respectively. .PP This commands reads its input file(s) only once and writes its output file in one go so it can be streamed, ie. it can read from STDIN and write to STDOUT. .SH OPTIONS .TP -i, --index-type=TYPE Set the index type for positive IDs. For details see the \f[B]osmium-index-types\f[R](5) man page. .TP --index-type-neg=TYPE Set the index type for negative IDs. For details see the \f[B]osmium-index-types\f[R](5) man page. .TP -I, --show-index-types Shows a list of available index types. For details see the \f[B]osmium-index-types\f[R](5) man page. .TP -n, --keep-untagged-nodes Keep the untagged nodes in the output file. .TP --ignore-missing-nodes If this is not set a missing node needed for a way results in an error. If this is set, errors are ignored and the way will have an invalid location set for the missing node. .SH COMMON OPTIONS .TP -h, --help Show usage help. .TP -v, --verbose Set verbose mode. The program will output information about what it is doing to STDERR. .TP --progress Show progress bar. Usually a progress bar is only displayed if STDOUT and STDERR are detected to be TTY. With this option a progress bar is always shown. Note that a progress bar will never be shown when reading from STDIN or a pipe. .TP --no-progress Do not show progress bar. Usually a progress bar is displayed if STDOUT and STDERR are detected to be a TTY. With this option the progress bar is suppressed. Note that a progress bar will never be shown when reading from STDIN or a pipe. .SH INPUT OPTIONS .TP -F, --input-format=FORMAT The format of the input file(s). Can be used to set the input format if it can\[cq]t be autodetected from the file name(s). This will set the format for all input files, there is no way to set the format for some input files only. See \f[B]osmium-file-formats\f[R](5) or the libosmium manual for details. .SH OUTPUT OPTIONS .TP -f, --output-format=FORMAT The format of the output file. Can be used to set the output file format if it can\[cq]t be autodetected from the output file name. See \f[B]osmium-file-formats\f[R](5) or the libosmium manual for details. .TP --fsync Call fsync after writing the output file to force flushing buffers to disk. .TP --generator=NAME The name and version of the program generating the output file. It will be added to the header of the output file. Default is \[lq]\f[I]osmium/\f[R]\[rq] and the version of osmium. .TP -o, --output=FILE Name of the output file. Default is `-' (STDOUT). .TP -O, --overwrite Allow an existing output file to be overwritten. Normally \f[B]osmium\f[R] will refuse to write over an existing file. .TP --output-header=OPTION=VALUE Add output header option. This command line option can be used multiple times for different OPTIONs. See the \f[I]libosmium manual\f[R] for a list of available header options. For some commands you can use the special format \[lq]OPTION!\[rq] (ie. an exclamation mark after the OPTION and no value set) to set the value to the same as in the input file. .SH DIAGNOSTICS .PP \f[B]osmium add-locations-to-ways\f[R] exits with exit code .TP 0 if everything went alright, .TP 1 if there was an error processing the data, or .TP 2 if there was a problem with the command line arguments. .SH MEMORY USAGE .PP \f[B]osmium add-locations-to-ways\f[R] will usually keep all node locations in memory. For larger data files, this can need several tens of GBytes of memory. See the \f[B]osmium-index-types\f[R](5) man page for details. .SH EXAMPLES .PP Add node locations to an extract keeping all nodes: .IP .nf \f[C] osmium add-locations-to-ways -n -o germany-low.osm.pbf germany.osm.pbf \f[R] .fi .PP Add node locations to a planet file (without untagged nodes): .IP .nf \f[C] osmium add-locations-to-ways -i dense_mmap_array -o planet-low.osm.pbf planet.osm.pbf \f[R] .fi .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[R](1), \f[B]osmium-file-formats\f[R](5), \f[B]osmium-index-types\f[R](5) .IP \[bu] 2 Osmium website (https://osmcode.org/osmium-tool/) .SH COPYRIGHT .PP Copyright (C) 2013\-2021 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH CONTACT .PP If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html .SH AUTHORS Jochen Topf .