ST_Ellipse

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

Syntax

ST_Ellipse(x0, y0, a, b, tilt[, nSegs[, unit[, srid]]]); 
ST_Ellipse(geo, a, b, tilt[, nSegs[, unit[, srid]]]);
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: ST_Geometry(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.

Type: INT

Default: 8

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

Type: VARCHAR(ANY)

Default: 'meter'

srid
The spatial reference system (SRS) identifier.

Type: INT4

Default: '4326'

Returns

A value of type ST_GEOMETRY(ANY) 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', 27700));

ST_ASTEXT
---------------------------------------------------------
POLYGON ((51 88.602499999106, 5.7367000002414
80.914899999276, -42.301300000399 27, -64.974000000395
-41.559599999338, -49 -84.602600000799, -3.7368000000715
-76.914999999106, 44.301199999638 -23, 66.973899999633
45.559499999508, 51 88.602499999106))
(1 row)


ST_ASTEXT
SELECT inza..ST_AsText(inza..ST_Transform(inza..ST_Ellipse(inza..ST_WKTToSql('point (1.0 2.0)'), 100.0, 50.0, 30.0, 2, 'meter'), 27700));

ST_ASTEXT
---------------------------------------------------------
POLYGON ((733904.5182 -5306149.6444, 733838.1317
-5306175.3022, 733811.2396 -5306211.4765, 733793.5087
-5306252.918, 733804.7382 -5306323.1987, 733871.1246
-5306297.541, 733898.0167 -5306261.3666, 733915.7476
-5306219.9251, 733904.5182 -5306149.6444))
(1 row)