You can use the function
sellipse( | center, | |
major_rad, | ||
minor_rad, | ||
incl) ; |
spoint center
;float8 major_rad
;float8 minor_rad
;float8 incl
;
to create a spherical ellipse. The first parameter
center
is the center of ellipse. The
parameter major_rad
and
minor_rad
are the major and the minor
radii of the ellipse in radians. If the major radius is smaller
than minor radius, pgSphere swaps the
values automatically. The last parameter
incl
is the inclination angle in radians.
For more informations about ellipses, see Section 3.6.
Example 4.6. Create an ellipse
An ellipse with a center at 20° of longitude and 0° of latitude. The minor radius is part of the equator. The major radius has a size of 10°. The minor radius has 5°.
sql> SELECT set_sphere_output('DEG'); set_sphere_output ------------------- SET DEG (1 row) sql> SELECT sellipse ( spoint '( 20d, 0d )', 10.0*pi()/180.0, 5.0*pi()/180.0, pi()/2.0 ); sellipse ----------------------------------- <{ 10d , 5d }, (20d , -0d) , 90d> (1 row)