Skip to content

Commit 60a9754

Browse files
committed
adapt update script for nominatim CLI tool
1 parent 42a5fd7 commit 60a9754

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

continuously_update_from_nominatim.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
11
#!/bin/bash -e
22

3+
# For Nominatim < 3.7 set this to the Nominatim build directory.
4+
# For newer versions, this must be the project directory of your import.
5+
NOMINATIM_DIR=
6+
37
while true
48
do
59
starttime=`date +%s`
610

11+
# First consume updates in the Nominatim database.
12+
# The important part here is to leave out the indexing step. This
13+
# will be handled by Photon.
14+
715
cd $NOMINATIM_DIR
8-
./utils/update.php --no-npi --import-osmosis --no-index
16+
# For Nominatim versions < 3.7 use the following:
17+
# ./utils/update.php --import-osmosis --no-index
18+
nominatim replication --once --no-index
919

20+
# Now tell Photon to finish the updates and copy the new data into its
21+
# own database.
1022
curl http://localhost:2322/nominatim-update
1123

12-
# sleep a bit if updates take less than a minute
24+
# Sleep a bit if updates take less than a minute.
25+
# If you consume hourly or daily diffs adapt the period accordingly.
1326
endtime=`date +%s`
1427
elapsed=$((endtime - starttime))
1528
if [[ $elapsed -lt 60 ]]
@@ -18,4 +31,4 @@ do
1831
echo "Sleeping for ${sleepy}s..."
1932
sleep $sleepy
2033
fi
21-
done
34+
done

0 commit comments

Comments
 (0)