From: Regina Obe Date: Sat, 18 Feb 2017 17:34:29 +0000 (+0000) Subject: Clarify that nation script must be run first before any states loaded X-Git-Tag: 2.4.0alpha~169 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d1c2012e87bf82ee6050e6894af1d349cca5c3e;p=postgis Clarify that nation script must be run first before any states loaded references #3699 git-svn-id: http://svn.osgeo.org/postgis/trunk@15314 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/installation.xml b/doc/installation.xml index 8b8c812e0..9758d8c6c 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -1579,14 +1579,36 @@ SELECT 'debbie', declare_sect, pgbin, wget, unzip_command, psql, path_sep, where the tiger files will be downloaded to and processed. If you are not happy with having the folder on the root of the server, or simply want to change to a different folder for staging, then edit the field staging_fold in the tiger.loader_variables table. Create a folder called temp in the gisdata folder or whereever you designated the staging_fold to be. This will be the folder where the loader extracts the downloaded tiger data. - Then run the and SQL functions make sure to use the name of your custom profile and copy the scripts to a .sh or .bat file. So for example to do the nation load and one state using our new profile, you can do this using psql: + Then run the SQL function make sure to use the name of your custom profile and copy the script to a .sh or .bat file. So for example to build the nation load: psql -c "SELECT Loader_Generate_Nation_Script('debbie')" -d geocoder -tA > /gisdata/nation_script_load.sh - psql -c "SELECT Loader_Generate_Script(ARRAY['MA'], 'debbie')" -d geocoder -tA > /gisdata/ma_load.sh + + Run the generated nation load commandline scripts. + cd /gisdata +sh nation_script_load.sh + + + After you are done running the nation script, you should have three tables in your tiger_data schema and they should be filled with data. Confirm you do by doing the following queries from psql or pgAdmin + SELECT count(*) FROM tiger_data.county_all; + count +------- + 3233 +(1 row) + SELECT count(*) FROM tiger_data.state_all; + + count +------- + 56 +(1 row) + + + + For each state you want to load data for, generate a state script . DO NOT Generate the state script until you have already loaded the nation data, because the state script utilizes county list loaded by nation script. + + psql -c "SELECT Loader_Generate_Script(ARRAY['MA'], 'debbie')" -d geocoder -tA > /gisdata/ma_load.sh Run the generated commandline scripts. cd /gisdata -sh nation_script_load.sh sh ma_load.sh After you are done loading all data or at a stopping point, it's a good idea to analyze all the tiger tables to update the stats (include inherited stats)