> The following function seems to be the one:
>
> ST_azimuth(geometry, geometry)
> 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.
>

Or azimuth():

select azimuth(geomfromtext('POINT (0 0)', 4326),
geomfromtext('POINT(90 90)', 4326));
      azimuth
-------------------
 0.785398163397448
(1 row)

or
select degrees(azimuth(geomfromtext('POINT (0 0)', 4326),
geomfromtext('POINT(90 90)', 4326)));
      degrees
-------------------
 45
(1 row)

Nicolas
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to