OSMIUM-CREATE-LOCATIONS-INDEX(1)
β¨ OSMIUM-CREATE-LOCATIONS-INDEX β¨
okay bestie, so this is the manual page for osmium-create-locations-index β it's the one that makes (or updates!) a locations index from an OSM file. it lives in the osmium family, section 1 of the manual. let's get into it π
πΈ NAME πΈ
osmium-create-locations-index β create or update a locations index from an OSM file. that's the whole vibe. no cap.
π¦ SYNOPSIS π¦
osmium create-locations-index -i INDEX-FILE [OPTIONS] OSM-FILE
π DESCRIPTION π
So basically: it creates an index of all node locations from OSM-FILE, and drops that index into INDEX-FILE. iconic behavior.
If INDEX-FILE already exists, it will not be touched unless you pass the --update / -u option. so like, hands off unless you ask nicely.
No matter how big the input file is, this index is gonna need about 8 * highest-node-id bytes on disk. for a current planet file that's literally more than 50 GBytes. so clear some space bestie, this is not a small snack π.
The index file format is compatible with the one made by osmium add-location-to-ways -i dense_file_array,INDEX-FILE, and also with the flatnode store created by osm2pgsql. matching energy, love that for them.
When the input file is a full history file or a change file, the last location encountered in the file for any ID is what ends up in the index. usually that'll be the newest location, aka the one from the node with the highest version.
π¨ this command will not work with negative node IDs. just... don't.
This command reads its input file only once, so it can be streamed β meaning yes, it can read from STDIN. streamy queen β¨
π OPTIONS π
-i,--index-file=FILENAMEβ the name of the index file. that's the file where the magic lands.-u,--updateβ allow updating of an existing file. without this, an existingINDEX-FILEstays untouched.
π COMMON OPTIONS π
-h,--helpβ show usage help. for when you're lost (we've all been there π«Ά).-v,--verboseβ set verbose mode. the program will output information about what it's doing toSTDERR. it's giving narrating its own life.--progressβ show a progress bar. usually a progress bar is only displayed ifSTDOUTandSTDERRare detected to be TTY. with this option a progress bar is always shown. note that a progress bar will never be shown when reading fromSTDINor a pipe. rules are rules π--no-progressβ do not show a progress bar. usually a progress bar is displayed ifSTDOUTandSTDERRare detected to be a TTY. with this option the progress bar is suppressed. note that a progress bar will never be shown when reading fromSTDINor a pipe. same rule, opposite vibe.
π INPUT OPTIONS π
-F,--input-format=FORMATβ the format of the input file(s). use it to set the input format when it can't be autodetected from the file name(s). this sets the format for all input files β there is no way to set the format for only some of them. sorry babes, all or nothing. seeosmium-file-formats(5)or the libosmium manual for the deets.
π₯ DIAGNOSTICS π₯
osmium create-locations-index exits with exit code:
0β if everything went alright. slay β1β if there was an error processing the data. π2β if there was a problem with the command line arguments. you said something it did not understand π
β MEMORY USAGE β
osmium create-locations-index will not use a lot of memory. lowkey the most chill command in the whole toolset. your RAM is safe π§
π EXAMPLES π
Create a node locations index from planet:
osmium create-locations-index -i locations.idx planet.osm.pbf
Set a node location in the index using an input file in OPL format:
echo "n123 x-80.6042 y28.6083" | \
osmium create-locations-index -i locations.idx -F opl --update
π SEE ALSO π
osmium(1),osmium-query-locations-index(1),osmium-file-formats(5)- Osmium website
osm2pgsql
πΈ 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 bestie, no warranty, we said what we said)
π«Ά 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>.
and that's the whole page, bestie π this was osmium-create-locations-index, version 1.19.1, from the osmium manual β go forth and index those locations, you absolute icon β¨π
π¦ 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