import { linesToPolygonsExecuteMany, executeMany, linesToPolygonsSupportsCurves, supportsCurves } from "@arcgis/core/geometry/operators/linesToPolygonsOperator.js";
Since
ArcGIS Maps SDK for JavaScript 4.31

Performs the topological operation of breaking the input set of 2D polygons and polylines into segments and rebuilding a new set of polygons from the non-intersecting areas.

Functions

linesToPolygonsExecuteMany

Function
Since
ArcGIS Maps SDK for JavaScript 5.2

Performs the topological lines to polygons operation.

Signature
linesToPolygonsExecuteMany (geometries: GeometryUnion[]): Polygon[]

Parameters

ParameterTypeDescriptionRequired
geometries

The set of input geometries. All the geometries must have the same spatial reference.

Returns
Polygon[]

Returns the resulting polygons.

Example
// Perform the lines to polygons operation
const polygons = linesToPolygonsExecuteMany([polyline1, polyline2]);

executeMany

deprecated Function

Performs the topological lines to polygons operation.

Signature
executeMany (geometries: GeometryUnion[]): Polygon[]

Parameters

ParameterTypeDescriptionRequired
geometries

The set of input geometries. All the geometries must have the same spatial reference.

Returns
Polygon[]

Returns the resulting polygons.

Example
// Perform the lines to polygons operation
const polygons = linesToPolygonsExecuteMany([polyline1, polyline2]);

Variables

linesToPolygonsSupportsCurves

Variable
Since
ArcGIS Maps SDK for JavaScript 5.2

Indicates if the operator supports input geometries that contain curves. The value will always be true.

Type
boolean

supportsCurves

deprecated Variable

Indicates if the operator supports input geometries that contain curves. The value will always be true.

Type
ReturnType