UNPKG

gis-tools-ts

Version:

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

20 lines 1.5 kB
import type { MValue, Properties, VectorFeatures, VectorMultiPolygon, VectorMultiPolygonGeometry, VectorPolygon, VectorPolygonGeometry } from '../../../index.js'; /** * Given a collection of polygons, if any of the polygons are kinked, dekink them * * NOTE: This algorithm assumes the ring order is correct. Outer rings must be counter-clockwise and * inner rings must be clockwise * @param polygons - the polygons are from either a VectorFeature, VectorPolygonGeometry, or raw VectorPolygon * @returns - the dekinked polygons */ export declare function dekinkPolygons<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(polygons: VectorMultiPolygon<D> | VectorMultiPolygonGeometry<D> | VectorFeatures<M, D, P, VectorMultiPolygonGeometry<D>>): VectorMultiPolygonGeometry<D> | undefined; /** * Given a polygon, if the polygon is kinked, dekink it * * NOTE: This algorithm assumes the ring order is correct. Outer rings must be counter-clockwise and * inner rings must be clockwise * @param polygon - the polygon as either a VectorFeature, VectorPolygonGeometry, or raw VectorPolygon * @returns - the dekinked polygon */ export declare function dekinkPolygon<M = Record<string, unknown>, D extends MValue = Properties, P extends Properties = Properties>(polygon: VectorPolygon<D> | VectorPolygonGeometry<D> | VectorFeatures<M, D, P, VectorPolygonGeometry<D>>): VectorMultiPolygonGeometry<D> | undefined; //# sourceMappingURL=dekink.d.ts.map