]> granicus.if.org Git - postgis/commitdiff
update to include ST_Azimuth for geography -- still need example. Also provide examp...
authorRegina Obe <lr@pcorp.us>
Sun, 1 Jan 2012 15:41:10 +0000 (15:41 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 1 Jan 2012 15:41:10 +0000 (15:41 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8641 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_measure.xml

index 4a70e280bf7e64772eb3bcddcd8cfc921ac24774..7951afdab2146bbdcaa69f2fd0613cc47cba9c8c 100644 (file)
@@ -733,6 +733,11 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,fal
                          <paramdef><type>geometry </type><parameter>pointA</parameter></paramdef>
                          <paramdef><type>geometry </type><parameter>pointB</parameter></paramdef>
                        </funcprototype>
+                       <funcprototype>
+                         <funcdef>float <function>ST_Azimuth</function></funcdef>
+                         <paramdef><type>geography </type><parameter>pointA</parameter></paramdef>
+                         <paramdef><type>geography </type><parameter>pointB</parameter></paramdef>
+                       </funcprototype>
                  </funcsynopsis>
                </refsynopsisdiv>
                <refsection>
@@ -746,16 +751,22 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,fal
                                and a point. </para>
 
                        <para>Availability: 1.1.0</para>
+                       <para>Enhanced: 2.0.0 support for geography was introduced.</para>
                        <para>Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See
                                 upgis_lineshift <ulink url="http://trac.osgeo.org/postgis/wiki/UsersWikiplpgsqlfunctions">Plpgsqlfunctions PostGIS wiki section</ulink> for example of this.</para>
                </refsection>
 
                <refsection>
                <title>Examples</title>
-               <para>Azimuth in degrees </para>
+               <para>Geometry Azimuth in degrees </para>
 <programlisting>
 SELECT ST_Azimuth(ST_Point(25,45), ST_Point(75,100))/(2*pi())*360 as degAz,
        ST_Azimuth(ST_Point(75,100), ST_Point(25,45))/(2*pi())*360 As degAzrev;
+       
+-- NOTE easier to remember syntax using PostgreSQL built-in degrees function --
+-- Both yield same answer --
+SELECT degrees( ST_Azimuth(ST_Point(25,45), ST_Point(75,100)) ) as degAz,
+       degrees( ST_Azimuth(ST_Point(75,100), ST_Point(25,45)) ) As degAzrev;
 
       degaz       |     degazrev
 ------------------+------------------