@luma.gl/graph 10.0.0-alpha.5 → 10.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +38 -0
- package/README.md +7 -1
- package/dist/arrow/dggs/dggs-gpu-polygons.cjs +667 -0
- package/dist/arrow/dggs/dggs-gpu-polygons.d.ts +75 -0
- package/dist/arrow/dggs/dggs-gpu-polygons.d.ts.map +1 -0
- package/dist/arrow/dggs/dggs-gpu-polygons.js +651 -0
- package/dist/arrow/dggs/dggs-gpu-polygons.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.cjs +411 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts +31 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js +395 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.cjs +304 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts +32 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js +293 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.cjs +232 -0
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.d.ts +54 -0
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.d.ts.map +1 -0
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js +222 -0
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-adapters.cjs +314 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-adapters.d.ts +42 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-adapters.d.ts.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-adapters.js +318 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-adapters.js.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-readback.cjs +204 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-readback.d.ts +30 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-readback.d.ts.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-readback.js +195 -0
- package/dist/arrow/gpu/arrow-gpu-analytics-readback.js.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-table-adapters.cjs +257 -0
- package/dist/arrow/gpu/arrow-gpu-table-adapters.d.ts +45 -0
- package/dist/arrow/gpu/arrow-gpu-table-adapters.d.ts.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-table-adapters.js +257 -0
- package/dist/arrow/gpu/arrow-gpu-table-adapters.js.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-table-conversion.cjs +230 -0
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts +71 -0
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts.map +1 -0
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js +215 -0
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js.map +1 -0
- package/dist/arrow/gpu/arrow-input-schema.cjs +36 -0
- package/dist/arrow/gpu/arrow-input-schema.d.ts +41 -0
- package/dist/arrow/gpu/arrow-input-schema.d.ts.map +1 -0
- package/dist/arrow/gpu/arrow-input-schema.js +17 -0
- package/dist/arrow/gpu/arrow-input-schema.js.map +1 -0
- package/dist/arrow/index.cjs +90 -0
- package/dist/arrow/index.cjs.map +6 -0
- package/dist/arrow/index.d.ts +9 -0
- package/dist/arrow/index.d.ts.map +1 -0
- package/dist/arrow/index.js +12 -0
- package/dist/arrow/index.js.map +1 -0
- package/dist/arrow/internal.cjs +30 -0
- package/dist/arrow/internal.cjs.map +6 -0
- package/dist/arrow/internal.d.ts +19 -0
- package/dist/arrow/internal.d.ts.map +1 -0
- package/dist/arrow/internal.js +7 -0
- package/dist/arrow/internal.js.map +1 -0
- package/dist/dist.dev.js +283 -12
- package/dist/dist.min.js +29 -29
- package/dist/geospatial/geospatial-utils.cjs +12 -11
- package/dist/geospatial/geospatial-utils.d.ts +1 -1
- package/dist/geospatial/geospatial-utils.d.ts.map +1 -1
- package/dist/geospatial/geospatial-utils.js +3 -2
- package/dist/geospatial/geospatial-utils.js.map +1 -1
- package/dist/geospatial/index.cjs.map +2 -2
- package/dist/gpu-a5/index.cjs.map +1 -1
- package/dist/gpu-dggs/benchmarks.cjs.map +1 -1
- package/dist/gpu-dggs/gpu-dggs-cell-projection.cjs +2 -2
- package/dist/gpu-dggs/gpu-dggs-cell-projection.js +1 -1
- package/dist/gpu-dggs/gpu-dggs-cell-projection.js.map +1 -1
- package/dist/gpu-dggs/index.cjs.map +1 -1
- package/dist/gpu-h3/index.cjs.map +1 -1
- package/dist/gpu-project/benchmarks.cjs.map +2 -2
- package/dist/gpu-project/crs.cjs.map +2 -2
- package/dist/gpu-project/index.cjs.map +2 -2
- package/dist/gpu-project/projection-program.cjs +2 -2
- package/dist/gpu-project/projection-program.d.ts +1 -1
- package/dist/gpu-project/projection-program.d.ts.map +1 -1
- package/dist/gpu-project/projection-program.js +1 -1
- package/dist/gpu-project/projection-program.js.map +1 -1
- package/dist/gpu-sql/lu-sql.d.ts +1 -1
- package/dist/gpu-sql/lu-sql.js +1 -1
- package/dist/gpu-tables/engine/gpu-table-shader-bindings.d.ts +1 -1
- package/dist/gpu-tables/engine/gpu-table-shader-bindings.d.ts.map +1 -1
- package/dist/gpu-vector-search/index.cjs.map +1 -1
- package/dist/utils/assemble-compute-kernel.cjs +2 -2
- package/dist/utils/assemble-compute-kernel.d.ts +2 -1
- package/dist/utils/assemble-compute-kernel.d.ts.map +1 -1
- package/dist/utils/assemble-compute-kernel.js +2 -2
- package/dist/utils/assemble-compute-kernel.js.map +1 -1
- package/package.json +19 -7
- package/src/arrow/dggs/dggs-gpu-polygons.ts +820 -0
- package/src/arrow/geoarrow/arrow-geoarrow-adapter.ts +519 -0
- package/src/arrow/geoarrow/arrow-geoarrow-conversion.ts +415 -0
- package/src/arrow/geoarrow/arrow-polygon-tessellation.ts +369 -0
- package/src/arrow/gpu/arrow-gpu-analytics-adapters.ts +474 -0
- package/src/arrow/gpu/arrow-gpu-analytics-readback.ts +294 -0
- package/src/arrow/gpu/arrow-gpu-table-adapters.ts +378 -0
- package/src/arrow/gpu/arrow-gpu-table-conversion.ts +324 -0
- package/src/arrow/gpu/arrow-input-schema.ts +98 -0
- package/src/arrow/index.ts +79 -0
- package/src/arrow/internal.ts +23 -0
- package/src/geospatial/geospatial-utils.ts +3 -7
- package/src/gpu-dggs/gpu-dggs-cell-projection.ts +1 -1
- package/src/gpu-project/projection-program.ts +1 -1
- package/src/gpu-sql/lu-sql.ts +1 -1
- package/src/gpu-tables/engine/gpu-table-shader-bindings.ts +1 -1
- package/src/utils/assemble-compute-kernel.ts +3 -7
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type Device } from '@luma.gl/core';
|
|
2
|
+
import { GPUVector } from '@luma.gl/gpgpu/gpu-data';
|
|
3
|
+
import { Uint64, Utf8, Vector } from 'apache-arrow';
|
|
4
|
+
export type DggsCellPathCoordinateFormat = 'float32' | 'fp64-split';
|
|
5
|
+
/** DGGS cell key encodings accepted by the GPU key and polygon helpers. */
|
|
6
|
+
export type DggsCellEncoding = 'geohash' | 'quadkey' | 's2' | 'a5' | 'h3';
|
|
7
|
+
/** Options for expanding DGGS Uint64 cell keys into GPU polygon paths. */
|
|
8
|
+
export type DggsCellPathGPUVectorOptions = {
|
|
9
|
+
/** Stable label used for transient and generated GPU resources. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Input cell key encoding. */
|
|
12
|
+
encoding: DggsCellEncoding;
|
|
13
|
+
/**
|
|
14
|
+
* Output coordinate layout. `fp64-split` emits [longitudeHigh, latitudeHigh,
|
|
15
|
+
* longitudeLow, latitudeLow], but DGGS decoding currently computes Float32
|
|
16
|
+
* coordinates so low components are zero.
|
|
17
|
+
*/
|
|
18
|
+
coordinateFormat?: DggsCellPathCoordinateFormat;
|
|
19
|
+
};
|
|
20
|
+
/** Options for parsing UTF-8 DGGS cell keys into Uint64 GPU keys. */
|
|
21
|
+
export type DggsCellKeyGPUVectorOptions = {
|
|
22
|
+
/** Stable label used for transient and generated GPU resources. */
|
|
23
|
+
id?: string;
|
|
24
|
+
/** Input cell key encoding. */
|
|
25
|
+
encoding: DggsCellEncoding;
|
|
26
|
+
};
|
|
27
|
+
/** Prepared DGGS Uint64 keys plus transient allocation accounting. */
|
|
28
|
+
export type PreparedDggsCellKeyGPUVector = {
|
|
29
|
+
/** GPU-only Uint64 keys, encoded for the selected DGGS format. */
|
|
30
|
+
keys: GPUVector;
|
|
31
|
+
/** Bytes in the generated key buffer. */
|
|
32
|
+
keyByteLength: number;
|
|
33
|
+
/** Bytes in transient string byte, offset, and config buffers. */
|
|
34
|
+
transientByteLength: number;
|
|
35
|
+
/** Releases owned generated GPU key resources. */
|
|
36
|
+
destroy: () => void;
|
|
37
|
+
};
|
|
38
|
+
/** Prepared DGGS polygon paths plus generated allocation accounting. */
|
|
39
|
+
export type PreparedDggsCellPathGPUVector = {
|
|
40
|
+
/** GPU-only List<FixedSizeList<Float32>[2|4]> path polygons, one row per cell key. */
|
|
41
|
+
paths: GPUVector;
|
|
42
|
+
/** Boundary points generated per input cell, including the closing point. */
|
|
43
|
+
pointCount: number;
|
|
44
|
+
/** Bytes in the generated path coordinate buffer. */
|
|
45
|
+
pathByteLength: number;
|
|
46
|
+
/** Bytes in transient compute input buffers. */
|
|
47
|
+
transientByteLength: number;
|
|
48
|
+
/** Releases owned generated GPU path resources. */
|
|
49
|
+
destroy: () => void;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Packs a geohash string into a Uint64 key consumed by the DGGS WGSL helpers.
|
|
53
|
+
*
|
|
54
|
+
* The high 4 bits store length and the low 60 bits store 5-bit base32 codes.
|
|
55
|
+
*/
|
|
56
|
+
export declare function packDggsGeohashKey(geohash: string): bigint;
|
|
57
|
+
/**
|
|
58
|
+
* Packs a quadkey string into a Uint64 key consumed by the DGGS WGSL helpers.
|
|
59
|
+
*
|
|
60
|
+
* The high 6 bits store length and the low 58 bits store 2-bit base4 digits.
|
|
61
|
+
*/
|
|
62
|
+
export declare function packDggsQuadkeyKey(quadkey: string): bigint;
|
|
63
|
+
/** Creates an S2 CellId from a face and child-position digits, mainly for examples and tests. */
|
|
64
|
+
export declare function packDggsS2CellKey(face: number, childPositions: readonly number[]): bigint;
|
|
65
|
+
/** Normalizes a native A5 Uint64 cell id from a bigint or hexadecimal string. */
|
|
66
|
+
export declare function packDggsA5CellKey(cellId: bigint | string): bigint;
|
|
67
|
+
/** Normalizes a native H3 Uint64 cell id from a bigint or hexadecimal string. */
|
|
68
|
+
export declare function packDggsH3CellKey(cellId: bigint | string): bigint;
|
|
69
|
+
/** Expands prepared DGGS Uint64 keys into closed Float32 polygon paths on WebGPU. */
|
|
70
|
+
export declare function convertDggsCellKeysToGPUPaths(device: Device, keys: Vector<Uint64> | GPUVector, options: DggsCellPathGPUVectorOptions): PreparedDggsCellPathGPUVector;
|
|
71
|
+
/** Parses UTF-8 DGGS cell keys into GPU-only Uint64 keys on WebGPU. */
|
|
72
|
+
export declare function convertDggsCellIdsToGPUKeys(device: Device, strings: Vector<Utf8>, options: DggsCellKeyGPUVectorOptions): PreparedDggsCellKeyGPUVector;
|
|
73
|
+
/** Splits a Uint64 DGGS key into low/high Uint32 words for WGSL `vec2<u32>` inputs. */
|
|
74
|
+
export declare function getDggsUint64Words(value: bigint): [number, number];
|
|
75
|
+
//# sourceMappingURL=dggs-gpu-polygons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dggs-gpu-polygons.d.ts","sourceRoot":"","sources":["../../../src/arrow/dggs/dggs-gpu-polygons.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuB,KAAK,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