Skip to content

Commit 5143c5b

Browse files
committed
Add support for function ST_Azimuth.
1 parent ab6cf4a commit 5143c5b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

geoalchemy2/functions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ def __init__(self, *args, **kwargs):
186186
'For ``geometry`` type area is in SRID units. For ``geography`` area is '
187187
'in square meters.'),
188188

189+
('ST_Azimuth', None,
190+
'Returns the angle in radians from the horizontal of the '
191+
'vector defined by pointA and pointB. Angle is computed clockwise from '
192+
'down-to-up: on the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2.'),
193+
189194
('ST_Centroid', types.Geometry,
190195
'Returns the geometric center of a geometry.'),
191196

tests/test_functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ def test_ST_Area():
9999
_test_simple_func('ST_Area')
100100

101101

102+
def test_ST_Azimuth():
103+
_test_simple_func('ST_Azimuth')
104+
105+
102106
def test_ST_Centroid():
103107
_test_geometry_returning_func('ST_Centroid')
104108

0 commit comments

Comments
 (0)