import { BinaryFeatureCollection } from '@loaders.gl/schema'; import { GeometryCollection } from '@geoda/common'; import { BinaryGeometryType } from '../geometry/binary-geometry'; /** * Type of Nearest Neighbors from binary geometries arguments. */ type NearestNeighborsFromBinaryGeometriesProps = { k: number; binaryGeometryType: BinaryGeometryType; binaryGeometries: BinaryFeatureCollection[]; }; /** * Calculates the nearest neighbors for a given set of geometries or latitude/longitude arrays. * @param {NearestNeighborsFromBinaryGeometriesProps} input - The input parameters. * @returns {Promise} - The nearest neighbors as an array of indices. */ export declare function getNearestNeighborsFromBinaryGeometries({ k, binaryGeometryType, binaryGeometries, }: NearestNeighborsFromBinaryGeometriesProps): Promise; /** * Calculates the nearest neighbors for a given set of geometries. * * ## Example * ```ts * import { getNearestNeighborsFromGeomCollection } from '@geoda/core'; * * const geometries = [ * { type: 'Feature', geometry: { type: 'Point', coordinates: [0, 0] } }, * { type: 'Feature', geometry: { type: 'Point', coordinates: [1, 0] } }, * { type: 'Feature', geometry: { type: 'Point', coordinates: [0, 1] } }, * ]; * * const neighbors = await getNearestNeighborsFromGeomCollection({ * k: 2, * geomCollection: geometries, * }); * * console.log(neighbors); * ``` * * @returns {Promise} - The nearest neighbors as an array of indices. */ export declare function getNearestNeighborsFromGeomCollection({ k, geomCollection, }: { /** * The number of nearest neighbors to calculate. */ k: number; /** * The geometry collection to calculate the nearest neighbors for. */ geomCollection: GeometryCollection; }): Promise; export {};