import type { FeatureIterator, VectorFeatures, Writer } from '../../index.js'; /** User defined options on how to store the features */ export interface ToCSVOptions { /** The delimiter to use to separate lines [Default=','] */ delimiter?: string; /** The lineDelimiter to use to separate lines [Default='\n'] */ lineDelimiter?: string; /** If provided the lookup of the longitude [Default='lon'] */ lonKey?: string; /** If provided the lookup of the latitude [Default='lat'] */ latKey?: string; /** If provided the lookup for the height value [Default=undefined] */ heightKey?: string; /** List of parameters to include in the feature */ properties?: string[]; /** handle each feature */ onFeature?: (feature: VectorFeatures) => VectorFeatures | undefined; } /** * # CSV Writer * * ## Description * Given a writer and an array of iterators, write the input features to the writer as a CSV data * * ## Usage * ```ts * import { toCSV, JSONReader } from 'gis-tools-ts'; * import { FileReader, FileWriter } from 'gis-tools-ts/file'; * // or use mmap reader if using bun * // import { MMapReader } from 'gis-tools-ts/mmap'; * * const fileReader = new FileReader(`${__dirname}/fixtures/points.geojson`); * const jsonReader = new JSONReader(fileReader); * const bufWriter = new FileWriter(`${__dirname}/fixtures/points.csv`); * * // store to singular output * await toCSV(bufWriter, [jsonReader], { properties: ['name'] }); * ``` * * @param writer - the writer to append strings to * @param iterators - the collection of iterators to write * @param opts - user defined options [optional] */ export declare function toCSV(writer: Writer, iterators: FeatureIterator[], opts?: ToCSVOptions): Promise; //# sourceMappingURL=index.d.ts.map