From: Regina Obe Date: Tue, 22 May 2012 15:26:39 +0000 (+0000) Subject: detail how to upgrade from tiger_2010 to tiger_2011 data X-Git-Tag: 2.1.0beta2~1000 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a36ff5debdffbb748ab8249777cca25338e04795;p=postgis detail how to upgrade from tiger_2010 to tiger_2011 data git-svn-id: http://svn.osgeo.org/postgis/trunk@9783 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/installation.xml b/doc/installation.xml index e5a55e0a5..17f9960fc 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -992,7 +992,7 @@ Failed: 0 - cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2010 + cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2011 Edit the tiger_loader.sql to the paths of your executables server etc. @@ -1011,7 +1011,7 @@ pretty_address Upgrading your Tiger Geocoder Install - If you have Tiger Geocoder packaged with 2.0 already installed, you can upgrade the functions at any time even from an interim tar ball if there are fixes you badly need. + If you have Tiger Geocoder packaged with 2.0+ already installed, you can upgrade the functions at any time even from an interim tar ball if there are fixes you badly need. @@ -1023,18 +1023,27 @@ pretty_address - cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2010 + cd postgis-&last_release_version;/extras/tiger_geocoder/tiger_2011 Locate the upgrade_geocoder.bat script If you are on windows or the upgrade_geocoder.sh if you are on Linux/Unix/Mac OSX. Edit the file to have your postgis database credientials and run then corresponding script from the commandline. - + Next drop all nation tables and load up the new ones. Generate a drop script with this SQL statement as detailed in + SELECT drop_nation_tables_generate_script(); + Run the generated drop SQL statements. + Generate a nation load script with this SELECT statement as detailed in + For windows + SELECT loader_generate_nation_script('windows'); + For unix/linux + SELECT loader_generate_nation_script('sh'); + Refer to for instructions on how to run the generate script. This only needs to be done once. + You can have a mix of 2010/2011 state tables and can upgrade each state separately. Before you upgrade a state to 2011, you first need to drop the 2010 tables for that state using . Loading Tiger Data - The instructions for loading data are available in a more detailed form in the extras/tiger_geocoder/tiger_2010/README. This just includes the general steps. - The load process downloads data from the census website for the respective states requested, extracts the files, and then loads each state into its own separate + The instructions for loading data are available in a more detailed form in the extras/tiger_geocoder/tiger_2011/README. This just includes the general steps. + The load process downloads data from the census website for the respective nation files, states requested, extracts the files, and then loads each state into its own separate set of state tables. Each state table inherits from the tables defined in tiger schema so that its sufficient to just query those tables to access all the data and drop a set of state tables at any time using the if you need to reload a state or just don't need a state anymore. In order to be able to load data you'll need the following tools: @@ -1047,6 +1056,8 @@ pretty_address If you are on windows, you can get pre-compiled binaries from http://gnuwin32.sourceforge.net/packages/wget.htm + If you are upgrading from tiger_2010, you'll need to first generate and run . Before you load any state data, you need to load the nation wide data which you do with . Which will + generate a loader script for you. To load data refer to to generate a data load script for your platform for the states you desire. Note that you can install these piecemeal. You don't have to load all the states you want all at once. You can load them as you need them.