]> granicus.if.org Git - postgis/commitdiff
#1843 document new geocode_setting set/get functions, make publically readable.
authorRegina Obe <lr@pcorp.us>
Thu, 31 May 2012 00:50:42 +0000 (00:50 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 31 May 2012 00:50:42 +0000 (00:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9830 b70326c6-7e19-0410-871a-916f4a2858ee

doc/extras_tigergeocoder.xml
extras/tiger_geocoder/tiger_2011/geocode_settings.sql

index cddfa41def2c1df6777f1fca2a6f3a166c5fe672..2f509ce392a83ae7d5e487b0d46ed52e8c9fc179 100644 (file)
@@ -426,6 +426,59 @@ Total query runtime: 245 ms.
          </refsection>
        </refentry>
        
+       <refentry id="Get_Geocode_Setting">
+         <refnamediv>
+               <refname>Get_Geocode_Setting</refname>
+
+               <refpurpose>Returns value of specific setting stored in tiger.geocode_settings table.</refpurpose>
+         </refnamediv>
+
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>text <function>Get_Geocode_Setting</function></funcdef>
+                       <paramdef><type>text </type> <parameter> setting_name</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+
+         <refsection>
+               <title>Description</title>
+
+               <para>Returns value of specific setting stored in tiger.geocode_settings table.  Settings allow you to toggle debugging of functions.  Later plans will be to control rating with settings. Current list of settings are as follows:</para>
+               <screen> name       | category |        short_desc                                                           
+----------------------------+----------+----------------------------------------------------------------------------------
+ debug_geocode_address      | debug    | outputs debug information in notice log such as queries 
+                                       |  when geocode_addresss is called if true
+ debug_geocode_intersection | debug    | outputs debug information in notice log such as queries 
+                                       |  when geocode_intersection is called if true
+ debug_normalize_address    | debug    | outputs debug information in notice log such as queries 
+                                       |  and intermediate expressions when normalize_address is called if true
+ debug_reverse_geocode      | debug    | if true, outputs debug information in notice log 
+                                         such as queries and intermediate expressions when reverse_geocode             
+               </screen>
+
+               <para>Availability: 2.1.0</para>
+               
+         </refsection>
+
+
+         <refsection>
+               <title>Example return debugging setting</title>
+               <programlisting>SELECT get_geocode_setting('debug_geocode_address) As result;
+result
+---------
+false
+               </programlisting>       
+         </refsection>
+
+         <!-- Optionally add a "See Also" section -->
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="Set_Geocode_Setting" />></para>
+         </refsection>
+       </refentry>
+       
        <refentry id="Get_Tract">
          <refnamediv>
                <refname>Get_Tract</refname>
@@ -1194,4 +1247,47 @@ SELECT * FROM
         <para><xref linkend="CreateTopology" />, <xref linkend="CreateTopoGeom" />, <xref linkend="TopologySummary" />, <xref linkend="ValidateTopology" /></para>
       </refsection>
    </refentry>
+   
+       <refentry id="Set_Geocode_Setting">
+         <refnamediv>
+               <refname>Set_Geocode_Setting</refname>
+
+               <refpurpose>Sets a setting that affects behavior of geocoder functions.</refpurpose>
+         </refnamediv>
+
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>text <function>Set_Geocode_Setting</function></funcdef>
+                       <paramdef><type>text </type> <parameter> setting_name</parameter></paramdef>
+                       <paramdef><type>text </type> <parameter> setting_value</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+
+         <refsection>
+               <title>Description</title>
+
+               <para>Sets value of specific setting stored in <varname>tiger.geocode_settings</varname> table.  Settings allow you to toggle debugging of functions.  Later plans will be to control rating with settings. Current list of settings are listed in <xref linkend="Get_Geocode_Setting" />.</para>
+
+               <para>Availability: 2.1.0</para>
+               
+         </refsection>
+
+
+         <refsection>
+               <title>Example return debugging setting</title>
+               <para>If you run <xref linkend="Geocode" /> when this function is true, the NOTICE log will output timing and queries.</para>
+               <programlisting>SELECT set_geocode_setting('debug_geocode_address', 'true') As result;
+result
+---------
+true</programlisting>  
+         </refsection>
+
+         <!-- Optionally add a "See Also" section -->
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="Get_Geocode_Setting" />></para>
+         </refsection>
+       </refentry>
   </sect1>
index 3d888f699797d99b5e946bffaaa17e88d5f09633..f13cd4125d37c7e2aff6eb3c0833ceaeae999e37 100644 (file)
@@ -22,6 +22,7 @@ BEGIN
        var_temp := tiger.SetSearchPathForInstall('tiger'); /** set setach path to have tiger in front **/
        IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_schema = 'tiger' AND table_name = 'geocode_settings')  THEN
                CREATE TABLE geocode_settings(name text primary key, setting text, unit text, category text, short_desc text);
+               GRANT SELECT ON geocode_settings TO public;
        END IF;
        --add missing settings
        INSERT INTO geocode_settings(name,setting,unit,category,short_desc)