UNPKG

@loaders.gl/json

Version:

Framework-independent loader for JSON and streaming JSON formats

71 lines 2.36 kB
import type { BinaryFeatureCollection, GeoJSONTable, TableBatch } from '@loaders.gl/schema'; import type { JSONLoaderOptions } from "./json-loader.js"; export type GeoJSONLoaderOptions = JSONLoaderOptions & { geojson?: { shape?: 'geojson-table'; }; gis?: { format?: 'geojson' | 'binary'; }; }; /** * GeoJSON loader */ export declare const GeoJSONWorkerLoader: { readonly dataType: GeoJSONTable; readonly batchType: TableBatch; readonly name: "GeoJSON"; readonly id: "geojson"; readonly module: "geojson"; readonly version: any; readonly worker: true; readonly extensions: ["geojson"]; readonly mimeTypes: ["application/geo+json"]; readonly category: "geometry"; readonly text: true; readonly options: { readonly geojson: { readonly shape: "geojson-table"; }; readonly json: { readonly shape: "object-row-table"; readonly jsonpaths: ["$", "$.features"]; }; readonly gis: { readonly format: "geojson"; }; }; }; export declare const GeoJSONLoader: { readonly parse: typeof parse; readonly parseTextSync: typeof parseTextSync; readonly parseInBatches: typeof parseInBatches; readonly dataType: GeoJSONTable; readonly batchType: TableBatch; readonly name: "GeoJSON"; readonly id: "geojson"; readonly module: "geojson"; readonly version: any; readonly worker: true; readonly extensions: ["geojson"]; readonly mimeTypes: ["application/geo+json"]; readonly category: "geometry"; readonly text: true; readonly options: { readonly geojson: { readonly shape: "geojson-table"; }; readonly json: { readonly shape: "object-row-table"; readonly jsonpaths: ["$", "$.features"]; }; readonly gis: { readonly format: "geojson"; }; }; }; declare function parse(arrayBuffer: ArrayBuffer, options?: GeoJSONLoaderOptions): Promise<GeoJSONTable | BinaryFeatureCollection>; declare function parseTextSync(text: string, options?: GeoJSONLoaderOptions): GeoJSONTable | BinaryFeatureCollection; declare function parseInBatches(asyncIterator: any, options: any): AsyncIterable<TableBatch>; export {}; //# sourceMappingURL=geojson-loader.d.ts.map