UNPKG

gis-tools-ts

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

27 lines 1.85 kB
import type { MValue, Properties, VectorFeatures, VectorLineString, VectorMultiPolygon, VectorMultiPolygonGeometry, VectorPoint, VectorPolygon, VectorPolygonGeometry } from '../../../index.js'; /** * A robust method to see if a point is in a collection of polygons or not. * Be sure the point and polygon are in the same projection space. * @param point - the point to check * @param polygons - the collection of polygons * @param ignoreBoundary - if true, ignore when the point is on the boundary * @returns - true if the point is in the polygon */ export declare function pointInPolygons<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(point: VectorPoint, polygons: VectorMultiPolygon<D> | VectorMultiPolygonGeometry<D> | VectorFeatures<M, D, P, VectorMultiPolygonGeometry<D>>, ignoreBoundary?: boolean): boolean | 0; /** * A robust method to see if a point is in a polygon or not. * Be sure the point and polygon are in the same projection space. * @param point - the point to check * @param polygon - the polygon * @param ignoreBoundary - if true, ignore when the point is on the boundary * @returns - true if the point is in the polygon */ export declare function pointInPolygon<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(point: VectorPoint, polygon: VectorPolygon<D> | VectorPolygonGeometry<D> | VectorFeatures<M, D, P, VectorPolygonGeometry<D>>, ignoreBoundary?: boolean): boolean | 0; /** * Check if a hole is inside an outer ring * @param hole - the hole to test if inside the outer * @param outer - the outer to test against * @returns true if the hole is inside the outer */ export declare function polylineInPolyline(hole: VectorLineString, outer: VectorLineString): boolean; //# sourceMappingURL=pointInPoly.d.ts.map