densify static method
Densifies the input geometry by inserting additional vertices along the geometry at an interval defined by maxSegmentLength.
Additional vertices are not inserted on segments of the input Envelope, Polygon, or Polyline that are shorter than maxSegmentLength.
Supports true curves as input, producing a densified curve as output where applicable.
Parameters:
geometry
— An Envelope, Polygon, or Polyline geometry.maxSegmentLength
— The maximum distance between vertices when the input geometry is densified. The linear unit is assumed to be that of the input geometry's spatial reference (decimal degrees for a geometry with a geographic spatial reference, meters for geometry with a Mercator spatial reference, and so on). Use SpatialReference.unit to determine the unit used by a specific spatial reference.
Return Value: The densified geometry.
Implementation
static Geometry densify({
required Geometry geometry,
required double maxSegmentLength,
}) {
_initializeArcGISEnvironmentIfNeeded();
final objectHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_GeometryEngine_densify(
geometry._handle,
maxSegmentLength,
errorHandler,
);
});
return Geometry._fromHandle(
objectHandle,
)!;
}