Classdesc

Linear ring geometry. Only used as part of polygon; cannot be rendered on its own.

Api

Hierarchy (view full)

Constructors

  • Parameters

    • coordinates: number[] | Coordinate[]

      Coordinates. For internal use, flat coordinates in combination with layout are also accepted.

    • Optional layout: GeometryLayout

      Layout.

    Returns LinearRing

Properties

disposed: boolean

The object has already been disposed.

flatCoordinates: number[]
layout: GeometryLayout
on: ObjectOnSignature<EventsKey>
once: ObjectOnSignature<EventsKey>
simplifiedGeometryMaxMinSquaredTolerance: number
simplifiedGeometryRevision: number
simplifyTransformedInternal: ((...arg0) => any)

Get a transformed and simplified version of the geometry.

Type declaration

    • (...arg0): any
    • Parameters

      • Rest ...arg0: any[]

      Returns any

Abstract

Returns

Simplified geometry.

stride: number
un: ObjectOnSignature<void>

Methods

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Protected

    Apply any properties from another object without triggering events.

    Parameters

    • source: Object

      The source object.

    Returns void

  • Apply a transform function to the coordinates of the geometry. The geometry is modified in place. If you do not want the geometry modified in place, first clone() it and then use this function on the clone.

    Parameters

    • transformFn: TransformFunction

      Transform function. Called with a flat array of geometry coordinates.

    Returns void

    Abstract

  • Increases the revision counter and dispatches a 'change' event.

    Returns void

    Api

  • Parameters

    • x: number

      X.

    • y: number

      Y.

    • closestPoint: Coordinate

      Closest point.

    • minSquaredDistance: number

      Minimum squared distance.

    Returns number

    Minimum squared distance.

    Abstract

  • Protected

    Parameters

    • extent: Extent

      Extent.

    Returns Extent

    extent Extent.

    Abstract

  • Parameters

    • x: number

      X.

    • y: number

      Y.

    Returns boolean

    Contains (x, y).

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    • event: string | BaseEvent

      Event object.

    Returns undefined | boolean

    false if anyone called preventDefault on the event object or if any of the listeners returned false.

    Api

  • Clean up.

    Returns void

  • Protected

    Extension point for disposable objects.

    Returns void

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

    Api

  • Return the area of the linear ring on projected plane.

    Returns number

    Area (on projected plane).

    Api

  • Return the closest point of the geometry to the passed point as module:ol/coordinate~Coordinate coordinate.

    Parameters

    • point: Coordinate

      Point.

    • Optional closestPoint: Coordinate

      Closest point.

    Returns Coordinate

    Closest point.

    Api

  • Return the coordinates of the linear ring.

    Returns Coordinate[]

    Coordinates.

    Api

  • Get the extent of the geometry.

    Parameters

    • Optional extent: Extent

      Extent.

    Returns Extent

    extent Extent.

    Api

  • Return the first coordinate of the geometry.

    Returns Coordinate

    First coordinate.

    Api

  • Returns number[]

    Flat coordinates.

  • Get a list of object property names.

    Returns string[]

    List of property names.

    Api

  • Return the last coordinate of the geometry.

    Returns Coordinate

    Last point.

    Api

  • Return the import("./Geometry.js").GeometryLayout layout of the geometry.

    Returns GeometryLayout

    Layout.

    Api

  • Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

    Parameters

    • type: string

      Type.

    Returns undefined | Listener[]

    Listeners.

  • Get an object of all property names and values.

    Returns {
        [x: string]: any;
    }

    Object.

    • [x: string]: any

    Api

  • Get an object of all property names and values.

    Returns null | {
        [x: string]: any;
    }

    Object.

  • Get the version number for this object. Each time the object is modified, its version number will be incremented.

    Returns number

    Revision.

    Api

  • Create a simplified version of this geometry using the Douglas Peucker algorithm.

    Parameters

    • squaredTolerance: number

      Squared tolerance.

    Returns SimpleGeometry

    Simplified geometry.

  • Returns number

    Stride.

  • Get the type of this geometry.

    Returns Type

    Geometry type.

    Abstract

  • Parameters

    • Optional type: string

      Type. If not provided, true will be returned if this event target has any listeners.

    Returns boolean

    Has listeners.

  • Returns boolean

    The object has properties.

  • Returns true if this geometry includes the specified coordinate. If the coordinate is on the boundary of the geometry, returns false.

    Parameters

    • coordinate: Coordinate

      Coordinate.

    Returns boolean

    Contains coordinate.

    Api

  • Test if the geometry and the passed extent intersect.

    Parameters

    • extent: Extent

      Extent.

    Returns boolean

    true if the geometry and the extent intersect.

    Abstract

  • Parameters

    • key: string

      Key name.

    • oldValue: any

      Old value.

    Returns void

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns EventsKey | EventsKey[]

    Event key.

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns EventsKey | EventsKey[]

    Event key.

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Rotate the geometry around a given coordinate. This modifies the geometry coordinates in place.

    Parameters

    • angle: number

      Rotation angle in radians.

    • anchor: Coordinate

      The rotation center.

    Returns void

    Abstract

    Api

  • Scale the geometry (with an optional origin). This modifies the geometry coordinates in place.

    Parameters

    • sx: number

      The scaling factor in the x-direction.

    • Optional sy: number

      The scaling factor in the y-direction (defaults to sx).

    • Optional anchor: Coordinate

      The scale origin (defaults to the center of the geometry extent).

    Returns void

    Abstract

    Api

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optional silent: boolean

      Update without triggering an event.

    Returns void

    Api

  • Set the coordinates of the linear ring.

    Parameters

    • coordinates: Coordinate[]

      Coordinates.

    • Optional layout: GeometryLayout

      Layout.

    Returns void

    Api

  • Parameters

    • layout: GeometryLayout

      Layout.

    • flatCoordinates: number[]

      Flat coordinates.

    Returns void

  • Protected

    Parameters

    • layout: undefined | GeometryLayout

      Layout.

    • coordinates: any[]

      Coordinates.

    • nesting: number

      Nesting.

    Returns void

  • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

    Parameters

    • values: {
          [x: string]: any;
      }

      Values.

      • [x: string]: any
    • Optional silent: boolean

      Update without triggering an event.

    Returns void

    Api

  • Create a simplified version of this geometry. For linestrings, this uses the Douglas Peucker algorithm. For polygons, a quantization-based simplification is used to preserve topology.

    Parameters

    • tolerance: number

      The tolerance distance for simplification.

    Returns Geometry

    A new, simplified version of the original geometry.

    Api

  • Get a transformed and simplified version of the geometry.

    Parameters

    • squaredTolerance: number

      Squared tolerance.

    • Optional transform: TransformFunction

      Optional transform function.

    Returns Geometry

    Simplified geometry.

    Abstract

  • Transform each coordinate of the geometry from one coordinate reference system to another. The geometry is modified in place. For example, a line will be transformed to a line and a circle to a circle. If you do not want the geometry modified in place, first clone() it and then use this function on the clone.

    Parameters

    • source: ProjectionLike

      The current projection. Can be a string identifier or a module:ol/proj/Projection~Projection object.

    • destination: ProjectionLike

      The desired projection. Can be a string identifier or a module:ol/proj/Projection~Projection object.

    Returns Geometry

    This geometry. Note that original geometry is modified in place.

    Api

  • Translate the geometry. This modifies the geometry coordinates in place. If instead you want a new geometry, first clone() this geometry.

    Parameters

    • deltaX: number

      Delta X.

    • deltaY: number

      Delta Y.

    Returns void

    Abstract

    Api

  • Protected

    Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns void

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optional silent: boolean

      Unset without triggering an event.

    Returns void

    Api