From cd62850aae1cead2b444e9123c84b813ccf8975c Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Wed, 16 Jan 2013 07:13:07 +0000 Subject: [PATCH] add extension model instructions for tiger geocoder install. add xml entity for download link git-svn-id: http://svn.osgeo.org/postgis/trunk@10975 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/extras_tigergeocoder.xml | 5 ++++ doc/installation.xml | 57 +++++++++++++++++++++++++++++++----- doc/postgis.xml | 7 +++-- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/doc/extras_tigergeocoder.xml b/doc/extras_tigergeocoder.xml index 7f9e5a53c..45acb74c8 100644 --- a/doc/extras_tigergeocoder.xml +++ b/doc/extras_tigergeocoder.xml @@ -20,6 +20,11 @@ you can upgrade the scripts using the accompanying upgrade_geocoder.bat until release. If you have data from tiger_2010 and want replace with tiger_2012 refer to + New in PostGIS 2.1.0 release is ability to install tiger geocoder with PostgreSQL extension model if you are running PostgreSQL 9.1+. + To do so: +CREATE EXTENSION fuzzystrmatch; +CREATE EXTENSION postgis_tiger_geocoder; + Design: The goal of this project is to build a fully functional geocoder that can process an arbitrary United States address string and using normalized TIGER census data, produce a point geometry and rating reflecting the location of the given address and likeliness of the location. The higher the rating number the worse the result. diff --git a/doc/installation.xml b/doc/installation.xml index 50fb520ec..f3364f5e5 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -208,12 +208,12 @@ in the docs folder Retrieve the PostGIS source archive from the downloads website - - http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + + &postgis_download_url; - wget http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + wget &postgis_download_url; tar -xvzf postgis-&last_release_version;.tar.gz @@ -989,14 +989,57 @@ Failed: 0 The Tiger geocoder does not get installed / upgraded with the core PostGIS scripts because it is only of regional use. In fact nothing located in the extras folder is installed by default with the regular PostGIS install / upgrade. Extras like Tiger geocoder may also not be packaged in your PostGIS distribution, but will always be available in the postgis-&last_release_version;.tar.gz file. The instructions provided here are also available in the extras/tiger_geocoder/tiger_2011/README If you are on Windows and you don't have tar installed, you can use http://www.7-zip.org/ to unzip the PostGIS tarball. + + Tiger Geocoder Enabling your PostGIS database: Using Extension + If you are using PostgreSQL 9.1+ and PostGIS 2.1.0, you can take advantage of the new extension model for installing tiger geocoder. To do so: + + First get binaries for PostGIS 2.1.0 or compile and install as usual. This should install the necessary extension files as well for tiger geocoder. + Connect to your database via psql or pgAdmin or some other tool and run the following SQL commands. Note that if you are installing in a database that already has postgis, you don't need to do the first step. If you have fuzzystrmatch extension already installed, you don't need to do the second step either. + CREATE EXTENSION postgis; + CREATE EXTENSION fuzzystrmatch; + CREATE EXTENSION postgis_tiger_geocoder; + To confirm your install is working correctly, run this sql in your database: + SELECT na.address, na.streetname,na.streettypeabbrev, na.zip + FROM normalize_address('1 Devonshire Place, Boston, MA 02109') AS na; + Which should output + address | streetname | streettypeabbrev | zip + ---------+------------+------------------+------- + 1 | Devonshire | Pl | 02109 + + Create a new profile in tiger.loader_platform with the paths of your executables and server. + So for example to create a profile called debbie that follows sh convention. I would do: + INSERT INTO tiger.loader_platform(os, declare_sect, pgbin, wget, unzip_command, psql, path_sep, + loader, environ_set_command, county_process_command) + SELECT 'debbie', declare_sect, pgbin, wget, unzip_command, psql, path_sep, + loader, environ_set_command, county_process_command + FROM tiger.loader_platform + WHERE os = 'sh'; + And then edit the paths in the declare_sect to those that fit Debbie's pg path locations. + + If you don't edit this loader_platform table, it will just contain common case locations of items and you'll have to edit the generated script after the script is generated. + Then run the and SQL functions make sure to use the name of your custom profile. So for example to do the nation load using our new profile we would: + + SELECT Loader_Generate_Nation_Script('debbie') + + + Converting a Tiger Geocoder Regular Install to Extension Model + If you installed the tiger geocoder without using the extension model, you can convert to the extension model as follows: + + Follow instructions in for the non-extension model upgrade. + Connect to your data with psql or pgAdmin and run the following command: + CREATE EXTENSION postgis_tiger_geocoder FROM unpackaged; + + + + - Tiger Geocoder Enabling your PostGIS database + Tiger Geocoder Enabling your PostGIS database: Not Using Extensions First install PostGIS using the prior instructions. - If you don't have an extras folder, download http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + If you don't have an extras folder, download &postgis_download_url; @@ -1050,11 +1093,11 @@ 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. This will only work for Tiger geocoder not installed with extensions. - If you don't have an extras folder, download http://www.postgis.org/download/postgis-&last_release_version;.tar.gz + If you don't have an extras folder, download &postgis_download_url; diff --git a/doc/postgis.xml b/doc/postgis.xml index 4ce38c8e3..83b5a713a 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -5,9 +5,12 @@ + + + - - + + -- 2.50.1