Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CoordinatePath defines a spatial path as a list of parts, so it can be a multi-polyline or a multi-polygon.

Donut shapes can be created by adding multiple parts to a single path. The winding rule for filling is 'nonzero', see https://en.wikipedia.org/wiki/Nonzero-rule So take care of the (counter)clockwise direction of each part.

Hierarchy

  • CoordinatePath

Index

Constructors

  • Create a new path. Be sure to set the crs property when adding parts.

    Returns CoordinatePath

Properties

crs: string

The EPSG CRS code of the coordinates in this path, like "4326" for example

The list of parts

TYPE: string = "CP"

The type of objects in this class

Methods

  • asPolygonWKT(): string
  • Convert to a polygon WKT string.

    Returns string

    a WKT string.

  • asPolylineWKT(): string
  • Convert to a polyline WKT string.

    Returns string

    a WKT string.

  • Get the bounds.

    Returns Bounds

    returns a Bounds instance, never null.

  • toString(): string
  • Convert the object to a string.

    Returns string

    the string form of the object.