import type { IntersectionOfSegmentsRobust, MValue, Properties, VectorFeatures, VectorMultiPolygon, VectorMultiPolygonGeometry, VectorPoint } from '../../../index.js'; /** A segment in a polygon */ export interface Segment { id: number; polyIndex: number; ringIndex: number; from: number; to: number; } /** An intersection of two segments */ export interface Intersection { segment1: Segment; segment2: Segment; point: VectorPoint; u: number; t: number; } /** Local Intersection to a [polyIndex][ringIndex] */ export interface RingIntersection { from: number; to: number; point: VectorPoint; t: number; tVec: VectorPoint; tAngle: number; } /** Intersection Lookup for mapped by polyIndex and ringIndex */ export declare class RingIntersectionLookup { /** [polyIndex][ringIndex] -> Intersections */ store: Map[]>>; get(polyIndex: number, ringIndex: number): RingIntersection[]; set(polyIndex: number, ringIndex: number, int: RingIntersection): void; } /** * Find the intersection of a collection of polygons * @param polygons - the collection of polygons * @param includeSelfIntersections - if true, include self intersections * @returns - found intersections */ export declare function polygonsIntersections, D extends MValue = Properties, P extends Properties = Properties>(polygons: VectorMultiPolygon | VectorMultiPolygonGeometry | VectorFeatures>, includeSelfIntersections?: boolean): Intersection[]; /** * Run through the vectorPolygons and Builds the ring intersection lookup * @param vectorPolygons - the collection of polygons * @param segmentFilter - the function to filter the segments, default ignores self intersections * @returns - the ring intersection lookup for all rings in the multipolygon collection */ export declare function polygonsIntersectionsLookup(vectorPolygons: VectorMultiPolygon, segmentFilter?: (seg1: Segment) => { (seg2: Segment): boolean; }): RingIntersectionLookup; /** * Build all segments * @param vectorPolygons - the collection of polygons * @returns - the collection of segments */ export declare function buildPolygonSegments(vectorPolygons: VectorMultiPolygon): Segment[]; /** * Find the intersection of two segments if it exists * @param vectorPolygons - the collection of polygons * @param segment1 - the first segment * @param segment2 - the second segment * @returns - the intersection if it exists. Undefined otherwise. */ export declare function findPolygonIntersections(vectorPolygons: VectorMultiPolygon, segment1: Segment, segment2: Segment): IntersectionOfSegmentsRobust | undefined; /** * Given a ring's of intersections, clean them up * @param intersections - a collection of intersections to clean up * @returns - the cleaned up intersections */ export declare function cleanIntersections(intersections: RingIntersection[]): RingIntersection[]; //# sourceMappingURL=intersections.d.ts.map