]> granicus.if.org Git - postgis/commitdiff
add extension model instructions for tiger geocoder install. add xml entity for...
authorRegina Obe <lr@pcorp.us>
Wed, 16 Jan 2013 07:13:07 +0000 (07:13 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 16 Jan 2013 07:13:07 +0000 (07:13 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10975 b70326c6-7e19-0410-871a-916f4a2858ee

doc/extras_tigergeocoder.xml
doc/installation.xml
doc/postgis.xml

index 7f9e5a53c438fb65c81b91e25da85726d9b40ae7..45acb74c81f8f54f29da2311d883ccb86ecf337a 100644 (file)
@@ -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 <xref linkend="upgrade_tiger_geocoder" />
                          </para></note>
                        </para>
+                       <note><para>New in PostGIS 2.1.0 release is ability to install tiger geocoder with PostgreSQL extension model if you are running PostgreSQL 9.1+.</para>
+                               <para>To do so: 
+<programlisting>CREATE EXTENSION fuzzystrmatch;
+CREATE EXTENSION postgis_tiger_geocoder;</programlisting>
+</para></note>
                        <para>Design:</para>
                        <para>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.</para>
index 50fb520ec153a8ae7fd9e10541b72c9f11bb54fa..f3364f5e5f8daee095fd096ed5991387bd7ca6d1 100644 (file)
@@ -208,12 +208,12 @@ in the docs folder
 
        <para>
          Retrieve the PostGIS source archive from the downloads website
-         <ulink url="http://www.postgis.org/download/postgis-&last_release_version;.tar.gz">
-               http://www.postgis.org/download/postgis-&last_release_version;.tar.gz
+         <ulink url="&postgis_download_url;">
+               &postgis_download_url;
          </ulink>
        </para>
 
-       <programlisting>wget http://www.postgis.org/download/postgis-&last_release_version;.tar.gz
+       <programlisting>wget &postgis_download_url;
 tar -xvzf postgis-&last_release_version;.tar.gz</programlisting>
 
        <para>
@@ -989,14 +989,57 @@ Failed: 0
        <para>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 <filename>extras/tiger_geocoder/tiger_2011/README</filename> </para>
        <para>If you are on Windows and you don't have tar installed, you can use <ulink url="http://www.7-zip.org/">http://www.7-zip.org/</ulink> to unzip the PostGIS tarball.</para>
+       <sect2 id="install_tiger_geocoder_extension">
+               <title>Tiger Geocoder Enabling your PostGIS database: Using Extension</title>   
+               <para>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:</para>
+               <orderedlist>
+                       <listitem><para>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.</para></listitem>
+                       <listitem><para>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 <varname>fuzzystrmatch</varname> extension already installed, you don't need to do the second step either.
+                       <programlisting>CREATE EXTENSION postgis;               
+       CREATE EXTENSION fuzzystrmatch;
+       CREATE EXTENSION postgis_tiger_geocoder;</programlisting></para></listitem>
+                       <listitem><para>To confirm your install is working correctly, run this sql in your database:</para>
+                               <programlisting>SELECT na.address, na.streetname,na.streettypeabbrev, na.zip
+       FROM normalize_address('1 Devonshire Place, Boston, MA 02109') AS na;</programlisting>
+                               <para>Which should output</para>
+                               <para><screen> address | streetname | streettypeabbrev |  zip
+       ---------+------------+------------------+-------
+                  1 | Devonshire | Pl               | 02109</screen></para>
+                       </listitem>
+                       <listitem><para>Create a new profile in <varname>tiger.loader_platform</varname> with the paths of your executables and server. </para>  
+                               <para>So for example to create a profile called debbie that follows <code>sh</code> convention. I would do:</para>
+                               <programlisting>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';</programlisting>
+                               <para>And then edit the paths in the <emphasis>declare_sect</emphasis> to those that fit Debbie's pg path locations.</para>
+                       
+                               <para>If you don't edit this  <varname>loader_platform</varname> table, it will just contain common case locations of items and you'll have to edit the generated script after the script is generated.</para></listitem>
+                       <listitem><para>Then run the  <xref linkend="Loader_Generate_Nation_Script" /> and <xref linkend="Loader_Generate_Script" />  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:</para>
+                                       </para>
+                                       <programlisting>SELECT Loader_Generate_Nation_Script('debbie')</programlisting>
+                       </listitem>
+               </orderedlist>
+               <sect3 id="convert_tiger_geocoder_extension"><title>Converting a Tiger Geocoder Regular Install to Extension Model</title>
+                       <para>If you installed the tiger geocoder without using the extension model, you can convert to the extension model as follows:</para>
+                       <orderedlist>
+                               <listitem><para>Follow instructions in <xref linkend="upgrade_tiger_geocoder" /> for the non-extension model upgrade.</para></listitem>
+                               <listitem><para>Connect to your data with psql or pgAdmin and run the following command:</para>
+                                       <programlisting>CREATE EXTENSION postgis_tiger_geocoder FROM unpackaged;</programlisting>
+                               </listitem>
+                       </orderedlist>
+               </sect3>
+       </sect2>
        <sect2 id="install_tiger_geocoder">
-               <title>Tiger Geocoder Enabling your PostGIS database</title>
+               <title>Tiger Geocoder Enabling your PostGIS database: Not Using Extensions</title>
                <para>
                  First install PostGIS using the prior instructions.
                </para>
        
                <para>
-                 If you don't have an extras folder, download <ulink url="http://www.postgis.org/download/postgis-&last_release_version;.tar.gz">http://www.postgis.org/download/postgis-&last_release_version;.tar.gz</ulink>
+                 If you don't have an extras folder, download <ulink url="&postgis_download_url;">&postgis_download_url;</ulink>
                </para>
        
                <para>
@@ -1050,11 +1093,11 @@ pretty_address
        <sect2 id="upgrade_tiger_geocoder">
                <title>Upgrading your Tiger Geocoder Install</title>
                <para>
-                 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. 
                </para>
        
                <para>
-                 If you don't have an extras folder, download <ulink url="http://www.postgis.org/download/postgis-&last_release_version;.tar.gz">http://www.postgis.org/download/postgis-&last_release_version;.tar.gz</ulink>
+                 If you don't have an extras folder, download <ulink url="&postgis_download_url;">&postgis_download_url;</ulink>
                </para>
        
                <para>
index 4ce38c8e3dc930cb796505083988f8d98e800d37..83b5a713a582735e96a380ecde169ca9eca66278 100644 (file)
@@ -5,9 +5,12 @@
 <!-- This value is automatically generated by the Makefile -->
 <!ENTITY last_release_version "@@LAST_RELEASE_VERSION@@">
 
+<!-- ONCE Tagged, this need to change to http://download.osgeo.org/postgis/source/postgis-@@LAST_RELEASE_VERSION@@.tar.gz -->
+<!ENTITY postgis_download_url "http://postgis.net/stuff/postgis-@@LAST_RELEASE_VERSION@@.tar.gz">
+
 <!-- Change these values to update the version numbers referenced within the documentation -->
-<!ENTITY last_proj_release_version "4.6.1">
-<!ENTITY last_geos_release_version "3.3.4">
+<!ENTITY last_proj_release_version "4.8.0">
+<!ENTITY last_geos_release_version "3.4.0">
 <!ENTITY min_postgres_version "9.0">
 
 <!ENTITY introduction SYSTEM "introduction.xml">