osmium-query-locations-index - Man Page

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

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.

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.

Common Options

-h,  --help

Show usage help.

-v,  --verbose

Set verbose mode. The program will output information about what it is doing to STDERR.

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.

--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.

--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

0

if everything went alright and the node location was found,

1

if the node location was not found,

2

if there was a problem with the command line arguments.

Memory Usage

osmium query-locations-index will not use a lot of memory.

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

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>.

Referenced By

osmium-create-locations-index(1).

1.16.0