From: Regina Obe Date: Sun, 1 Jan 2012 15:41:10 +0000 (+0000) Subject: update to include ST_Azimuth for geography -- still need example. Also provide examp... X-Git-Tag: 2.0.0alpha1~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9406de846841ae8b62a322810e937c3f062f99ca;p=postgis update to include ST_Azimuth for geography -- still need example. Also provide example for using degrees git-svn-id: http://svn.osgeo.org/postgis/trunk@8641 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_measure.xml b/doc/reference_measure.xml index 4a70e280b..7951afdab 100644 --- a/doc/reference_measure.xml +++ b/doc/reference_measure.xml @@ -733,6 +733,11 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid, ST_Area(the_geog,fal geometry pointA geometry pointB + + float ST_Azimuth + geography pointA + geography pointB + @@ -746,16 +751,22 @@ SELECT ST_Area(the_geog)/POWER(0.3048,2) As sqft_spheroid, ST_Area(the_geog,fal and a point. Availability: 1.1.0 + Enhanced: 2.0.0 support for geography was introduced. Azimuth is especially useful in conjunction with ST_Translate for shifting an object along its perpendicular axis. See upgis_lineshift Plpgsqlfunctions PostGIS wiki section for example of this. Examples - Azimuth in degrees + Geometry Azimuth in degrees 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 ------------------+------------------