ST_Ellipse

Constructs an ellipse with the specified center, axes, and tilt.

Syntax

ST_Ellipse(x0, y0, a, b, tilt[, nSegs[, unit[, cSys]]]); 
ST_Ellipse(geo, a, b, tilt[, nSegs[, unit[, cSys]]]);
x0
The longitude, that is, the x-coordinate of the center of the ellipse.

Type: DOUBLE

y0
The latitude, that is, the y-coordinate of the center of the ellipse.

Type: DOUBLE

geo
A point geometry the indicates the longitude (x-coordinate) and latitude (y-coordinate) of the center of the ellipse.

Type: VARCHAR(ANY)

a
The semi-major axis.

Type: DOUBLE

b
The semi-minor axis.

Type: DOUBLE

tilt
The major axis tilt.

Type: DOUBLE

nSegs
The number of segments used to approximate a quarter of a circle. This helps to plot accurate geometry.

Type: INT

Default: 8

unit
The units. Possible values include 'meter', 'kilometer', 'foot', 'mile', and 'nautical mile'.

Type: VARCHAR(ANY)

Default: 'meter'

cSys
The coordinate system.

Type: VARCHAR(ANY)

Default: 'WGS84'

Returns

A value of type VARCHAR(64000) that describes an ellipse polygon with the specified center, axes, and tilt.

Examples

SELECT inza..ST_AsText(inza..ST_Ellipse(1.0, 2.0, 100.0, 50.0, 30.0, 2, 'meter', 'cartesian'));

ST_ASTEXT
-----------
POLYGON ((51 88.6025403784439, 66.9739608441171 45.5595740399158, 44.3012701892219 -23, 
-3.73671727453765 -76.9149130992431, -49 -84.6025403784439, -64.9739608441171 -41.5595740399158, 
-42.3012701892219 27, 5.73671727453765 80.9149130992431, 51 88.6025403784439))
(1 row)
SELECT inza..ST_AsText(inza..ST_Ellipse(inza..st_wkttosql('point (1.0 2.0)'), 100.0, 50.0, 30.0, 2, 'meter', 'cartesian'));

ST_ASTEXT
-----------
POLYGON ((51 88.6025403784439, 66.9739608441171 45.5595740399158, 44.3012701892219 -23, 
-3.73671727453765 -76.9149130992431, -49 -84.6025403784439, -64.9739608441171 -41.5595740399158, 
-42.3012701892219 27, 5.73671727453765 80.9149130992431, 51 88.6025403784439))
(1 row)