s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
51 lines • 1.6 kB
TypeScript
import type { Properties } from '../../geometry';
import type { Reader, ReaderInputs } from '..';
/** The Header data explaining the contents of the DBF file */
export interface DBFHeader {
/** The last updated date */
lastUpdated: Date;
/** The number of records */
records: number;
/** The length of the header data */
headerLen: number;
/** The length of each row */
recLen: number;
}
/** Each row is a key definition to build the properties for each column */
export interface DBFRow {
/** The name of the row */
name: string;
/** The data type of the row */
dataType: string;
/** The length of the row */
len: number;
/** The decimal places of the row */
decimal: number;
}
/** A DBF data class to parse the data from a DBF */
export declare class DataBaseFile {
#private;
reader: Reader;
/**
* @param input - the input data structure to parse
* @param encoding - the encoding of the raw data. defaults to 'utf-8'
*/
constructor(input: ReaderInputs, encoding?: string);
/**
* Create a copy of the header data
* @returns - a copy of the header
*/
getHeader(): DBFHeader;
/**
* Get the properties for the given index
* @param index - the index of the properties data we want
* @returns - the properties for the given index
*/
getProperties(index: number): Properties | undefined;
/**
* Get all the properties in the DBF
* @returns - an array of Properties
*/
getAllProperties(): Properties[];
}
//# sourceMappingURL=dbf.d.ts.map