]> gitweb.michael.orlitzky.com - dead/census-tools.git/blobdiff - makefile
Added the is_negative_float() method to the StringUtils module.
[dead/census-tools.git] / makefile
index 2c20ffc4f90989ffa09bfa4b0172e54e900ff17e..693b1c0b6d7af025f24ff0024d6d74e696e776b0 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,7 +1,7 @@
-DB_NAME='census2000'
+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_SRID='4269'
 
 # Necessary to run test/data without prerequisites.
 #
@@ -44,8 +44,9 @@ data:
 # support to the database.
 #
 # At that point, we import the two PostGIS files, lwpostgis.sql and
-# spatial_ref_sys.sql. These are magic as far as I'm concerned, but
-# PostGIS requires them.
+# spatial_ref_sys.sql. The lwpostgis.sql file contains the geometry
+# functions, while spatial_ref_sys.sql contains a table of SRIDs, and
+# their associated properties. PostGIS requires both.
 #
 # Then, we import the Tiger data using shp2pgsql. The shapefiles
 # should exist, since this task depends on the "data" task, which
@@ -68,8 +69,11 @@ db: data
              -U $(DB_USER) \
              -f /usr/share/postgresql/contrib/spatial_ref_sys.sql
 
-       shp2pgsql -I data/census-2000-block/maryland/tl_2008_24_tabblock00.shp tiger \
-                   | psql -U $(DB_USER) -d $(DB_NAME)
+       shp2pgsql -I                                                        \
+                 -s $(TIGER_SRID)                                          \
+                 data/census-2000-block/maryland/tl_2008_24_tabblock00.shp \
+                 tiger                                                     \
+                  | psql -U $(DB_USER) -d $(DB_NAME)
 
        psql -d $(DB_NAME) \
              -U $(DB_USER) \