Skip to content

Commit

Permalink
Added TODO to download OPENADDR
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 19, 2023
1 parent 6e3011e commit 953d2a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions bin/download_databases
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,23 @@ cd ~/Downloads && /usr/bin/wget -N -c --no-check-certificate --quiet https://dat
cd ~/Downloads && /usr/bin/wget -N -c --no-check-certificate --quiet https://data.openaddresses.io/openaddr-collected-global-sa.zip
cd $OPENADDR_HOME && rm -rf ?? *.txt summary br mx fr it za es pl be jp kr pt fi de by ch dk ru cz nz tw cl at kz co no uy si xk */*.vrt */*/*.vrt && unzip -o ~/Downloads/openaddr-collected-global-sa.zip && unzip -o ~/Downloads/openaddr-collected-global.zip

# wof-update is in the NJH-Snippets package on GitHub
mkdir -p $WHOSONFIRST_HOME
# cd $WHOSONFIRST_HOME && ./wof-sqlite-download
cd $WHOSONFIRST_HOME && ./wof-update
# wof-update etc. are in the NJH-Snippets package on GitHub
if [ ! -d $WHOSONFIRST_HOME ]; then
mkdir -p $WHOSONFIRST_HOME
# cd $WHOSONFIRST_HOME && wof-sqlite-download
cd $WHOSONFIRST_HOME && wof-clone
else
cd $WHOSONFIRST_HOME && wof-update
fi

mkdir -p $OPENADDR_HOME

if [ -r $OPENADDR_HOME/openaddresses.sql ]; then
mv $OPENADDR_HOME/openaddresses.sql $OPENADDR_HOME/openaddresses.sql.keep
chmod 444 $OPENADDR_HOME/openaddresses.sql.keep
else
echo TODO: update the script to download the data from http://results.openaddresses.io
exit
fi

cd $DR5HN_HOME && git pull
Expand Down
2 changes: 1 addition & 1 deletion lib/Geo/Coder/Free.pm
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Before running "make", but after running "perl Makefile.PL", run these instructi
Optionally set the environment variable OPENADDR_HOME to point to an empty directory and download the data from L<http://results.openaddresses.io> into that directory; and
optionally set the environment variable WHOSONFIRST_HOME to point to an empty directory and download the data using L<https://github.com/nigelhorne/NJH-Snippets/blob/master/bin/wof-sqlite-clone>.
The script bin/download_databases (see below) will do that for you.
The script bin/download_databases (see below) will do those for you.
You do not need to download the MaxMind data, that will be downloaded automatically.
You will need to create the database used by Geo::Coder::Free.
Expand Down

0 comments on commit 953d2a1

Please sign in to comment.