import { Feature, LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, Position } from '@turf/turf'; import { IBaseFeature, ILineFeature, ILineProperties, IPointFeature, IPointProperties, IPolygonFeature, IPolygonProperties, IRenderType } from '../typings'; /** * 获取feature唯一id */ export declare const getUuid: (prefix: IRenderType) => string; /** * 根据id判断两个feature是否为同一feature * @param feature1 * @param feature2 */ export declare const isSameFeature: (feature1?: IBaseFeature | null, feature2?: IBaseFeature | null) => boolean; /** * 对target数据使用targetHandler,对target以外数据采用otherHandler * @param target * @param data * @param targetHandler * @param otherHandler */ export declare const updateTargetFeature: >({ target, data, targetHandler, otherHandler, }: { target: F; data: F[]; targetHandler?: ((item: F, index: number) => void | F) | undefined; otherHandler?: ((item: F, index: number) => void | F) | undefined; }) => F[]; export declare const getDefaultPointProperties: () => { id: string; isHover: boolean; isActive: boolean; isDrag: boolean; createTime: number; }; export declare const getDefaultLineProperties: () => { id: string; isHover: boolean; isActive: boolean; isDrag: boolean; isDraw: boolean; createTime: number; }; export declare const getDefaultPolygonProperties: () => { id: string; isHover: boolean; isActive: boolean; isDrag: boolean; isDraw: boolean; createTime: number; }; /** * 创建 * @param position * @param properties */ export declare const createPointFeature: (position: Position, properties?: Partial) => IPointFeature; export declare const createLineFeature: (nodes: IPointFeature[], properties?: Partial) => ILineFeature; export declare const createDashLine: (positions: Position[]) => Feature; export declare const createPolygonFeature: (nodes: IPointFeature[], properties?: Partial) => IPolygonFeature; /** * 为 feature 加入 bbox 属性 * @param features * @returns */ export declare const injectFeaturesBBox: | Feature | ILineFeature | IPointFeature | IPolygonFeature>(features: T[]) => T[]; /** * 在 setData 时调用,将数据中的 Multi 元素拆分成多个单元素,并赋予 multiIndex,以便在 getData 时组装 * @param features * @returns */ export declare const splitMultiFeatures: >(features: T[]) => T[]; /** * 在 getData 时调用,将分散的 Multi 数据组装成原始 Multi 结构的 feature * @param features * @returns */ export declare const joinMultiFeatures: >(features: T[]) => T[];