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
# 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;
$(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)