@loaders.gl/arrow
Advanced tools
Comparing version 4.2.0-alpha.6 to 4.2.0-beta.1
@@ -1,14 +0,58 @@ | ||
import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils'; | ||
import type { ArrayRowTable, ArrowTableBatch, ColumnarTable, ObjectRowTable } from '@loaders.gl/schema'; | ||
import type { LoaderOptions } from '@loaders.gl/loader-utils'; | ||
import type { ArrayRowTable, ColumnarTable, ObjectRowTable } from '@loaders.gl/schema'; | ||
import type { ArrowTable } from "./lib/arrow-table.js"; | ||
import { parseArrowInBatches } from "./parsers/parse-arrow-in-batches.js"; | ||
/** ArrowLoader options */ | ||
export type ArrowLoaderOptions = LoaderOptions & { | ||
/** ArrowLoader options */ | ||
arrow?: { | ||
/** Shape of returned data */ | ||
shape: 'arrow-table' | 'columnar-table' | 'array-row-table' | 'object-row-table'; | ||
/** Debounce time between batches (prevent excessive numbers of small batches) */ | ||
batchDebounceMs?: number; | ||
/** Override the URL to the worker bundle (by default loads from unpkg.com) */ | ||
workerUrl?: string; | ||
}; | ||
}; | ||
/** ArrowJS table loader */ | ||
export declare const ArrowWorkerLoader: Loader<ArrowTable, never, ArrowLoaderOptions>; | ||
export declare const ArrowWorkerLoader: { | ||
readonly dataType: ArrowTable; | ||
readonly batchType: never; | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly category: "table"; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly tests: ["ARROW"]; | ||
readonly options: { | ||
readonly arrow: { | ||
readonly shape: "columnar-table"; | ||
}; | ||
}; | ||
}; | ||
/** ArrowJS table loader */ | ||
export declare const ArrowLoader: LoaderWithParser<ArrowTable | ColumnarTable | ObjectRowTable | ArrayRowTable, ArrowTableBatch, ArrowLoaderOptions>; | ||
export declare const ArrowLoader: { | ||
readonly parse: (arraybuffer: ArrayBuffer, options?: ArrowLoaderOptions) => Promise<ArrowTable | ColumnarTable | ObjectRowTable | ArrayRowTable>; | ||
readonly parseSync: (arraybuffer: ArrayBuffer, options?: ArrowLoaderOptions) => ArrowTable | ColumnarTable | ObjectRowTable | ArrayRowTable; | ||
readonly parseInBatches: typeof parseArrowInBatches; | ||
readonly dataType: ArrowTable; | ||
readonly batchType: never; | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly category: "table"; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly tests: ["ARROW"]; | ||
readonly options: { | ||
readonly arrow: { | ||
readonly shape: "columnar-table"; | ||
}; | ||
}; | ||
}; | ||
//# sourceMappingURL=arrow-loader.d.ts.map |
@@ -8,5 +8,7 @@ // loaders.gl | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest'; | ||
const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest'; | ||
/** ArrowJS table loader */ | ||
export const ArrowWorkerLoader = { | ||
dataType: null, | ||
batchType: null, | ||
name: 'Apache Arrow', | ||
@@ -13,0 +15,0 @@ id: 'arrow', |
@@ -1,2 +0,2 @@ | ||
import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils'; | ||
import type { WriterOptions } from '@loaders.gl/loader-utils'; | ||
import { ColumnarTable } from "./lib/encode-arrow.js"; | ||
@@ -7,4 +7,15 @@ type ArrowWriterOptions = WriterOptions & { | ||
/** Apache Arrow writer */ | ||
export declare const ArrowWriter: WriterWithEncoder<ColumnarTable, never, ArrowWriterOptions>; | ||
export declare const ArrowWriter: { | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly options: {}; | ||
readonly encode: (data: ColumnarTable, options?: ArrowWriterOptions | undefined) => Promise<ArrayBuffer>; | ||
readonly encodeSync: (data: ColumnarTable, options?: ArrowWriterOptions | undefined) => ArrayBuffer; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=arrow-writer.d.ts.map |
@@ -5,3 +5,3 @@ // import type {} from '@loaders.gl/loader-utils'; | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest'; | ||
const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest'; | ||
/** Apache Arrow writer */ | ||
@@ -8,0 +8,0 @@ export const ArrowWriter = { |
@@ -1,11 +0,29 @@ | ||
import type { Loader, LoaderWithParser, LoaderOptions } from '@loaders.gl/loader-utils'; | ||
import type { GeoJSONTable, GeoJSONTableBatch, BinaryGeometry } from '@loaders.gl/schema'; | ||
import type { ArrowTable, ArrowTableBatch } from "./lib/arrow-table.js"; | ||
import type { LoaderOptions } from '@loaders.gl/loader-utils'; | ||
import type { GeoJSONTable } from '@loaders.gl/schema'; | ||
import type { ArrowTable } from "./lib/arrow-table.js"; | ||
import { parseGeoArrowInBatches } from "./parsers/parse-geoarrow-in-batches.js"; | ||
export type GeoArrowLoaderOptions = LoaderOptions & { | ||
arrow?: { | ||
shape: 'arrow-table' | 'binary-geometry'; | ||
shape?: 'arrow-table' | 'binary-geometry'; | ||
}; | ||
}; | ||
/** ArrowJS table loader */ | ||
export declare const GeoArrowWorkerLoader: Loader<ArrowTable | BinaryGeometry, never, GeoArrowLoaderOptions>; | ||
export declare const GeoArrowWorkerLoader: { | ||
readonly options: { | ||
readonly arrow: { | ||
readonly shape: "arrow-table"; | ||
}; | ||
}; | ||
readonly dataType: ArrowTable; | ||
readonly batchType: never; | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly category: "table"; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly tests: ["ARROW"]; | ||
}; | ||
/** | ||
@@ -15,6 +33,23 @@ * GeoArrowLoader loads an Apache Arrow table, parses GeoArrow type extension data | ||
*/ | ||
export declare const GeoArrowLoader: LoaderWithParser<ArrowTable | GeoJSONTable, // | BinaryGeometry, | ||
// | BinaryGeometry, | ||
ArrowTableBatch | GeoJSONTableBatch, // | BinaryGeometry, | ||
GeoArrowLoaderOptions>; | ||
export declare const GeoArrowLoader: { | ||
readonly parse: (arraybuffer: ArrayBuffer, options?: GeoArrowLoaderOptions) => Promise<ArrowTable | GeoJSONTable>; | ||
readonly parseSync: (arraybuffer: ArrayBuffer, options?: GeoArrowLoaderOptions) => ArrowTable | GeoJSONTable; | ||
readonly parseInBatches: typeof parseGeoArrowInBatches; | ||
readonly options: { | ||
readonly arrow: { | ||
readonly shape: "arrow-table"; | ||
}; | ||
}; | ||
readonly dataType: ArrowTable; | ||
readonly batchType: never; | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly category: "table"; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly tests: ["ARROW"]; | ||
}; | ||
//# sourceMappingURL=geoarrow-loader.d.ts.map |
@@ -21,8 +21,3 @@ // loaders.gl | ||
export const GeoArrowLoader = { | ||
...ArrowWorkerLoader, | ||
options: { | ||
arrow: { | ||
shape: 'arrow-table' | ||
} | ||
}, | ||
...GeoArrowWorkerLoader, | ||
parse: async (arraybuffer, options) => parseGeoArrowSync(arraybuffer, options?.arrow), | ||
@@ -29,0 +24,0 @@ parseSync: (arraybuffer, options) => parseGeoArrowSync(arraybuffer, options?.arrow), |
@@ -1,2 +0,2 @@ | ||
import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils'; | ||
import type { WriterOptions } from '@loaders.gl/loader-utils'; | ||
import { GeoJSONTable, BinaryGeometry } from '@loaders.gl/schema'; | ||
@@ -7,4 +7,15 @@ type ArrowWriterOptions = WriterOptions & { | ||
/** Apache Arrow writer */ | ||
export declare const GeoArrowWriter: WriterWithEncoder<GeoJSONTable | BinaryGeometry, never, ArrowWriterOptions>; | ||
export declare const GeoArrowWriter: { | ||
readonly name: "Apache Arrow"; | ||
readonly id: "arrow"; | ||
readonly module: "arrow"; | ||
readonly version: any; | ||
readonly extensions: ["arrow", "feather"]; | ||
readonly mimeTypes: ["application/vnd.apache.arrow.file", "application/vnd.apache.arrow.stream", "application/octet-stream"]; | ||
readonly binary: true; | ||
readonly options: {}; | ||
readonly encode: (data: GeoJSONTable | BinaryGeometry, options?: ArrowWriterOptions | undefined) => Promise<ArrayBuffer>; | ||
readonly encodeSync: (data: GeoJSONTable | BinaryGeometry, options?: ArrowWriterOptions | undefined) => ArrayBuffer; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=geoarrow-writer.d.ts.map |
@@ -5,3 +5,3 @@ // import type {} from '@loaders.gl/loader-utils'; | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest'; | ||
const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest'; | ||
/** Apache Arrow writer */ | ||
@@ -8,0 +8,0 @@ export const GeoArrowWriter = { |
@@ -7,3 +7,3 @@ // loaders.gl | ||
// @ts-ignore TS2304: Cannot find name '__VERSION__'. | ||
const VERSION = typeof "4.2.0-alpha.5" !== 'undefined' ? "4.2.0-alpha.5" : 'latest'; | ||
const VERSION = typeof "4.2.0-alpha.6" !== 'undefined' ? "4.2.0-alpha.6" : 'latest'; | ||
/** | ||
@@ -10,0 +10,0 @@ * Worker for tessellating geometries. Normally called through triangulateOnWorker |
{ | ||
"name": "@loaders.gl/arrow", | ||
"version": "4.2.0-alpha.6", | ||
"version": "4.2.0-beta.1", | ||
"description": "Simple columnar table loader for the Apache Arrow format", | ||
@@ -56,7 +56,7 @@ "license": "MIT", | ||
"dependencies": { | ||
"@loaders.gl/gis": "4.2.0-alpha.6", | ||
"@loaders.gl/loader-utils": "4.2.0-alpha.6", | ||
"@loaders.gl/schema": "4.2.0-alpha.6", | ||
"@loaders.gl/wkt": "4.2.0-alpha.6", | ||
"@loaders.gl/worker-utils": "4.2.0-alpha.6", | ||
"@loaders.gl/gis": "4.2.0-beta.1", | ||
"@loaders.gl/loader-utils": "4.2.0-beta.1", | ||
"@loaders.gl/schema": "4.2.0-beta.1", | ||
"@loaders.gl/wkt": "4.2.0-beta.1", | ||
"@loaders.gl/worker-utils": "4.2.0-beta.1", | ||
"@math.gl/polygon": "4.0.0", | ||
@@ -68,3 +68,3 @@ "apache-arrow": ">= 15.0.0" | ||
}, | ||
"gitHead": "37bd8ca71763529f18727ee4bf29dd176aa914ca" | ||
"gitHead": "c386a9196516fe3ff24847b40e6c77be039cf905" | ||
} |
@@ -20,6 +20,12 @@ // loaders.gl | ||
/** ArrowLoader options */ | ||
export type ArrowLoaderOptions = LoaderOptions & { | ||
/** ArrowLoader options */ | ||
arrow?: { | ||
/** Shape of returned data */ | ||
shape: 'arrow-table' | 'columnar-table' | 'array-row-table' | 'object-row-table'; | ||
/** Debounce time between batches (prevent excessive numbers of small batches) */ | ||
batchDebounceMs?: number; | ||
/** Override the URL to the worker bundle (by default loads from unpkg.com) */ | ||
workerUrl?: string; | ||
}; | ||
@@ -29,3 +35,6 @@ }; | ||
/** ArrowJS table loader */ | ||
export const ArrowWorkerLoader: Loader<ArrowTable, never, ArrowLoaderOptions> = { | ||
export const ArrowWorkerLoader = { | ||
dataType: null as unknown as ArrowTable, | ||
batchType: null as never, | ||
name: 'Apache Arrow', | ||
@@ -50,10 +59,6 @@ id: 'arrow', | ||
} | ||
}; | ||
} as const satisfies Loader<ArrowTable, never, ArrowLoaderOptions>; | ||
/** ArrowJS table loader */ | ||
export const ArrowLoader: LoaderWithParser< | ||
ArrowTable | ColumnarTable | ObjectRowTable | ArrayRowTable, | ||
ArrowTableBatch, | ||
ArrowLoaderOptions | ||
> = { | ||
export const ArrowLoader = { | ||
...ArrowWorkerLoader, | ||
@@ -65,2 +70,6 @@ parse: async (arraybuffer: ArrayBuffer, options?: ArrowLoaderOptions) => | ||
parseInBatches: parseArrowInBatches | ||
}; | ||
} as const satisfies LoaderWithParser< | ||
ArrowTable | ColumnarTable | ObjectRowTable | ArrayRowTable, | ||
ArrowTableBatch, | ||
ArrowLoaderOptions | ||
>; |
@@ -16,3 +16,3 @@ // import type {} from '@loaders.gl/loader-utils'; | ||
/** Apache Arrow writer */ | ||
export const ArrowWriter: WriterWithEncoder<ColumnarTable, never, ArrowWriterOptions> = { | ||
export const ArrowWriter = { | ||
name: 'Apache Arrow', | ||
@@ -36,2 +36,2 @@ id: 'arrow', | ||
} | ||
}; | ||
} as const satisfies WriterWithEncoder<ColumnarTable, never, ArrowWriterOptions>; |
@@ -14,3 +14,3 @@ // loaders.gl | ||
arrow?: { | ||
shape: 'arrow-table' | 'binary-geometry'; | ||
shape?: 'arrow-table' | 'binary-geometry'; | ||
}; | ||
@@ -20,7 +20,3 @@ }; | ||
/** ArrowJS table loader */ | ||
export const GeoArrowWorkerLoader: Loader< | ||
ArrowTable | BinaryGeometry, | ||
never, | ||
GeoArrowLoaderOptions | ||
> = { | ||
export const GeoArrowWorkerLoader = { | ||
...ArrowWorkerLoader, | ||
@@ -32,3 +28,3 @@ options: { | ||
} | ||
}; | ||
} as const satisfies Loader<ArrowTable | BinaryGeometry, never, GeoArrowLoaderOptions>; | ||
@@ -39,13 +35,5 @@ /** | ||
*/ | ||
export const GeoArrowLoader: LoaderWithParser< | ||
ArrowTable | GeoJSONTable, // | BinaryGeometry, | ||
ArrowTableBatch | GeoJSONTableBatch, // | BinaryGeometry, | ||
GeoArrowLoaderOptions | ||
> = { | ||
...ArrowWorkerLoader, | ||
options: { | ||
arrow: { | ||
shape: 'arrow-table' | ||
} | ||
}, | ||
export const GeoArrowLoader = { | ||
...GeoArrowWorkerLoader, | ||
parse: async (arraybuffer: ArrayBuffer, options?: GeoArrowLoaderOptions) => | ||
@@ -56,2 +44,6 @@ parseGeoArrowSync(arraybuffer, options?.arrow), | ||
parseInBatches: parseGeoArrowInBatches | ||
}; | ||
} as const satisfies LoaderWithParser< | ||
ArrowTable | GeoJSONTable, // | BinaryGeometry, | ||
ArrowTableBatch | GeoJSONTableBatch, // | BinaryGeometry, | ||
GeoArrowLoaderOptions | ||
>; |
@@ -16,7 +16,3 @@ // import type {} from '@loaders.gl/loader-utils'; | ||
/** Apache Arrow writer */ | ||
export const GeoArrowWriter: WriterWithEncoder< | ||
GeoJSONTable | BinaryGeometry, | ||
never, | ||
ArrowWriterOptions | ||
> = { | ||
export const GeoArrowWriter = { | ||
name: 'Apache Arrow', | ||
@@ -42,2 +38,2 @@ id: 'arrow', | ||
} | ||
}; | ||
} as const satisfies WriterWithEncoder<GeoJSONTable | BinaryGeometry, never, ArrowWriterOptions>; |
@@ -80,3 +80,3 @@ // loaders.gl | ||
); | ||
const binaryGeometry = WKBLoader.parseSync?.(arrayBuffer)! as BinaryGeometry; | ||
const binaryGeometry = WKBLoader.parseSync?.(arrayBuffer) as BinaryGeometry; | ||
const geometry = binaryToGeometry(binaryGeometry); | ||
@@ -88,3 +88,3 @@ return geometry; | ||
const string: string = arrowCellValue; | ||
return WKTLoader.parseTextSync?.(string)!; | ||
return WKTLoader.parseTextSync?.(string); | ||
} | ||
@@ -91,0 +91,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1997435
47004
+ Added@loaders.gl/gis@4.2.0-beta.1(transitive)
+ Added@loaders.gl/loader-utils@4.2.0-beta.1(transitive)
+ Added@loaders.gl/schema@4.2.0-beta.1(transitive)
+ Added@loaders.gl/wkt@4.2.0-beta.1(transitive)
+ Added@loaders.gl/worker-utils@4.2.0-beta.1(transitive)
- Removed@loaders.gl/gis@4.2.0-alpha.6(transitive)
- Removed@loaders.gl/loader-utils@4.2.0-alpha.6(transitive)
- Removed@loaders.gl/schema@4.2.0-alpha.6(transitive)
- Removed@loaders.gl/wkt@4.2.0-alpha.6(transitive)
- Removed@loaders.gl/worker-utils@4.2.0-alpha.6(transitive)
Updated@loaders.gl/gis@4.2.0-beta.1
Updated@loaders.gl/wkt@4.2.0-beta.1