This data is available as a binary download:
cd $NOMINATIM_SOURCE_DIR/data
- wget http://www.nominatim.org/data/wikipedia_article.sql.bin
- wget http://www.nominatim.org/data/wikipedia_redirect.sql.bin
+ wget https://www.nominatim.org/data/wikipedia_article.sql.bin
+ wget https://www.nominatim.org/data/wikipedia_redirect.sql.bin
Combined the 2 files are around 1.5GB and add around 30GB to the install
size of nominatim. They also increase the install time by an hour or so.
+*NOTE:* you'll need to download the Wikipedia rankings before performing
+the initial import of the data if you want the rankings applied to the
+loaded data.
+
### UK postcodes
Nominatim can use postcodes from an external source to improve searches that involve a UK postcode. This data can be optionally downloaded:
cd $NOMINATIM_SOURCE_DIR/data
- wget http://www.nominatim.org/data/gb_postcode_data.sql.gz
+ wget https://www.nominatim.org/data/gb_postcode_data.sql.gz
Initial import of the data
--------------------------
**Important:** first try the import with a small excerpt, for example from
-[Geofabrik](http://download.geofabrik.de).
+[Geofabrik](https://download.geofabrik.de).
Download the data to import and load the data with the following command:
avoid swapping, never give more than 2/3 of RAM to osm2pgsql.
+Computing word frequency for search terms can improve the performance of
+forward geocoding in particular under high load as it helps Postgres' query
+planner to make the right decisions. To recompute word counts run:
+
+ ./utils/update.php --recompute-word-counts
+
+This will take a couple of hours for a full planet installation. You can
+also defer that step to a later point in time when you realise that
+performance becomes an issue. Just make sure that updates are stopped before
+running this function.
+
Loading additional datasets
---------------------------
6. Apply the new settings:
- ./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
+ ./utils/setup.php --create-functions --enable-diff-updates --create-partition-functions
Be warned that the import can take a very long time, especially if you
import all of the US. The entire US adds about 10GB to your database.
Installing the newest version of Pyosmium
-----------------------------------------
-It is recommended to install Pyosmium via pip:
+It is recommended to install Pyosmium via pip. Run (as the same user who
+will later run the updates):
pip install --user osmium
diffs for Ireland from geofabrik add the following:
// base URL of the replication service
- @define('CONST_Replication_Url', 'http://download.geofabrik.de/europe/ireland-and-northern-ireland-updates');
+ @define('CONST_Replication_Url', 'https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates');
// How often upstream publishes diffs
@define('CONST_Replication_Update_Interval', '86400');
// How long to sleep if no update found yet
To set up the update process now run the following command:
- ./utils/update --init-updates
+ ./utils/update.php --init-updates
It outputs the date where updates will start. Recheck that this date is
what you expect.
./utils/update.php --import-osmosis-all
+(Note that even though the old name "import-osmosis-all" has been kept for compatibility reasons, Osmosis is not required to run this - it uses pyosmium behind the scenes.)
+
If you have imported multiple country extracts and want to keep them
up-to-date, have a look at the script in
[issue #60](https://github.com/openstreetmap/Nominatim/issues/60).