.TH "OSMIUM-INDEX-TYPES" "5" "1.13.1" "" "" .SH NAME .PP osmium\-index\-types \- Index types used to store node locations .SH DESCRIPTION .PP The \f[B]osmium add\-locations\-to\-ways\f[] and \f[B]osmium export\f[] commands have to keep an index of the node locations in memory or in a temporary file on disk while doing their work. There are several different ways this can be done which have different advantages and disadvantages. .PP Use the \f[B]\-\-show\-index\-types/\-I\f[] option on these commands to show all available index types. It depends on your operating system which index types are available. .PP Use the \f[B]\-\-index\-type/\-i\f[] option on these commands to set the index type to be used. .PP The default index type is \f[C]flex_mem\f[] which will keep all data in memory and works for small extracts as well as the whole planet file. It is the right choice for almost all use cases if you have enough memory to keep the whole index in memory. .PP For the \f[B]osmium export\f[] command, the special type \f[C]none\f[] is used when reading from files with the node locations on the ways. (See \f[B]osmium\-add\-node\-locations\-to\-ways\f[](1) for how to get a file like this.) .PP You can use one of the file\-based indexes for the node location store to minimize memory use, but performance will suffer. In this case use \f[C]sparse_file_array\f[] if you have a small or medium sized extract and \f[C]dense_file_array\f[] if you are working with a full planet or a really large extract. .PP When using the file\-based index types (\f[C]*_file_array\f[]), add the filename you want to use for the index after a comma to the index types like so: .PP \f[C]\&...\ \-i\ dense_file_array,index.dat\ ...\f[] .SH MEMORY USE .PP It depends on the index type used how much memory is needed: .IP \[bu] 2 For \f[C]sparse_*_array\f[] types 16 bytes per node in the input file are used. .IP \[bu] 2 For \f[C]dense_*_array\f[] types 8 bytes times the largest node ID in the input file are used. .PP The \f[C]*_mem_*\f[] types use potentially up to twice this amount. .PP The \f[C]*mem*\f[] and \f[C]*mmap*\f[] types store the data in memory, the \f[C]*file*\f[] types in a file on disk. .PP The \f[C]flex_mem\f[] type automatically switches between something similar to \f[C]sparse_mmap_array\f[] for smaller extracts and \f[C]dense_mmap_array\f[] for larger extracts or the whole planet file. .PP If you specify the \f[B]\-\-verbose/\-v\f[] option, Osmium will display how much memory was used for the index. .SH SEE ALSO .IP \[bu] 2 \f[B]osmium\f[](1), \f[B]osmium\-add\-locations\-to\-ways\f[](1), \f[B]osmium\-export\f[](1) .IP \[bu] 2 Osmium website (https://osmcode.org/osmium-tool/) .IP \[bu] 2 Index types (https://osmcode.org/osmium-concepts/#indexes) .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 .