/** * Extend 2D polylines with a polyline. * * By default, this considers both ends of parts. The old ends remain and new points are added at the extended ends. * The new points have attributes that are extrapolated from adjacent existing segments. * * @since 4.31 */ import type Polyline from "../Polyline.js"; /** @since 5.2 */ export interface ExtendOptions { /** If an extension is performed at an end, relocate the end point to the new position instead of leaving the old point and adding a new point at the new position. */ relocateEnds?: boolean; /** * If an extension is performed at an end, do not extrapolate the end-segment's attributes for the new point. Instead, make its attributes the same as the current end. * Incompatible with `noEndAttributes`. */ keepEndAttributes?: boolean; /** * If an extension is performed at an end, do not extrapolate the end-segment's attributes for the new point. * Instead, make its attributes empty. * Incompatible with `keepEndAttributes`. */ noEndAttributes?: boolean; /** Do not extend the 'from' end of any part. */ noExtendAtFrom?: boolean; /** Do not extend the 'to' end of any part. */ noExtendAtTo?: boolean; } /** * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [ExtendOptions](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/extendOperator/#ExtendOptions). */ export type Options = ExtendOptions; /** * Performs the extend operation on a polyline using a polyline as the extender. * * @param polyline1 - The polyline to be extended. * @param polyline2 - The polyline to extend to. * @param options - Additional options. * @returns Returns the extended polyline or null. * The output polyline will have the first and last segment of each path extended to `polyline2` if the segments can be interpolated to intersect it. * In the case that the segments can be extended to multiple segments of the extender, `polyline2`, the shortest extension is chosen. * Only end points for paths that are not shared by the end points of other paths will be extended. * If the polyline cannot be extended, then null is returned. * @since 5.2 */ export function extendExecute(polyline1: Polyline, polyline2: Polyline, options?: ExtendOptions): Polyline | null | undefined; /** * Performs the extend operation on a polyline using a polyline as the extender. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [extendExecute()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/extendOperator/#extendExecute). * @param polyline1 - The polyline to be extended. * @param polyline2 - The polyline to extend to. * @param options - Additional options. * @returns Returns the extended polyline or null. * The output polyline will have the first and last segment of each path extended to `polyline2` if the segments can be interpolated to intersect it. * In the case that the segments can be extended to multiple segments of the extender, `polyline2`, the shortest extension is chosen. * Only end points for paths that are not shared by the end points of other paths will be extended. * If the polyline cannot be extended, then null is returned. */ export function execute(polyline1: Polyline, polyline2: Polyline, options?: ExtendOptions): Polyline | null | undefined; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `false`. * * @since 5.2 */ export const extendSupportsCurves: boolean; /** * Indicates if the operator supports input geometries that contain curves. * The value will always be `false`. * * @deprecated * since 5.2. Refactor using \@arcgis/codemod or manually replace usages * with [extendSupportsCurves](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/extendOperator/#extendSupportsCurves). */ export const supportsCurves: ReturnType;