osmium query-locations-index -i INDEX-FILE [Options] NODE-ID
osmium query-locations-index -i INDEX-FILE [Options] --dump
Get the location of a node from an index created with osmium create-locations-index or dump the whole index into an OSM file.
The index file format is compatible to the one created by “osmium add-location-to-ways -i dense_file_array,INDEX-FILE” and to the flatnode store created by osm2pgsql.
This command will not work with negative node IDs.
Note that when the --dump option is used, metadata (like version, timestamp, etc.) is not written to the output file because it is all empty anyway. Use the --output-format/-f option with
add_metadata=... to overwrite this.
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.
- -h, --help
Show usage help.
- -v, --verbose
Set verbose mode. The program will output information about what it is doing to STDERR.
- -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.
Call fsync after writing the output file to force flushing buffers to disk.
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.
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.
osmium query-locations-index exits with exit code
if everything went alright and the node location was found,
if the node location was not found,
if there was a problem with the command line arguments.
osmium query-locations-index will not use a lot of memory.
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
Copyright (C) 2013-2023 Jochen Topf <email@example.com>.
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.
If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html
Jochen Topf <firstname.lastname@example.org>.