The functions described below are implemented without having an operator. If you are missing some functions, see Section 5 and use the operators.
The area function returns the area of a
spherical object in square radians. Supported data types are:
scircle, spolygon (if the polygon
is convex), sbox, and smoc.
The functions
returns the longitude or latitude value of a
spherical position p in radians.
The functions
return the Cartesian
x, y or
z value of a spherical position
p. The returned values are always
between -1.0 and +1.0.
Example 41. Get the Cartesian z-value of a spherical point
sql> SELECT z ( spoint '(10d,-90d)' ) AS z;
z
----
-1
(1 row)
You can get a float8 array of Cartesian values using the function
Using the function
strans_zxz(strans), you can convert
an Euler transformation to ZXZ axes
transformation.
It is possible to get the components of an Euler transformation.
Table 4. Getting Euler transformation attributes
| function | description |
|---|---|
phi
| first angle of a transformation |
theta
| second angle of a transformation |
psi
| third angle of a transformation |
axes
| transformation axes as a three letter code |
The angles will always returned as a float8 value in radians. The axes are returned as a three letter code.
You can get the radius of a spherical circle in radians using
the radius function. The center of the
circle is available with
the operator @@ (Section 5.7).
pgSphere provides 4 functions to get the parameters of a spherical ellipse: