import type { Feature, Polygon } from 'geojson'; import { Position } from "../utils/geojson-types.js"; /** Given 3 positions compute cross product of vectors (q-p) and (r-p) * @param p start of directed line segment * @param q end of directed line segment * @param r position being tested * @returns positive num if r is left, negative if right, 0 if collienar with p-q */ export declare function orientation(p: Position, q: Position, r: Position): number; /** Check if two line segments intersect given 4 points - segment1(p1,p2), segment2(p3,p4) * Are p3→ p4 on opposite sides of line p1→ p2? And p1→ p2 on opposite sides of p3→ p4? * If both yes then the segments cross, not just touch * @param p1 start segment 1 * @param p2 end segment 1 * @param p3 start segment 2 * @param p4 end segment 2 * @returns true if segements intersect - false if non-intersecting */ export declare function segmentsIntersect(p1: Position, p2: Position, p3: Position, p4: Position): boolean; /** Check if two polygons have intersecting edges and returns true for intersection * @param featureA polygon feature * @param featureB polyfon feature * @returns true if intersection */ export declare function polygonEdgesIntersect(featureA: Feature, featureB: Feature): boolean; /** Check if point in polygon using standard ray casting algorithm * @param point the position to test * @param ring the polygon to test * @returns true if point inside polygon */ export declare function pointInPolygon(point: Position, ring: Position[]): boolean; /** Uses pointInPolygon() to check if one polygon is inside another * @param featureA inner polygon * @param featureB outer polygon * @returns true if featureA is inside of featureB */ export declare function polygonWithinPolygon(featureA: Feature, featureB: Feature): boolean; //# sourceMappingURL=cartesian-utils.d.ts.map