import type { ElevationConverter, MValue, Properties, TileID, VectorFeatureCollection, VectorMultiPolygonFeature, VectorMultiPolygonGeometry } from '../../index.js'; export interface HillshadeProperties extends Properties { hillshade: string; } export type HillshadeFeature = VectorMultiPolygonFeature, MValue, HillshadeProperties>; export type HillshadeFeatureCollection = VectorFeatureCollection, MValue, HillshadeProperties, VectorMultiPolygonGeometry>; export interface HillshadeResult { width: number; height: number; hillshade: number[]; } /** * # Vectorize hillshade data * * ## Description * Generate vectorized hillshade data with lights and darks * * ## Example * ```ts * import { generateHillshade } from 'gis-tools-ts'; * import sharp from 'sharp'; * * const elevationImage = await Bun.file(`${__dirname}/fixtures/13_1544_3085.webp`).arrayBuffer(); * const vectorHillshade = await vectorizeHillshade(elevationImage, [13, 1544, 3085]); * ``` * * ## Links * - * * @param imageData - the raw RGB(A) image data * @param tile - The zoom, x, and y of the tile * @param elevationConverter - the conversion function to convert the pixels to elevation * @param tmsStyle - if true, the y position will be inverted * @param azimuth - The azimuth of the sun * @param altitude - The altitude of the sun * @param zFactor - The zFactor effects the weight of the sun's light ouput * @param thresholds - The thresholds for the lights and darks to generate * @param weights - The weights of the azimuths. The first azimuth is the sun's azimuth value parameter. Each subsequent azimuth is the angle away from the sun. * @param padding - The padding to add to the image. This is needed to account for the edge of the tile. * @param tolerance - The tolerance of the simplification of the lines using the Ramer-Douglas-Peucker algorithm * @returns An image/array of grayscale values */ export declare function vectorizeHillshade(imageData: ArrayBufferLike | Uint8Array | Uint8ClampedArray | Buffer, tile: TileID, elevationConverter?: ElevationConverter, tmsStyle?: boolean, azimuth?: number, altitude?: number, zFactor?: number, thresholds?: Map, weights?: [primary: number, neg45: number, pos45: number, pos90: number], padding?: number, tolerance?: number): Promise; /** * # Build greyscale hillshade data * * ## Description * Builds an array of grayscale values for a given tile. * * ## Example * ```ts * import { generateHillshade } from 'gis-tools-ts'; * import sharp from 'sharp'; * * import type { SharpOptions } from 'sharp'; * * const elevationImage = await Bun.file(`${__dirname}/fixtures/13_1544_3085.webp`).arrayBuffer(); * const { width, height, hillshade } = await generateHillshade(elevationImage, [13, 1544, 3085]); * * const sharpOptions: SharpOptions = { raw: { width, height, channels: 1 } }; * const pngData = await sharp(new Uint8ClampedArray(hillshade), sharpOptions).png().toBuffer(); * ``` * * ## Links * - * * @param imageData - the raw RGB(A) image data * @param tile - The zoom, x, and y of the tile * @param elevationConverter - the conversion function to convert the pixels to elevation * @param tmsStyle - if true, the y position will be inverted * @param azimuth - The azimuth of the sun * @param altitude - The altitude of the sun * @param zFactor - The zFactor effects the weight of the sun's light ouput * @param weights - The weights of the azimuths. The first azimuth is the sun's azimuth value parameter. Each subsequent azimuth is the angle away from the sun. * @param smooth - if true, the hillshade will be smoothed * @returns An image/array of grayscale values */ export declare function generateHillshade(imageData: ArrayBufferLike | Uint8Array | Uint8ClampedArray | Buffer, tile: TileID, elevationConverter?: ElevationConverter, tmsStyle?: boolean, azimuth?: number, altitude?: number, zFactor?: number, weights?: [primary: number, neg45: number, pos45: number, pos90: number], smooth?: boolean): Promise; //# sourceMappingURL=hillshade.d.ts.map