Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OSMIUM-ADD-LOCATIONS-TO-WAYS(1)		       OSMIUM-ADD-LOCATIONS-TO-WAYS(1)

NAME
       osmium-add-locations-to-ways - add node locations to ways in OSM	file

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

DESCRIPTION
       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.

       The input file must contain all nodes needed for	 the  ways,  otherwise
       there  will be an error.	 You can change	this behaviour using the --ig-
       nore-missing-nodes option.

       Nodes without any tags  will  not  be  copied  (unless  the  --keep-un-
       tagged-nodes/-n	option	is used).  The size of the output file will be
       similar or a bit	smaller	than the input	file  (unless  the  --keep-un-
       tagged-nodes/-n option is used in which case it will be a lot bigger).

       Note  that  the OSM files generated by this command use a format	exten-
       sion.  Most programs reading OSM	files will not understand this	exten-
       sion and	should ignore the extra	data.

       The  osmium  add-locations-to-ways  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  dif-
       ferent  advantages  and	disadvantages.	The default is good enough for
       most cases, but see the osmium-index-types(5) man page for details.

       If the --keep-untagged-nodes/-n option is used, files created  by  this
       command can be updated with the apply-changes command using the --loca-
       tions-on-ways option.

       This command will not work on full history files.

       The  command  will work with negative IDs (unless the option -keep-mem-
       ber-nodes is used).  The	index types for	positive IDs and negative  IDs
       are  set	 separately  with the --index-type/-i and --index-type-neg op-
       tions, respectively.

       This commands reads its input file(s) only once (unless the  -keep-mem-
       ber-nodes  option  is  used) and	writes its output file in one go so it
       can be streamed,	ie.  it	can read from STDIN and	write to STDOUT.   The
       input  file  must be sorted in the usual	order: first nodes, then ways,
       then relations, objects of each type ordered by id.  If there are  mul-
       tiple input files, they will be read in the order specified on the com-
       mand  line.   They  must	 together  have	the correct order, so, for in-
       stance, the first one can have all the sorted nodes, the	second all the
       sorted ways, etc.  If this is not the case use osmium merge on the  in-
       puts first.

OPTIONS
       -i, --index-type=TYPE
	      Set  the	index  type for	positive IDs.  For details see the os-
	      mium-index-types(5) man page.

       --index-type-neg=TYPE
	      Set the index type for negative IDs.  For	details	 see  the  os-
	      mium-index-types(5) man page.

       -I, --show-index-types
	      Shows  a list of available index types.  For details see the os-
	      mium-index-types(5) man page.

       -n, --keep-untagged-nodes
	      Keep the untagged	nodes in the output file.

       --keep-member-nodes
	      Keep the nodes that are referenced from relations.  If this  op-
	      tion  is	specified the input file(s) are	read twice.  Note that
	      the nodes	kept when this option is set are a  strict  subset  of
	      the nodes	kept when -keep-untagged-nodes is set, so setting both
	      options is unnecessary.

       --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.

COMMON OPTIONS
       -h, --help
	      Show usage help.

       -v, --verbose
	      Set  verbose  mode.   The	 program will output information about
	      what it is doing to STDERR.

       --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.

       --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.

INPUT OPTIONS
       -F, --input-format=FORMAT
	      The  format  of the input	file(s).  Can be used to set the input
	      format if	it can'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  osmium-file-for-
	      mats(5) or the libosmium manual for details.

OUTPUT OPTIONS
       -f, --output-format=FORMAT
	      The  format  of  the output file.	 Can be	used to	set the	output
	      file format if it	can't be autodetected  from  the  output  file
	      name.   See  osmium-file-formats(5)  or the libosmium manual for
	      details.

       --fsync
	      Call fsync after writing	the  output  file  to  force  flushing
	      buffers to disk.

       --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
	      "osmium/"	and the	version	of osmium.

       -o, --output=FILE
	      Name of the output file.	Default	is `-' (STDOUT).

       -O, --overwrite
	      Allow  an	 existing output file to be overwritten.  Normally os-
	      mium will	refuse to write	over an	existing file.

       --output-header=OPTION=VALUE
	      Add output header	option.	 This command line option can be  used
	      multiple	times  for  different  OPTIONs.	  See  the osmium-out-
	      put-headers(5) man page for a list of available header  options.
	      For  some	commands you can use the special format	"OPTION!" (ie.
	      an exclamation mark after	the OPTION and no value	 set)  to  set
	      the value	to the same as in the input file.

DIAGNOSTICS
       osmium add-locations-to-ways exits with exit code

       0      if everything went alright,

       1      if there was an error processing the data, or

       2      if there was a problem with the command line arguments.

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

EXAMPLES
       Add node	locations to an	extract	keeping	all nodes:

	      osmium add-locations-to-ways -n -o germany-low.osm.pbf germany.osm.pbf

       Add node	locations to a planet file (without untagged nodes):

	      osmium add-locations-to-ways -i dense_mmap_array -o planet-low.osm.pbf planet.osm.pbf

SEE ALSO
        osmium(1), osmium-file-formats(5), osmium-index-types(5), osmium-out-
	 put-headers(5)

        Osmium	website	<https://osmcode.org/osmium-tool/>

COPYRIGHT
       Copyright (C) 2013-2023 Jochen Topf <jochen@topf.org>.

       License	GPLv3+:	 GNU  GPL  version  3  or  later  <https://gnu.org/li-
       censes/gpl.html>.   This	 is  free software: you	are free to change and
       redistribute it.	 There is NO WARRANTY, to the extent permitted by law.

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

AUTHORS
       Jochen Topf <jochen@topf.org>.

				    1.16.0     OSMIUM-ADD-LOCATIONS-TO-WAYS(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=osmium-add-locations-to-ways&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help