]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Updated the makefile to use the 2009 TIGER/Line shapefiles.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 3 Oct 2009 04:28:31 +0000 (00:28 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 3 Oct 2009 04:28:31 +0000 (00:28 -0400)
makefile

index 5384ded55875ebdf6de7e85eb0a656d0191aba41..36543d4e156bb7dd5a6ea8c60e948d613dd29739 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
 DB_NAME='census'
 DB_USER='postgres'
-TIGER_DATA_URL='http://www2.census.gov/cgi-bin/shapefiles/multi-file-download?files=24_MARYLAND%2Ftl_2008_24_tabblock00.zip'
+TIGER_DATA_URL='http://www2.census.gov/geo/tiger/TIGER2009/24_MARYLAND/tl_2009_24_tabblock00.zip'
 TIGER_SRID='4269'
 
 # Starting with PostGIS 1.4.0, these paths are calculated at install
@@ -35,14 +35,11 @@ clean:
 # data, so the filenames are hard-coded. Easy enough to change.
 #
 data:
-       mkdir -p data/census-2000-block/maryland/
-       if [ ! -f data/census-2000-block/maryland/tl_2008_24_tabblock00.shp ]; then \
-               wget -O tiger.zip $(TIGER_DATA_URL); \
-               unzip tiger.zip; \
-               rm tiger.zip; \
-               unzip srv/ftp/geo/tiger/TIGER2008/24_MARYLAND/tl_2008_24_tabblock00.zip \
-                      -d ./data/census-2000-block/maryland/; \
-               rm -rf srv; \
+       mkdir -p data/census2000/maryland/block
+       if [ ! -f data/census2000/maryland/block/tl_2009_24_tabblock00.shp ]; then \
+               wget -O tmp.zip $(TIGER_DATA_URL); \
+               unzip tmp.zip -d ./data/census2000/maryland/block; \
+               rm tmp.zip; \
        fi;
 
 
@@ -79,7 +76,7 @@ db: data
 
        $(PG_BINDIR)/shp2pgsql -I                                           \
                  -s $(TIGER_SRID)                                          \
-                 data/census-2000-block/maryland/tl_2008_24_tabblock00.shp \
+                 data/census2000/maryland/block/tl_2009_24_tabblock00.shp  \
                  tiger                                                     \
                   | psql -U $(DB_USER) -d $(DB_NAME)