PolygonBuilder.fromPolygon constructor
- Polygon? polygon
Creates a new polygon builder by copying the parts from the specified Polygon.
The SpatialReference of the new polygon builder will match that of the given Polygon. Use this constructor in workflows that create a modified version of an existing geometry. Polygons with curves are supported.
Parameters:
polygon
— A polygon used to initialize the new builder.
Implementation
factory PolygonBuilder.fromPolygon(Polygon? polygon) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_PolygonBuilder_createFromPolygon(
polygon?._handle ?? ffi.nullptr, errorHandler);
});
return PolygonBuilder._withHandle(handle);
}