0

Hello,

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, 23:58

Shai's gravatar image

Shai
364
accept rate: 0%


3 Answers:
0

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

When I look at https://github.com/osm-search/Nominatim/blob/master/lib/setup_functions.php 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, 14:45

mtmail's gravatar image

mtmail
3.8k1059
accept rate: 30%

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

(20 May, 15:19) Shai
0

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, 07:58

Jochen%20Topf's gravatar image

Jochen Topf
4.6k54665
accept rate: 32%

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, 14:32) Shai
0

In the development branch of Nominatim documentation there's also an update script to deal with multiple countries and how to keep them updated. http://nominatim.org/release-docs/develop/admin/Advanced-Installations/

permanent link

answered 20 May, 09:48

mtmail's gravatar image

mtmail
3.8k1059
accept rate: 30%

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×591
×178
×51
×32

question asked: 19 May, 23:58

question was seen: 101 times

last updated: 22 May, 07:49

powered by OSQA