LemonLiTree opened a new pull request, #18293:
URL: https://github.com/apache/doris/pull/18293

   Add St_Angle/St_azimuth function:
   St_Angle:
   Enter three point, which represent two intersecting lines. Returns the angle 
between these lines. Point 2 and point 1 represent the first line and point 2 
and point 3 represent the second line. The angle between these lines is in 
radians, in the range [0, 2pi). The angle is measured clockwise from the first 
line to the second line.
   
   `
   
   mysql> SELECT ST_Angle(ST_Point(1, 0),ST_Point(0, 0),ST_Point(0, 1));
   +----------------------------------------------------------------------+
   | st_angle(st_point(1.0, 0.0), st_point(0.0, 0.0), st_point(0.0, 1.0)) |
   +----------------------------------------------------------------------+
   |                                                     4.71238898038469 |
   +----------------------------------------------------------------------+
   1 row in set (0.04 sec)
   `
   
   St_azimuth:
   Enter two point, and returns the azimuth of the line segment formed by 
points 1 and 2. The azimuth is the angle in radians measured between the line 
from point 1 facing true North to the line segment from point 1 to point 2.
   `
   mysql> SELECT st_azimuth(ST_Point(0, 0),ST_Point(1, 0));
   +----------------------------------------------------+
   | st_azimuth(st_point(0.0, 0.0), st_point(1.0, 0.0)) |
   +----------------------------------------------------+
   |                                 1.5707963267948966 |
   +----------------------------------------------------+
   1 row in set (0.04 sec)
   `
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to