import { SpatialGeometry } from './utils'; import { DistanceUnit } from '@geoda/common'; /** * Get the area of the geometry * * @example * ```ts * const geoms = [ * { * type: 'Feature', * geometry: { type: 'Polygon', coordinates: [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]] }, * properties: { index: 0 }, * }, * ]; * const area = await getArea(geoms, DistanceUnit.KM); * ``` * * @param geoms - The geometry to get the area of * @param distanceUnit - The unit of the distance * @returns The area of the geometry */ export declare function getArea(geoms: SpatialGeometry, distanceUnit: DistanceUnit): Promise; /** * Get the length of the geometry * * @example * ```ts * const geoms = [ * { type: 'Feature', geometry: { type: 'LineString', coordinates: [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]] }, properties: { index: 0 } }, * ]; * const length = await getLength(geoms, DistanceUnit.KM); * ``` */ export declare function getLength(geoms: SpatialGeometry, distanceUnit: DistanceUnit): Promise; /** * Get the perimeter of the geometry * * @example * ```ts * const geoms = [ * { type: 'Feature', geometry: { type: 'Polygon', coordinates: [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]] }, properties: { index: 0 } }, * ]; * const perimeter = await getPerimeter(geoms, DistanceUnit.KM); * ``` */ export declare function getPerimeter(geoms: SpatialGeometry, distanceUnit: DistanceUnit): Promise;