# osmium export --verbose --overwrite -o '/var/www/html/filtered_extract.osm.pbf.pg' -f 'pg' --config='osmium.json' --add-unique-id='counter' --index-type=dense_file_array,/tmp/osmium-nodes.cache '/var/www/html/filtered_extract.osm.pbf'
Unknown index type 'dense_file_array,/tmp/osmium-nodes.cache'. Use --show-index-types or -I to get a list.
I expected osmium export to execute using dense_file_array indexing
What did happen instead?
I receive an error such as Unknown index type 'dense_file_array,/tmp/osmium-nodes.cache'. Use --show-index-types or -I to get a list.
What did you do to try analyzing the problem?
I tried changing --index-type=dense_file_array,/tmp/osmium-nodes.cache to --index-type='dense_file_array,/tmp/osmium-nodes.cache' :
# osmium export --verbose --overwrite -o '/var/www/html/filtered_extract.osm.pbf.pg' -f 'pg' --config='osmium.json' --add-unique-id='counter' --index-type='dense_file_array,/tmp/osmium-nodes.cache' '/var/www/html/filtered_extract.osm.pbf'
Unknown index type 'dense_file_array,/tmp/osmium-nodes.cache'. Use --show-index-types or -I to get a list.
I also tried changing --index-type=dense_file_array,/tmp/osmium-nodes.cache to --index-type=dense_file_array,osmium-nodes.cache :
# osmium export --verbose --overwrite -o '/var/www/html/filtered_extract.osm.pbf.pg' -f 'pg' --config='osmium.json' --add-unique-id='counter' --index-type=dense_file_array,osmium-nodes.cache '/var/www/html/filtered_extract.osm.pbf'
Unknown index type 'dense_file_array,osmium-nodes.cache'. Use --show-index-types or -I to get a list.
I also tried changing --index-type=dense_file_array,/tmp/osmium-nodes.cache to --index-type=sparse_file_array,/tmp/osmium-nodes.cache:
# osmium export --verbose --overwrite -o '/var/www/html/filtered_extract.osm.pbf.pg' -f 'pg' --config='osmium.json' --add-unique-id='counter' --index-type=sparse_file_array,/tmp/osmium-nodes.cache '/var/www/html/filtered_extract.osm.pbf'
Unknown index type 'sparse_file_array,/tmp/osmium-nodes.cache'. Use --show-index-types or -I to get a list.
I am running as root and I have accesso to /tmp. /tmp/osmium-nodes.cache does not exist at this time.
Without any --index-type it works fine for a small file, but I already know that on my setup I won't be able to handle a planet file, which I will need to use sooner or later:
# osmium export --verbose --overwrite -o '/var/www/html/filtered_extract.osm.pbf.pg' -f 'pg' --config='osmium.json' --add-unique-id='counter' '/var/www/html/filtered_extract.osm.pbf'[ 0:00] Started osmium export
[ 0:00] osmium version 1.10.0
[ 0:00] libosmium version 2.15.0
[ 0:00] Command line options and default settings:
[ 0:00] input options:
[ 0:00] file name: /var/www/html/filtered_extract.osm.pbf
[ 0:00] file format:
[ 0:00] output options:
[ 0:00] file name: /var/www/html/filtered_extract.osm.pbf.pg
[ 0:00] file format: pg
[ 0:00] overwrite: yes
[ 0:00] fsync: no
[ 0:00] attributes:
[ 0:00] type: @type
[ 0:00] id: @id
[ 0:00] version: (omitted)
[ 0:00] changeset: (omitted)
[ 0:00] timestamp: (omitted)
[ 0:00] uid: (omitted)
[ 0:00] user: (omitted)
[ 0:00] way_nodes: (omitted)
[ 0:00] linear tags: any
[ 0:00] area tags: any
[ 0:00] include only these tags:
[ 0:00] name
[ 0:00] wikidata
[ 0:00] subject:wikidata
[ 0:00] name:etymology:wikidata
[ 0:00] other options:
[ 0:00] index type: flex_mem
[ 0:00] add unique IDs: counter
[ 0:00] keep untagged features: no
[ 0:00] First pass (of two) through input file (reading relations)...
[ 0:00] First pass done.
[ 0:00] Second pass (of two) through input file...
[ 0:00]
[ 0:00] Create table with something like this:
[ 0:00] CREATE TABLE osmdata (
[ 0:00] id BIGINT PRIMARY KEY,
[ 0:00] geom GEOMETRY,
[ 0:00] osm_type VARCHAR,
[ 0:00] osm_id BIGINT,
[ 0:00] tags JSON -- or JSONB
[ 0:00] );
[ 0:00] Then load data with something like this:
[ 0:00] \copy osmdata FROM '/var/www/html/filtered_extract.osm.pbf.pg'
[ 0:00]
[======================================================================] 100%
[ 0:04] About 30 MBytes used for node location index (in main memory or on disk).
[ 0:04] Second pass done.
[ 0:04] Wrote 22194 features.
[ 0:04] Encountered 0 errors.
[ 0:04] Peak memory used: 1028 MBytes
[ 0:04] Done.
What version of osmium-tool are you using?
What operating system version are you using?
Tell us something about your system
Running inside a Docker container based on the target
dev
of this Dockerfile based on Debian Buster.What did you do exactly?
I read the documentation here:
From this script I ran:
These are the available index types:
What did you expect to happen?
I expected
osmium export
to execute usingdense_file_array
indexingWhat did happen instead?
I receive an error such as
Unknown index type 'dense_file_array,/tmp/osmium-nodes.cache'. Use --show-index-types or -I to get a list.
What did you do to try analyzing the problem?
I tried changing
--index-type=dense_file_array,/tmp/osmium-nodes.cache
to--index-type='dense_file_array,/tmp/osmium-nodes.cache'
:I also tried changing
--index-type=dense_file_array,/tmp/osmium-nodes.cache
to--index-type=dense_file_array,osmium-nodes.cache
:I also tried changing
--index-type=dense_file_array,/tmp/osmium-nodes.cache
to--index-type=sparse_file_array,/tmp/osmium-nodes.cache
:I am running as root and I have accesso to
/tmp
./tmp/osmium-nodes.cache
does not exist at this time.Without any
--index-type
it works fine for a small file, but I already know that on my setup I won't be able to handle a planet file, which I will need to use sooner or later: