UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

45 lines (44 loc) 1.95 kB
import { Loader } from '@loaders.gl/loader-utils'; import { isArrowTable } from '@kepler.gl/utils'; import { AddDataToMapPayload, Feature } from '@kepler.gl/types'; import { FeatureCollection } from '@turf/helpers'; import { FileCacheItem, ValidKeplerGlMap } from './types'; export declare type ProcessFileDataContent = { data: unknown; fileName: string; length?: number; progress?: { rowCount?: number; rowCountInBatch?: number; percent?: number; }; /** metadata e.g. for arrow data, metadata could be the schema.fields */ metadata?: Map<string, string>; }; export { isArrowTable }; /** * check if data is an ArrowData object, which is an array of RecordBatch * @param data - object to check * @returns {boolean} - true if data is an ArrowData object type guarded */ export declare function isArrowData(data: any): boolean; export declare function isGeoJson(json: unknown): json is Feature | FeatureCollection; export declare function isFeature(json: unknown): json is Feature; export declare function isFeatureCollection(json: unknown): json is FeatureCollection; export declare function isRowObject(json: any): boolean; export declare function isKeplerGlMap(json: unknown): json is ValidKeplerGlMap; export declare function makeProgressIterator(asyncIterator: AsyncIterable<any>, info: { size: number; }): AsyncGenerator; export declare function readBatch(asyncIterator: AsyncIterable<any>, fileName: string): AsyncGenerator; export declare function readFileInBatches({ file, loaders, loadOptions }: { file: File; fileCache: FileCacheItem[]; loaders: Loader[]; loadOptions: any; }): Promise<AsyncGenerator>; export declare function processFileData({ content, fileCache }: { content: ProcessFileDataContent; fileCache: FileCacheItem[]; }): Promise<FileCacheItem[]>; export declare function filesToDataPayload(fileCache: FileCacheItem[]): AddDataToMapPayload[];