Options
All
• Public
• Public/Protected
• All

# Class Ellipse

Ellipse interface. An ellipse is a Shape that represents a general ellipse in the 2D space.

The ellipse is defined by:

An ellipse cannot be instantiated directly. It must be instantiated using createEllipse.

## Accessors

### a

• get a(): number
• set a(value: number): void
• The length of the semi major axis of this ellipse, in meters.

#### Returns number

• The length of the semi major axis of this ellipse, in meters.

### b

• get b(): number
• set b(value: number): void
• The length of the semi minor axis of this ellipse, in meters.

#### Returns number

• The length of the semi minor axis of this ellipse, in meters.

### center

• The center of this ellipse. This field is read-only.

Please use move2DToCoordinates or move2DToPoint to move the center point to a new position.

### coordinateType

• The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.

### focusPoint

• get focusPoint(): Point

### reference

• The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

### rotationAzimuth

• get rotationAzimuth(): number
• set rotationAzimuth(value: number): void
• The rotation angle of the semi major axis of this ellipse. The angle is measured in degrees from 12 o'clock (north), positive clockwise.

The value is normalized to the range -180° .. 180°.

#### Returns number

• The rotation angle of the semi major axis of this ellipse. The angle is measured in degrees from 12 o'clock (north), positive clockwise.

The value is normalized to the range -180° .. 180°.

## Methods

### contains2D

• Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

deprecated

#### Parameters

• ##### x: Point | number | Bounds

The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

#### Returns boolean

`true` when the given point is contained in this shape

### Abstract contains2DCoordinates

• (x: number, y: number): boolean
• Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

#### Parameters

• ##### x: number

The x coordinate of the point for which containment must be checked

• ##### y: number

The y coordinate of the point for which containment must be checked

#### Returns boolean

`true` when the given point is contained in this shape

### contains2DPoint

• (point: Point): boolean
• Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

throws

InvalidReferenceError when passing a Point with another spatial reference

#### Parameters

• ##### point: Point

The point for which containment must be checked.

#### Returns boolean

`true` when the given point is contained in this shape

### equals

• (ellipse: Shape): boolean

### Abstract interpolate

• (fraction: number): Point
• Get a point on the ellipse relative to the major axis.

The parameter is [0, 1] clockwise, relative to the rotation angle:

• 0.0 and 1.0 are the same point on the major axis, "on top" of the ellipse
• 0.25 is a point on the minor axis, "right" of the ellipse
• 0.5 is a point on the major axis, opposite of the point at 0.0
• 0.75 is a point on the minor axis, opposite of the point at 0.25

#### Parameters

• ##### fraction: number

A factor in [0, 1], relative to the ellipse's rotation.

#### Returns Point

The computed point

### move2DToCoordinates

• (x: number, y: number): void
• Translates this ellipse so that its center point ends up at the specified position.

#### Parameters

• ##### x: number

x coordinate value

• ##### y: number

y coordinate value

### move2DToPoint

• Translates this shape so that its center point ends up at the specified position.

throws

InvalidReferenceError when the reference of the Point parameter does not correspond with the reference of this Ellipse.

#### Parameters

• ##### point: Point

a Point instance

• (): string

### translate2D

• (x: number, y: number): void

## Legend

• Module
• Object literal
• Variable
• Function
• Function with type parameter
• Index signature
• Type alias
• Type alias with type parameter
• Enumeration
• Enumeration member
• Property
• Method
• Interface
• Interface with type parameter
• Constructor
• Property
• Method
• Index signature
• Class
• Class with type parameter
• Constructor
• Property
• Method
• Accessor
• Index signature
• Inherited constructor
• Inherited property
• Inherited method
• Inherited accessor
• Protected property
• Protected method
• Protected accessor
• Private property
• Private method
• Private accessor
• Static property
• Static method