1OSMIUM-QUERY-LOCATIONS-INDEX(1) OSMIUM-QUERY-LOCATIONS-INDEX(1)
2
3
4
6 osmium-query-locations-index - query node locations index
7
9 osmium query-locations-index -i INDEX-FILE [OPTIONS] NODE-ID osmium
10 query-locations-index -i INDEX-FILE [OPTIONS] --dump
11
13 Get the location of a node from an index created with osmium create-
14 locations-index or dump the whole index into an OSM file.
15
16 The index file format is compatible to the one created by “osmium add-
17 location-to-ways -i dense_file_array,INDEX-FILE” and to the flatnode
18 store created by osm2pgsql.
19
20 This command will not work with negative node IDs.
21
22 Note that when the --dump option is used, metadata (like version, time‐
23 stamp, etc.) is not written to the output file because it is all empty
24 anyway. Use the --output-format/-f option with add_metadata=... to
25 overwrite this.
26
28 –dump Dump all node locations to an OSM file. Use the --output/-o and
29 --output-format/-f options to set the file format to be used.
30 Default is STDOUT and the OPL format, respectively.
31
32 -i, --index-file=FILENAME
33 The name of the index file.
34
36 -h, --help
37 Show usage help.
38
39 -v, --verbose
40 Set verbose mode. The program will output information about
41 what it is doing to STDERR.
42
44 -f, --output-format=FORMAT
45 The format of the output file. Can be used to set the output
46 file format if it can’t be autodetected from the output file
47 name. See osmium-file-formats(5) or the libosmium manual for
48 details.
49
50 --fsync
51 Call fsync after writing the output file to force flushing buf‐
52 fers to disk.
53
54 --generator=NAME
55 The name and version of the program generating the output file.
56 It will be added to the header of the output file. Default is
57 “osmium/” and the version of osmium.
58
59 -o, --output=FILE
60 Name of the output file. Default is `-' (STDOUT).
61
62 -O, --overwrite
63 Allow an existing output file to be overwritten. Normally
64 osmium will refuse to write over an existing file.
65
66 --output-header=OPTION=VALUE
67 Add output header option. This command line option can be used
68 multiple times for different OPTIONs. See the libosmium manual
69 for a list of available header options. For some commands you
70 can use the special format “OPTION!” (ie. an exclamation mark
71 after the OPTION and no value set) to set the value to the same
72 as in the input file.
73
75 osmium query-locations-index exits with exit code
76
77 0 if everything went alright and the node location was found,
78
79 1 if the node location was not found,
80
81 2 if there was a problem with the command line arguments.
82
84 osmium query-locations-index will not use a lot of memory.
85
87 Get location of node 1234 from locations.idx:
88
89 osmium query-locations-index -i locations.idx 1234
90
91 Dump contents of locations.idx into an OPL file:
92
93 osmium query-locations-index -i locations.idx --dump -o nodes.opl
94
96 · osmium(1), osmium-create-locations-index(1), osmium-file-formats(5)
97
98 · Osmium website (https://osmcode.org/osmium-tool/)
99
100 · osm2pgsql (https://wiki.openstreetmap.org/wiki/Osm2pgsql)
101
103 Copyright (C) 2013-2020 Jochen Topf <jochen@topf.org>.
104
105 License GPLv3+: GNU GPL version 3 or later
106 <https://gnu.org/licenses/gpl.html>. This is free software: you are
107 free to change and redistribute it. There is NO WARRANTY, to the
108 extent permitted by law.
109
111 If you have any questions or want to report a bug, please go to
112 https://osmcode.org/contact.html
113
115 Jochen Topf <jochen@topf.org>.
116
117
118
119 1.12.1 OSMIUM-QUERY-LOCATIONS-INDEX(1)