This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Choose regions during the import of a country into nominatim database.

0

Hi!

Is there any possibility to have an overview during the import of an osm file (./utils/update.php --import-file germany.osm)? Which regions/nodes/relations are imported?

What I want to do: to import only some regions from germany, which are near the border with the Netherlands. But I do not what to import every regions one after another (like bavaria.osm), because I know that are available to download like this. I have to use the hole germany.osm and from this file, during the import, to choose which regions I need and which not.

Thank you!

asked 06 Sep '12, 14:03

RoxanaO's gravatar image

RoxanaO
31337
accept rate: 0%


One Answer:

1

I found the solution. Using the JOSM program, I selected the needed bounding box (which included the wanted regions), got the minlon, minlat, maxlon, maxlat. With this in update.php I added to the command from line 226: --bbox minlon,minlat,maxlon,maxlat

Ex: $sCMD = CONST_Osm2pgsql_Binary.' --bbox 5.5480957,50.6738352,9.140625,53.8265967 -klas -C 2000 -O gazetteer -d '.$aDSNInfo['database'].' '.$sTemporaryFile;

And then use the command: ./utils/update.php --import-file /media/9804A73C04A71BEE/OSMnominatim/pbf/germany.osm

answered 07 Sep '12, 10:03

RoxanaO's gravatar image

RoxanaO
31337
accept rate: 0%

edited 07 Sep '12, 10:03

Source code available on GitHub .