sline
functions
#To get the beginning and the end of a line, pgSphere provides two functions:
sl_beg( | line) ; |
sline line
;sl_end( | line) ; |
sline line
;Example 6.11. Get the beginning of a line
sql> SELECT sl_beg( sline '(10d, 90d, 270d, ZXZ ), 20d';
You can create a meridian as a line using the function
meridian( | lng) ; |
float8 lng
;
The function returns a line starting at a latitude of
-90° and ending at a latitude of 90°. The line goes
along the given longitude lng
in
radians.
Example 6.12. A meridian for longitude 20°
sql> SELECT set_sphere_output('DEG'); set_sphere_output ------------------- SET DEG (1 row) sql> SELECT meridian (20.0 *pi() / 180.0 ); sline ------------------------------- ( 270d, 90d, 20d, ZXZ ), 180d (1 row)