require(["esri/geometry/operators/multiPartToSinglePartOperator"], (multiPartToSinglePartOperator) => { /* code goes here */ });
import * as multiPartToSinglePartOperator from "@arcgis/core/geometry/operators/multiPartToSinglePartOperator.js";
esri/geometry/operators/multiPartToSinglePartOperator
Convert multipart 2D geometries to single part geometries.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | multiPartToSinglePartOperator |
Property Details
-
supportsCurves
supportsCurves Booleanreadonly
-
Indicates if the operator supports input geometries that contain curves.
- Default Value:true
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Performs the multipart to single part operation on the input geometries. | multiPartToSinglePartOperator |
Method Details
-
executeMany
executeMany(geometries, options){GeometryUnion[]}
-
Performs the multipart to single part operation on the input geometries. Single part geometries will not be affected (i.e. they just get passed along) with the exception of multipoints, which always become points. By default, polygons will be simplified before producing single parts.
Parametersgeometries GeometryUnion[]The input geometries to be converted to single part geometries. All the geometries must have the same spatial reference.
options ObjectoptionalAdditional options.
SpecificationsimplifyPolygons BooleanoptionalDefault Value: trueWhen this parameter is set to false, the input polygons will not be simplified before converting them to single part geometries. Make sure the input polygons are topologically simple. Otherwise, the operation may assume incorrect ring orientation or order of rings.
ReturnsType Description GeometryUnion[] Returns the single part geometries. For non-simple polygons, the output of the method is not guaranteed to be correct if the simplifyPolgons
option is set tofalse
. In that case, the method may either throw an error, or produce some output which is not guaranteed to be correct.Example// Convert multipart geometries to single part geometries const singlePartGeometries = multiPartToSinglePartOperator.executeMany(multiPartGeometries);