Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Work-in-progress on upgrading to 2011 TIGER/Line files for US address…

… lookups
  • Loading branch information...
commit 5b8891cb667ccb1d6a912265557172bc737abbda 1 parent 982cc57
@petewarden authored
Showing with 28 additions and 3 deletions.
  1. +24 −2 docs/serversetup.txt
  2. +3 −0  dstk_config.rb
  3. +1 −1  street2coordinates.rb
View
26 docs/serversetup.txt
@@ -166,13 +166,14 @@ psql -U postgres -d reversegeo -f sql/buildukindexes.sql
// End of version 0.35
(To start from snapshot, run
-ec2-run-instances ami-f6e11d9f -t m1.large -z us-east-1d
+ec2-run-instances ami-f6e11d9f -t m1.large -z us-east-1d --block-device-mapping /dev/sda1=:100:false
)
+sudo resize2fs /dev/sda1
sudo aptitude update
sudo aptitude safe-upgrade -y
sudo aptitude full-upgrade -y
-sudo aptitude install -y ncftp php5-cli
+sudo aptitude install -y ncftp lftp php5-cli
cd ~/sources
mkdir blsdata
@@ -195,6 +196,27 @@ mv la.data.3.AllStatesS states
rm -rf la.data.4.RegionDivisionU
rm -rf la.data.5.RegionDivisionS
+# Build the latest Tiger/Line data for US address lookups
+cd ~/sources
+mkdir tigerdata
+cd ~/sources/tigerdata
+lftp ftp2.census.gov:/geo/tiger/TIGER2011/EDGES
+mirror --parallel=5 .
+cd ../FEATNAMES
+mirror --parallel=5 .
+cd ../ADDR
+mirror --parallel=5 .
+exit
+cd ..
+rm -rf geocoder
+git clone git://github.com/geocommons/geocoder.git
+cd geocommons
+make
+sudo make install
+cd build
+./tiger_import ../../geocoderdata/geocoder2011.db ../../tigerdata/
+
+
cd ~/sources/dstkdata
git pull origin master
View
3  dstk_config.rb
@@ -51,4 +51,7 @@ module DSTKConfig
# The home of the Boilerplate framework
BOILERPIPE_FOLDER = '../boilerpipe/boilerpipe-core/'
+ # The location of the TIGER/Line database used by the US address geocoder
+ GEOCODER_DB_FILE = '../geocoderdata/geocoder2011.db'
+
end
View
2  street2coordinates.rb
@@ -45,7 +45,7 @@ def s2c_debug_log(message)
def street2coordinates(addresses)
if !$geocoder_db
- $geocoder_db = Geocoder::US::Database.new('../geocoderdata/geocoder.db', {:debug => false})
+ $geocoder_db = Geocoder::US::Database.new(DSTKConfig::GEOCODER_DB_FILE, {:debug => false})
end
conn = PGconn.connect(DSTKConfig::HOST, DSTKConfig::PORT, '', '', DSTKConfig::REVERSE_GEO_DATABASE, DSTKConfig::USER, DSTKConfig::PASSWORD)
Please sign in to comment.
Something went wrong with that request. Please try again.