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 existing INDEX-FILE stays 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 to STDERR. it's giving narrating its own life.
  • --progress β€” show a 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. rules are rules πŸ’€
  • --no-progress β€” do not show a 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. 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. see osmium-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 πŸ’œ


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