import { Feature } from 'geojson'; import { SpatialGeometry } from './utils'; import { DistanceUnit } from '@geoda/common'; /** * The options for getting the buffers */ export type GetBuffersOptions = { /** * The geometries to get the buffers See {@link SpatialGeometry} */ geoms: SpatialGeometry; /** * The distance of the buffer, use with distanceUnit e.g. 100 KM or 10 mile */ bufferDistance: number; /** * The unit of the distance. See {@link DistanceUnit} */ distanceUnit: DistanceUnit; /** * The number of points per circle. This determines the granularity of the buffer. * More points will result in a smoother buffer but will also increase the memory usage. */ pointsPerCircle?: number; }; /** * Get the buffers of the geometries * * ## Example * ```ts * const geoms = [ * { * type: 'Feature', * geometry: { type: 'Point', coordinates: [100, 0] }, * }, * ]; * * const buffers = await getBuffers({ * geoms: geoms, * bufferDistance: 10, * distanceUnit: DistanceUnit.Mile, * pointsPerCircle: 10, * }); * ``` * * @param options The options for getting the buffers. See {@link GetBuffersOptions} * @returns The buffers of the geometries */ export declare function getBuffers({ geoms, bufferDistance, distanceUnit, pointsPerCircle, }: GetBuffersOptions): Promise[]>;