1OSMIUM-CHECK-REFS(1)                                      OSMIUM-CHECK-REFS(1)
2
3
4

NAME

6       osmium-check-refs - check referential integrity of OSM file
7

SYNOPSIS

9       osmium check-refs [OPTIONS] OSM-DATA-FILE
10

DESCRIPTION

12       Ways  in  OSM files refer to OSM nodes; relations refer to nodes, ways,
13       or other relations.  This command checks whether all objects referenced
14       in the input file are also present in the input file.
15
16       Referential  integrity  is  often broken in extracts.  This can lead to
17       problems with some uses of the OSM data.  Use this command to make sure
18       your data is good.
19
20       If the option --check-relations/-r is not given, this command will only
21       check if all nodes referenced in ways are in the file, with the option,
22       relations will also be checked.
23
24       This  command  expects  the  input file to be ordered in the usual way:
25       First nodes in order of ID, then ways in order of ID, then relations in
26       order of ID.  Negative IDs are allowed, they must be ordered before the
27       positive IDs.  See the osmium-sort(1) man page for details of  the  or‐
28       dering.
29
30       This  command  will only work for OSM data files, not OSM history files
31       or change files.
32
33       This commands reads its input file only once, ie.   it  can  read  from
34       STDIN.
35

OPTIONS

37       -i, --show-ids
38              Print  all missing IDs to STDOUT.  If you don’t specify this op‐
39              tion, only a summary is shown.
40
41       -r, --check-relations
42              Also check referential integrity of relations.  Without this op‐
43              tion, only nodes in ways are checked.
44

COMMON OPTIONS

46       -h, --help
47              Show usage help.
48
49       -v, --verbose
50              Set  verbose  mode.   The  program will output information about
51              what it is doing to STDERR.
52
53       --progress
54              Show progress bar.  Usually a progress bar is only displayed  if
55              STDOUT  and  STDERR  are detected to be TTY.  With this option a
56              progress bar is always shown.  Note that  a  progress  bar  will
57              never be shown when reading from STDIN or a pipe.
58
59       --no-progress
60              Do  not  show progress bar.  Usually a progress bar is displayed
61              if STDOUT and STDERR are detected to be a TTY.  With this option
62              the  progress  bar is suppressed.  Note that a progress bar will
63              never be shown when reading from STDIN or a pipe.
64

INPUT OPTIONS

66       -F, --input-format=FORMAT
67              The format of the input file(s).  Can be used to set  the  input
68              format  if it can’t be autodetected from the file name(s).  This
69              will set the format for all input files, there is no way to  set
70              the  format  for  some  input  files only.  See osmium-file-for‐
71              mats(5) or the libosmium manual for details.
72

MEMORY USAGE

74       osmium check-refs will do the check in one pass through the input data.
75       It needs enough main memory to store all temporary data.
76
77       Largest  memory  need  will  be  about  1  bit for each node ID, that’s
78       roughly 860 MB these days  (February  2020).   With  the  --check-rela‐
79       tions/-r option memory use will be a bit bigger.
80

DIAGNOSTICS

82       osmium check-refs exits with exit code
83
84       0      if all references are satisfied
85
86       1      if  there  was  an  error processing the data or some references
87              were not satisfied, or
88
89       2      if there was a problem with the command line arguments.
90

SEE ALSO

92osmium(1), osmium-file-formats(5), osmium-sort(1)
93
94       • Osmium website (https://osmcode.org/osmium-tool/)
95
97       Copyright (C) 2013-2022 Jochen Topf <jochen@topf.org>.
98
99       License  GPLv3+:  GNU  GPL  version  3  or  later  <https://gnu.org/li
100       censes/gpl.html>.   This  is  free software: you are free to change and
101       redistribute it.  There is NO WARRANTY, to the extent permitted by law.
102

CONTACT

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

AUTHORS

108       Jochen Topf <jochen@topf.org>.
109
110
111
112                                    1.14.0                OSMIUM-CHECK-REFS(1)
Impressum