[postgis-devel] problems with tiger_2010 loading
Josh Kupershmidt
schmiddy at gmail.com
Sun Dec 18 16:29:51 PST 2011
Hi all,
I encountered several problems while trying to follow the steps in
./extras/tiger_geocoder/tiger_2010/README from a recent SVN checkout.
First, step 2.) tells you to "cd into the tiger_geocoder_2010 folder".
There is no such directory; presumably, it is referring to
./extras/tiger_geocoder/tiger_2010/
Next, the script generated by a call to:
SELECT loader_generate_script(ARRAY['DC','RI'], 'sh');
has some problems. It is looking for .zip files like so:
cd $STATEDIR
for z in *.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done
for z in */*.zip; do $UNZIPTOOL -o -d $TMPDIR $z; done
with $STATEDIR set to
"/gisdata/www2.census.gov/geo/pvs/tiger2010st/11_District_of_Columbia".
However, I don't have .zip files directly in that directory; I have
directories "11" and "11001", since that is how:
http://www2.census.gov/geo/pvs/tiger2010st/11_District_of_Columbia/
is laid out.
Also, the command:
${PSQL} -c "DROP SCHEMA tiger_staging CASCADE;"
will fail the first time this script is run; this is annoying,
especially if following the instructions to place "set -e -u" at the
top of the script, as the README recommends. I think DROP SCHEMA IF
EXISTS would be better here.
Finally, after working around the above problems, I get a complaint
about "ERROR: AddGeometryColumn() - invalid SRID" with the first call
to shp2pgsql in the script. I haven't fixed enough things to check
this, but it seems to me like all the calls to ${PSQL}, such as
${PSQL} -c "DROP SCHEMA tiger_staging CASCADE;"
should really be honoring the $PGDATABASE variable at the top of the script.
Josh
More information about the postgis-devel
mailing list