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.

Hierarchy

Constructors

Accessors

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

    Returns number

  • set a(value): void
  • Parameters

    • value: number

    Returns void

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

    Returns number

  • set b(value): void
  • Parameters

    • value: number

    Returns void

  • get bounds(): Bounds
  • The bounds of this shape. This property is to be treated in a read only manner. An error will be thrown when trying to assign to this property. Note that the bounds property is not immutable. Modifying properties of the bounds property may corrupt your data.

    Returns Bounds

  • get coordinateType(): CoordinateType
  • The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns CoordinateType

  • get focusPoint(): Point
  • The focus point of this shape. This property is read only. An error will be thrown when trying to assign to this property. This property contains an object but should be treated with value semantics: changes to the shape will not be reflected in the focusPoint that was retrieved from this Polygon before the modification.

    Returns Point

  • get reference(): null | CoordinateReference
  • The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns null | CoordinateReference

  • get rotationAzimuth(): 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°.

    Returns number

  • set rotationAzimuth(value): void
  • Parameters

    • value: number

    Returns void

Methods

  • 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).

    Parameters

    • x: number | Point | 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

    • Optional y: number

    Returns boolean

    true when the given point is contained in this shape

    Throws

    Point with another spatial reference

    Deprecated

    Please use contains2DPoint instead.

  • 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).

    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

    Throws

    Point with another spatial reference

  • 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).

    Parameters

    • point: Point

      The point for which containment must be checked.

    Returns boolean

    true when the given point is contained in this shape

    Throws

    Point with another spatial reference

  • Indicates whether this shape is equal to another.

    Parameters

    • ellipse: Shape

      the other shape this shape is compared with.

    Returns boolean

    true if both shapes are equal, false otherwise.

  • 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

  • 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

    Returns void

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

    Parameters

    Returns void

    Throws

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

  • Converts the shape to a string. This functionality is for debugging purposes only. Results of toString cannot be used to uniquely identify a shape instance.

    Returns string

  • Translates the shape over the given vector in 2D space.

    Parameters

    • x: number

      The x coordinate of the translation vector

    • y: number

      The y coordinate of the translation vector

    Returns void