OSMIUM-CHECK-REFS(1)
π OSMIUM-CHECK-REFS π
okay bestie, welcome to the osmium-check-refs manual page (that's the OSMIUM-CHECK-REFS(1) one, from the osmium crew) β and yes it is exactly as iconic as it sounds π
β¨ NAME β¨
osmium-check-refs β check referential integrity of OSM file π«Ά
πΈ SYNOPSIS πΈ
osmium check-refs [OPTIONS] OSM-DATA-FILE
π¦ DESCRIPTION π¦
okay so here's the tea: in OSM files, ways refer to nodes, and relations refer to nodes, ways, or other relations. This command checks whether all objects referenced in the input file are also present in the input file. like, is everybody who got @'d actually in the group chat?? that's the vibe check π₯
Referential integrity is often broken in extracts. This can lead to problems with some uses of the OSM data. Use this command to make sure your data is good. (ngl, extracts be messy like that π)
If the option --check-relations/-r is not given, this command will only check if all nodes referenced in ways are in the file. With the option, relations will also be checked. so -r is the "and also check my mutuals" setting π
This command expects the input file to be ordered in the usual way: first nodes in order of ID, then ways in order of ID, then relations in order of ID. Negative IDs are allowed, they must be ordered before the positive IDs. See the osmium-sort(1) man page for details of the ordering. so like, sorted, bestie. in order. no chaos π
This command will only work for OSM data files, not OSM history files or change files. periodt. don't even try it.
This command reads its input file only once, ie. it can read from STDIN. one pass, one look, no re-reading, main character energy only π
π OPTIONS π
-i,--show-idsβ Print all missing IDs to STDOUT. If you don't specify this option, only a summary is shown. so like,-iis the "name names" option π-r,--check-relationsβ Also check referential integrity of relations. Without this option, only nodes in ways are checked.
β¨ COMMON OPTIONS β¨
-h,--helpβ Show usage help.-v,--verboseβ Set verbose mode. The program will output information about what it is doing to STDERR. it's giving "narrating my own life" β¨--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. Seeosmium-file-formats(5)or the libosmium manual for details. one format to rule them all, fr fr π
π§ MEMORY USAGE π§
osmium check-refs will do the check in one pass through the input data. It needs enough main memory to store all temporary data.
Largest memory need will be about 1 bit for each node ID, that's roughly 860 MB these days (February 2020). With the --check-relations/-r option memory use will be a bit bigger. so like, clear some space on your desk bestie π
π DIAGNOSTICS π
osmium check-refs exits with exit code
0β if all references are satisfied β1β if there was an error processing the data or some references were not satisfied π2β if there was a problem with the command line arguments π
π SEE ALSO π
osmium(1),osmium-file-formats(5),osmium-sort(1)- Osmium website
π COPYRIGHT π
Copyright (C) 2013-2026 Jochen Topf <jochen@topf.org>.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (yes, all caps NO WARRANTY, they meant it π )
π«Ά 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>.
okay that's the whole page, you ate it, no cap π this was version 1.19.1 of OSMIUM-CHECK-REFS(1) β go check those refs bestie, and remember: everybody referenced deserves to actually exist ππ
π¦ where this page comes from
- fedora 44: osmium-tool 1.19.1-1.fc44 Β· GPL-3.0-only
- nixos 26.05: osmium-tool 1.19.1
- nixpkgs unstable: osmium-tool 1.19.1
- ubuntu stonking: osmium-tool 1.19.1-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms