1OSMIUM-REMOVEID(1)                                          OSMIUM-REMOVEID(1)
2
3
4

NAME

6       osmium-removeid - remove objects from OSM file by ID
7

SYNOPSIS

9       osmium removeid [OPTIONS] OSM-FILE ID...
10       osmium removeid [OPTIONS] OSM-FILE -i ID-FILE
11       osmium removeid [OPTIONS] OSM-FILE -I ID-OSM-FILE
12

DESCRIPTION

14       Copy input file to output removing objects with the specified IDs.
15
16       IDs  can be given on the command line (first case in synopsis), or read
17       from text files with one ID per line (second case in synopsis), or read
18       from  OSM files (third cases in synopsis).  A mixture of these cases is
19       also allowed.
20
21       Objects will be written out in the order they are  found  in  the  OSM-
22       FILE.  The input file is only read once, reading from STDIN is possible
23       by using the special file name `-'.
24
25       On the command line or in the ID file, the IDs have the form: TYPE-LET‐
26       TER  NUMBER.   The  type letter is `n' for nodes, `w' for ways, and `r'
27       for relations.  If there is no type letter, `n' for  nodes  is  assumed
28       (or whatever the --default-type option says).  So “n13 w22 17 r21” will
29       match the nodes 13 and 17, the way 22 and the relation 21.
30
31       The order in which the IDs appear does not matter.  Identical  IDs  can
32       appear multiple times on the command line or in the ID file(s).
33
34       On the command line, the list of IDs can be in separate arguments or in
35       a single argument separated by spaces,  tabs,  commas  (,),  semicolons
36       (;), forward slashes (/) or pipe characters (|).
37
38       In  an ID file (option --id-file/-i) each line must start with an ID in
39       the format described above.  Leading space characters in the  line  are
40       ignored.  Lines can optionally contain a space character or a hash sign
41       (`#') after the ID.  Any characters after that are ignored.  (This also
42       allows files in OPL format to be read.)  Empty lines are ignored.
43
44       Note  that all objects will be taken from the OSM-FILE, the ID-OSM-FILE
45       is only used to detect which objects to remove.
46
47       The OSM-FILE can be a history file in which case all  versions  of  the
48       objects with the specified IDs will be removed.
49
50       This command will not work with negative IDs.
51

OPTIONS

53       --default-type=TYPE
54              Use  TYPE  (`node', `way', or `relation') for IDs without a type
55              prefix (default: `node').  It is also allowed to  just  use  the
56              first character of the type here.
57
58       -i, --id-file[=FILE]
59              Read  IDs  from text file instead of from the command line.  Use
60              the special name “-” to read from STDIN.  Each line of the  file
61              must  start with an ID in the format described above.  Lines can
62              optionally contain a space character or a hash sign (`#')  after
63              the  ID.   This  character  and all following characters are ig‐
64              nored.  (This allows files in OPL format  to  be  read.)   Empty
65              lines are also ignored.  This option can be used multiple times.
66
67       -I, --id-osm-file=OSMFILE
68              Like --id-file/-i but get the IDs from an OSM file.  This option
69              can be used multiple times.
70

COMMON OPTIONS

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

INPUT OPTIONS

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

OUTPUT OPTIONS

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
113osmium/” 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 osmium-output-
125              headers(5) man page for a list of available header options.  For
126              some  commands you can use the special format “OPTION!” (ie.  an
127              exclamation mark after the OPTION and no value set) to  set  the
128              value to the same as in the input file.
129

DIAGNOSTICS

131       osmium removeid exits with exit code
132
133       0      if nothing went wrong
134
135       2      if there was a problem with the command line arguments.
136

MEMORY USAGE

138       osmium  removeid does all its work on the fly and only keeps a table of
139       all IDs it needs in main memory.
140

EXAMPLES

142       Output all nodes except nodes 17 and 1234, all ways except way 42,  and
143       all relations except relation 111 to STDOUT in OPL format:
144
145              osmium removeid -f opl planet.osm.pbf n1234 w42 n17 r111
146

SEE ALSO

148osmium(1),  osmium-getid(1),  osmium-file-formats(5),  osmium-output-
149         headers(5)
150
151       • Osmium website (https://osmcode.org/osmium-tool/)
152
154       Copyright (C) 2013-2023 Jochen Topf <jochen@topf.org>.
155
156       License  GPLv3+:  GNU  GPL  version  3  or  later  <https://gnu.org/li
157       censes/gpl.html>.   This  is  free software: you are free to change and
158       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
159

CONTACT

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

AUTHORS

165       Jochen Topf <jochen@topf.org>.
166
167
168
169                                    1.16.0                  OSMIUM-REMOVEID(1)
Impressum