OSMIUM-QUERY-LOCATIONS-INDEX(1)

✨ OSMIUM-QUERY-LOCATIONS-INDEX(1) ✨

okay bestie, welcome to the osmium-query-locations-index manual page πŸ’– this is the section 1 command, and it's literally just here to look up node locations. group chat energy only, but the facts are all staying, no cap.

🌸 NAME 🌸

osmium-query-locations-index β€” query node locations index πŸ¦‹


⭐ SYNOPSIS ⭐

osmium query-locations-index -i INDEX-FILE [OPTIONS] NODE-ID
osmium query-locations-index -i INDEX-FILE [OPTIONS] --dump

πŸ’… DESCRIPTION πŸ’…

So basically you've got two moods here, and both of them are iconic ✨

  1. Get the location of a node out of an index that was made with osmium create-locations-index 🫢
  2. Dump the whole index into an OSM file πŸ“¦

The index file format? Compatible with the one created by osmium add-location-to-ways -i dense_file_array,INDEX-FILE and with the flatnode store created by osm2pgsql. slay, standards πŸ’…

⚠️ Heads up: this command will not work with negative node IDs. nope. don't even try it. πŸ™ˆ

Also, quick note β€” when you use the --dump option, metadata (like version, timestamp, etc.) does not get written to the output file, because honestly it's all empty anyway πŸ’€ If you want it, use the --output-format/-f option with add_metadata=... to overwrite that.


πŸŽ€ OPTIONS πŸŽ€

  • --dump β€” Dump all node locations to an OSM file πŸ“„ Use the --output/-o and --output-format/-f options to set the file format to be used. Default is STDOUT and the OPL format, respectively ✨
  • -i, --index-file=FILENAME β€” The name of the index file. that's the one you're reading from, bestie πŸ”

🌈 COMMON OPTIONS 🌈

  • -h, --help β€” Show usage help. your bestie when you forget everything 🫢
  • -v, --verbose β€” Set verbose mode. The program will output information about what it is doing to STDERR πŸ‘€ it's giving commentary track

πŸ’œ OUTPUT OPTIONS πŸ’œ

  • -f, --output-format=FORMAT β€” The format of the output file. Can be used to set the output file format if it can't be autodetected from the output file name. See osmium-file-formats(5) or the libosmium manual for details πŸ“š
  • --fsync β€” Call fsync after writing the output file to force flushing buffers to disk. get that data on the disk, periodt πŸ’Ύ
  • --generator=NAME β€” The name and version of the program generating the output file. It will be added to the header of the output file. Default is "osmium/" and the version of osmium 🏷️
  • -o, --output=FILE β€” Name of the output file. Default is - (STDOUT) ✨
  • -O, --overwrite β€” Allow an existing output file to be overwritten. Normally osmium will refuse to write over an existing file 🚫 so if you want that, you have to say it out loud
  • --output-header=OPTION=VALUE β€” Add output header option. This command line option can be used multiple times for different OPTIONs πŸ” See the osmium-output-headers(5) man page for a list of available header options. For some commands you can use the special format "OPTION!" (ie. an exclamation mark after the OPTION and no value set) to set the value to the same as in the input file πŸ‘‘

😭 DIAGNOSTICS 😭

osmium query-locations-index exits with exit code:

  1. 0 β€” if everything went alright and the node location was found πŸŽ‰
  2. 1 β€” if the node location was not found πŸ˜”
  3. 2 β€” if there was a problem with the command line arguments πŸ’€

🧚 MEMORY USAGE 🧚

osmium query-locations-index will not use a lot of memory. light as a feather, bestie πŸͺΆ


πŸ”₯ EXAMPLES πŸ”₯

Get location of node 1234 from locations.idx:

osmium query-locations-index -i locations.idx 1234

Dump contents of locations.idx into an OPL file:

osmium query-locations-index -i locations.idx --dump -o nodes.opl

🌟 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 that's the whole vibe, it's free, go wild, but no promises fr fr)


🫢 CONTACT 🫢

If you have any questions or want to report a bug, please go to <https://osmcode.org/contact.html> β€” they're nice, I promise πŸ’Œ


πŸ’– AUTHORS πŸ’–

Jochen Topf <jochen@topf.org>. the icon, the legend, the moment 🌟


and that's the whole page bestie, you ate it πŸ’…βœ¨ this was version 1.19.1 of the osmium-query-locations-index manual, so go query those locations, love u, bye πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from