Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolygonGeometry

class

PolygonGeometry

classdesc

Represents a polygon geometry in the 2D basic image coordinate system. All polygons and holes provided to the constructor needs to be closed.

example
var basicPolygon = [[0.5, 0.3], [0.7, 0.3], [0.6, 0.5], [0.5, 0.3]];
var polygonGeometry = new Mapillary.TagComponent.PolygonGeometry(basicPolygon);

Hierarchy

Index

Constructors

Accessors

Constructors

constructor

  • new PolygonGeometry(polygon: number[][], holes?: number[][][]): PolygonGeometry
  • Create a polygon geometry.

    constructor
    throws

    {GeometryTagError} Polygon coordinates must be valid basic coordinates.

    Parameters

    • polygon: number[][]

      Array of polygon vertices. Must be closed.

    • Optional holes: number[][][]

    Returns PolygonGeometry

Accessors

holes

  • get holes(): number[][][]

polygon

  • get polygon(): number[][]

Generated using TypeDoc