]> granicus.if.org Git - postgis/commitdiff
#876 ST_Azimuth doc patch
authorRegina Obe <lr@pcorp.us>
Tue, 2 Jul 2013 21:52:25 +0000 (21:52 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 2 Jul 2013 21:52:25 +0000 (21:52 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11617 b70326c6-7e19-0410-871a-916f4a2858ee

doc/html/image_src/st_azimuth01.wkt
doc/html/image_src/st_azimuth02.wkt
doc/reference_measure.xml

index f0db723beb8488d39c36792d2edf0244620b982f..82981e0b2d816deec2892f5502dbf9c8b55a86ad 100644 (file)
@@ -1,4 +1,5 @@
+Style2-thinline;LINESTRING(25 45,25 119.33)
 Style2;POINT(25 45)
 Style1;POINT(75 100)
-Style2-thinline;LINESTRING(25 45,99.3303 45)
-Style3;LINESTRING(99.33034 45,98.9724 52.28569,97.90206 59.50121,96.12963 66.57707,93.67218 73.44514,90.55337 80.03925,86.80325 86.29593,82.45792 92.15489,77.55924 97.55973,75 100)
+Style3;LINESTRING(25 119.33,32.29 118.97,39.50 117.90,46.58 116.13,53.45 113.67,60.047 110.55,66.31 106.8,72.17 102.45,75 100)
+Style3;LINESTRING(65 100, 75 100, 75 110)
index d8f1ac9d62f8dfa6c419a9decb76585b7f55f19b..27e7d105b943fdc0050c6284abf664f3d772505b 100644 (file)
@@ -1,4 +1,5 @@
-Style2;POINT(75 100)
 Style1;POINT(25 45)
-Style2-thinline;LINESTRING(75 100,149.33034 100)
-Style3;LINESTRING(149.33034 100,148.97241 107.28565,147.90209 114.50113,146.12969 121.57695,143.67226 128.44498,140.55349 135.03907,136.8034 141.29571,132.4581 147.15465,127.55946 152.55946,122.15464 157.4581,116.29569 161.80338,110.03905 165.55347,103.44496 168.67223,96.57693 171.12965,89.5011 172.90205,82.28562 173.97236,74.99997 174.33027,67.71433 173.97235,60.49885 172.90203,53.42302 171.12962,46.55499 168.6722,39.96091 165.55342,33.70427 161.80333,27.84533 157.45804,22.44051 152.55939,17.54187 147.15457,13.19659 141.29563,9.44651 135.03898,6.32774 128.44489,3.87032 121.57686,2.09792 114.50103,1.02761 107.28555,0.6697 99.99991,1.02762 92.71426,2.09794 85.49878,3.87035 78.42295,6.32777 71.55493,9.44655 64.96084,13.19664 58.7042,17.54193 52.84526,22.44058 47.44045,25 45)
+Style2-thinline;LINESTRING(75 100,75 174.33)
+Style2;POINT(75 100)
+Style3;LINESTRING(25 35, 25 45, 35 45)
+Style3;LINESTRING(75 174.33,82.2854990291525 173.971777251164,85.9062926213504 173.525039359331,93.0603749304618 172.101689101655,100.040495655901 169.983969974891,103.444230148372 168.670839179401,110.038067674461 165.551844738703,113.212285575926 163.753495024293,119.27710323315 159.700742080159,124.915477881626 155.0730481658,130.073108891238 149.914980503366,134.700325455916 144.276214104132,136.800890872717 141.293372185585,138.75256495065 138.211053370987,142.190802093925 131.777909117344,144.981924782519 125.038736039082,147.099052979159 118.058436056949,148.521797581971 110.904233275595,148.968228943332 107.28340187647,149.236456782679 103.645026578689,149.236148022508 96.3507260950078,148.520874274986 89.0915799256797,147.09752401731 81.9374976165682,146.12434062691 78.421443710561,143.666674095056 71.5536423986582,140.547679654358 64.9598048725693,136.797394926295 58.7034333922286,134.696576995814 55.7207693138797,132.451937202912 52.8447802350724,127.553155617554 47.4402674336697,122.148228114835 42.5419434007053,119.272049019787 40.2975470911136,113.206888286642 36.2453075963801,106.773744032999 32.8070704531054,100.034570954737 30.015947764511,96.5704072536981 28.8717052929568,89.4946327917332 27.0996343561797,82.2792367921245 26.0296436036982,74.9937074626849 25.6720376313751,71.3465610106627 25.7617245245224,64.0874148413345 26.4769982720444,56.9333325322231 27.9003485297198,53.4172786262158 28.8735319201204,46.5494773143131 31.3311984519738,43.2142750433263 32.8097608594851,36.7814218867588 36.2485426070818,30.7166042295346 40.3012955512158,25 45)
\ No newline at end of file
index 9d43aa81ad8b1225b1c89a388d2e3a42aa0e09b6..ac58c84c537d8f1afa0ee1eedb2610f303d97d2b 100644 (file)
@@ -726,7 +726,7 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,fal
                <refnamediv>
                  <refname>ST_Azimuth</refname>
 
-                 <refpurpose>Returns the angle in radians from the horizontal of the vector defined by pointA and pointB. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.</refpurpose>
+                 <refpurpose>Returns the north-based azimuth as the angle in radians measured clockwise from the vertical on pointA to pointB.</refpurpose>
                </refnamediv>
                <refsynopsisdiv>
                  <funcsynopsis>
@@ -745,9 +745,8 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,fal
                <refsection>
                        <title>Description</title>
 
-                       <para>Returns the azimuth of the segment defined by the given
-                       Point geometries, or NULL if the two points are coincident. Return
-                       value is in radians. Angle is computed clockwise from down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2 </para>
+                       <para>Returns the azimuth in radians of the segment defined by the given
+                       point-geometries, or NULL if the two points are coincident. The azimuth is north-based and is measured clockwise: North = 0; East = PI/2; South = PI; West = 3PI/2.</para>
 
                        <para>The Azimuth is mathematical concept defined as the angle, in this case measured in radian, between a reference plane
                                and a point. </para>
@@ -762,15 +761,15 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid,  ST_Area(the_geog,fal
                <title>Examples</title>
                <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;
+SELECT ST_Azimuth(ST_Point(25,45), ST_Point(75,100))/(2*pi())*360 as degA_B,
+       ST_Azimuth(ST_Point(75,100), ST_Point(25,45))/(2*pi())*360 As degB_A;
        
 -- 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;
+SELECT degrees( ST_Azimuth(ST_Point(25,45), ST_Point(75,100)) ) as degA_B,
+       degrees( ST_Azimuth(ST_Point(75,100), ST_Point(25,45)) ) As degB_A;
 
-      degaz       |     degazrev
+      dega_b       |     degb_a
 ------------------+------------------
  42.2736890060937 | 222.273689006094
 </programlisting>
@@ -783,8 +782,7 @@ SELECT degrees( ST_Azimuth(ST_Point(25,45), ST_Point(75,100)) ) as degAz,
                                          <imageobject>
                                                <imagedata fileref="images/st_azimuth01.png" />
                                          </imageobject>
-                                         <caption><para>degAz is path to travel (azimuth), horizontal line (which starts at the start point and ends where we want the end point to fall)
-                                             and points (start point: 25,45 is in green)</para></caption>
+                                         <caption><para>Green: the start Point(25,45) with its vertical. Yellow: degA_B as the path to travel (azimuth).</para></caption>
                                        </mediaobject>
                                  </informalfigure>
                                </para></entry>
@@ -793,8 +791,7 @@ SELECT degrees( ST_Azimuth(ST_Point(25,45), ST_Point(75,100)) ) as degAz,
                                          <imageobject>
                                                <imagedata fileref="images/st_azimuth02.png" />
                                          </imageobject>
-                                         <caption><para>degAzrev is azimuth curve shown, horizontal line (which starts at the start point and ends where we want the end point to fall)
-                                             and points (start point: 75,100 is in green)</para></caption>
+                                         <caption><para>Green: the start Point(75,100) with its vertical. Yellow: degB_A as the path to travel (azimuth).</para></caption>
                                        </mediaobject>
                                  </informalfigure>
                                </para></entry>