.TH "OSMIUM-QUERY-LOCATIONS-INDEX" "1" "1.13.1" "" "" .SH NAME .PP osmium\-query\-locations\-index \- query node locations index .SH SYNOPSIS .PP \f[B]osmium query\-locations\-index\f[] \-i INDEX\-FILE [\f[I]OPTIONS\f[]] \f[I]NODE\-ID\f[] .PD 0 .P .PD \f[B]osmium query\-locations\-index\f[] \-i INDEX\-FILE [\f[I]OPTIONS\f[]] \-\-dump .SH DESCRIPTION .PP Get the location of a node from an index created with \f[B]osmium create\-locations\-index\f[] or dump the whole index into an OSM file. .PP The index file format is compatible to the one created by \[lq]osmium add\-location\-to\-ways \-i dense_file_array,INDEX\-FILE\[rq] and to the flatnode store created by osm2pgsql. .PP This command will not work with negative node IDs. .PP Note that when the \f[B]\-\-dump\f[] option is used, metadata (like version, timestamp, etc.) is not written to the output file because it is all empty anyway. Use the \f[B]\-\-output\-format/\-f\f[] option with \f[C]add_metadata=...\f[] to overwrite this. .SH OPTIONS .TP .B \[en]dump Dump all node locations to an OSM file. Use the \f[B]\-\-output/\-o\f[] and \f[B]\-\-output\-format/\-f\f[] options to set the file format to be used. Default is STDOUT and the OPL format, respectively. .RS .RE .TP .B \-i, \-\-index\-file=FILENAME The name of the index file. .RS .RE .SH COMMON OPTIONS .TP .B \-h, \-\-help Show usage help. .RS .RE .TP .B \-v, \-\-verbose Set verbose mode. The program will output information about what it is doing to STDERR. .RS .RE .SH OUTPUT OPTIONS .TP .B \-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 \f[B]osmium\-file\-formats\f[](5) or the libosmium manual for details. .RS .RE .TP .B \-\-fsync Call fsync after writing the output file to force flushing buffers to disk. .RS .RE .TP .B \-\-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 \[lq]\f[I]osmium/\f[]\[rq] and the version of osmium. .RS .RE .TP .B \-o, \-\-output=FILE Name of the output file. Default is `\-' (STDOUT). .RS .RE .TP .B \-O, \-\-overwrite Allow an existing output file to be overwritten. Normally \f[B]osmium\f[] will refuse to write over an existing file. .RS .RE .TP .B \-\-output\-header=OPTION=VALUE Add output header option. This command line option can be used multiple times for different OPTIONs. See the \f[I]libosmium manual\f[] for a list of available header options. For some commands you can use the special format \[lq]OPTION!\[rq] (ie. an exclamation mark after the OPTION and no value set) to set the value to the same as in the input file. .RS .RE .SH DIAGNOSTICS .PP \f[B]osmium query\-locations\-index\f[] exits with exit code .TP .B 0 if everything went alright and the node location was found, .RS .RE .TP .B 1 if the node location was not found, .RS .RE .TP .B 2 if there was a problem with the command line arguments. .RS .RE .SH MEMORY USAGE .PP \f[B]osmium query\-locations\-index\f[] will not use a lot of memory. .SH EXAMPLES .PP Get location of node 1234 from locations.idx: .IP .nf \f[C] osmium\ query\-locations\-index\ \-i\ locations.idx\ 1234 \f[] .fi .PP Dump contents of locations.idx into an OPL file: .IP .nf \f[C] osmium\ query\-locations\-index\ \-i\ locations.idx\ \-\-dump\ \-o\ nodes.opl \f[] .fi .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1), \f[B]osmium\-create\-locations\-index\f[](1), \f[B]osmium\-file\-formats\f[](5) .IP \[bu] 2 Osmium website (https://osmcode.org/osmium-tool/) .IP \[bu] 2 osm2pgsql (https://wiki.openstreetmap.org/wiki/Osm2pgsql) .SH COPYRIGHT .PP Copyright (C) 2013\-2021 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH CONTACT .PP If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html .SH AUTHORS Jochen Topf .