.TH "OSMIUM-ADD-LOCATIONS-TO-WAYS" "1" "1.5.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[] [\f[I]OPTIONS\f[]] \f[I]OSM\-FILE\f[]... .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[C]\-\-ignore\-missing\-nodes\f[] option. .PP Nodes without any tags will not be copied (unless the \f[B]\-\-keep\-untagged\-nodes\f[], \f[B]\-n\f[] 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\f[], \f[B]\-n\f[] 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 node locations have to be kept in memory while doings this. Use the \f[B]\-\-index\-type\f[], \f[B]\-i\f[] option to set the index type used. Default is \f[C]sparse_mmap_array\f[] on Linux and \f[C]sparse_mem_array\f[] on OSX/Windows. This is the right index type for small to medium sized extracts. For large (continent\-sized) extracts or the full planet use \f[C]dense_mmap_array\f[] on Linux or \f[C]dense_mem_array\f[] on OSX/Windows. .PP This program will not work on full history files. .SH OPTIONS .TP .B \-i, \-\-index\-type=TYPE Set the index type. .RS .RE .TP .B \-I, \-\-show\-index\-types Shows a list of available index types. It depends on your operating system which index types are available. .RS .RE .TP .B \-n, \-\-keep\-untagged\-nodes Keep the untagged nodes in the output file. .RS .RE .TP .B \-\-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. .RS .RE .SH COMMON OPTIONS .TP .B \-h, \-\-help Show usage help. .RS .RE .TP .B \-v, \-\-verbose Set verbose mode. The program will output information about what it is doing to \f[I]stderr\f[]. .RS .RE .TP .B \-\-progress Show progress bar. Usually a progress bar is only displayed if STDERR is detected to be a 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. .RS .RE .TP .B \-\-no\-progress Do not show progress bar. Usually a progress bar is displayed if STDERR is 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. .RS .RE .SH INPUT OPTIONS .TP .B \-F, \-\-input\-format=FORMAT The format of the input file(s). Can be used to set the input format if it can\[aq]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[](5) or the libosmium manual for details. .RS .RE .SH OUTPUT OPTIONS .TP .B \-f, \-\-output\-format=FORMAT The format of the output file. Can be used to set the output file format if it can\[aq]t be autodetected from the output file name. See \f[B]osmium\-file\-formats\f[](5) or the libosmium manual for details. .RS .RE .TP .B \-\-fsync Call fsync after writing the output file to force flushing buffers to disk. .RS .RE .TP .B \-\-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 "\f[I]osmium/\f[]" and the version of osmium. .RS .RE .TP .B \-o, \-\-output=FILE Name of the output file. Default is \[aq]\-\[aq] (STDOUT). .RS .RE .TP .B \-O, \-\-overwrite Allow an existing output file to be overwritten. Normally \f[B]osmium\f[] will refuse to write over an existing file. .RS .RE .TP .B \-\-output\-header=OPTION Add output header option. This option can be given several times. See the \f[I]libosmium manual\f[] for a list of allowed header options. .RS .RE .SH DIAGNOSTICS .PP \f[B]osmium add\-locations\-to\-ways\f[] exits with exit code .TP .B 0 if everything went alright, .RS .RE .TP .B 1 if there was an error processing the data, or .RS .RE .TP .B 2 if there was a problem with the command line arguments. .RS .RE .SH MEMORY USAGE .PP \f[B]osmium add\-locations\-to\-ways\f[] needs to keep all node locations in memory. It depends on the index type used how much memory is needed: .IP \[bu] 2 For \f[C]sparse\f[] types 16 bytes per node in the input file are used. .IP \[bu] 2 For \f[C]dense\f[] types 8 bytes times the largest node ID in the input file are used. .PP The \f[C]*_mem_*\f[] types use potentially up to twice this amount. .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[] .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[] .fi .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1), \f[B]osmium\-file\-formats\f[](5) .IP \[bu] 2 Osmium website (http://osmcode.org/osmium-tool/) .SH COPYRIGHT .PP Copyright (C) 2013\-2017 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 http://osmcode.org/contact.html .SH AUTHORS Jochen Topf .