NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum


I'm trying to create a Nominatim DB with data for the US and Europe. I looked around for a merged PBF but couldn't find one, so I created a merge myself using osmconvert. I tried two ways of doing this after the import failed with the first, just in case:

1. osmconvert us-latest.osm.pbf --out-o5m | osmconvert - europe-latest.osm.pbf -o=us-europe-merge.pbf

2. osmconvert us-latest.osm.pbf -o="us-latest.o5m" osmconvert europe-latest.osm.pbf -o="europe-latest.o5m" osmconvert us-latest.o5m europe-latest.o5m -o="us-europe-merge.o5m" osmconvert us-europe-merge.o5m -o="us-europe-merge.osm.pbf"

In both cases, I get the same error: PHP Notice: Undefined variable: aCMDResult in /app/src/lib/setup_functions.php on line 14 ERROR: osm-file "" not readable string(24) "osm-file "" not readable

The original .osm.pbf files are downloaded from Geofabrik. I should also note that I've successfully run the import with the same setup using the individual us-latest.osm.pbf file.

Is there something wrong with the merge? Should I create it some other way? Any ideas are welcome.

Thank you

asked 19 May '20, 23:58

Shai's gravatar image

accept rate: 0%

(The jQuery javascript library on sometimes doesn't load, it's infuriating. There are already github tickets open about this.)

When I look at it looks more like your file exists, but can't be read due to file permissions? Or maybe it's 0 byte size? The is_readable is standard PHP, similar to test -r in bash.

permanent link

answered 20 May '20, 14:45

mtmail's gravatar image

accept rate: 27%

That was it @mtmail! Permissions. The merge was created without read permissions for some reason. Thank you.

(20 May '20, 15:19) Shai

You can use Osmium to merge one or more OSM files more easily: osmium merge -o all.osm.pbf file1.osm.pbf file2.osm.pbf ...

The important thing to remember with any kind of merging like this is that you must have files that come from the exact same point in time. If you have one extract from today and another from yesterday, chances are you get different versions of the same object in the output which Nominatim (or most other programs) will not be able to cope with.

permanent link

answered 20 May '20, 07:58

Jochen%20Topf's gravatar image

Jochen Topf
accept rate: 31%

Jochen, I came across Osmium but had trouble installing it on the AWS machine I'm using, so I stuck with osmconvert. I'll try installing it again. As for merging files coming from the exact same point in time, is that even possible when using different extracts like this? Or should I try to use two extracts that are as close to being from the same time as possible? I'd expect it not to matter for regions as disjoint as the US and Europe though.

mtmail, thank you, I'll check out that script. From what I gather, it overall runs the same procedure I did manually, except for the creation of that sequence.state file. Could that be breaking the import?

Sorry by the way, I tried to comment on your individual comments but wasn't able to.

(20 May '20, 14:32) Shai

In the development branch of Nominatim documentation there's also an update script to deal with multiple countries and how to keep them updated.

permanent link

answered 20 May '20, 09:48

mtmail's gravatar image

accept rate: 27%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 19 May '20, 23:58

question was seen: 2,277 times

last updated: 22 May '20, 07:49

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum