@loaders.gl/core 5.0.0-beta.8 → 5.0.0-rc.1
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/GEOARROW-README.md +6 -0
- package/SCAN-README.md +2 -2
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +4 -1
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +1 -1
- package/dist/arrow-geometry/binary-features.js.map +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +270 -4
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +5 -4
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +198 -503
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +211 -218
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +166 -531
- package/dist/federated-table-scan-source.cjs.map +3 -3
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +5 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +1 -1
- package/dist/index.cjs +203 -197
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +7 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +2 -2
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +13 -12
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -5
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +55 -15
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +2 -5
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +2 -5
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +15 -24
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +7 -5
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -1
- package/dist/lib/loader-utils/native-arrow.js +34 -20
- package/dist/lib/loader-utils/native-arrow.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +7 -8
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +11 -105
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +126 -58
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +7 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +4 -2
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +0 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +2 -2
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +48 -3
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +12 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +17 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +15 -14
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +36 -22
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +0 -10
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +6 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +12 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +19 -67
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +2 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +4 -0
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +21 -9
- package/dist/loader-utils/tile-grid.cjs.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +32 -8
- package/dist/scan/arrow-execution/expressions.cjs.map +2 -2
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +15 -6
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +9 -5
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +7 -4
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +7 -8
- package/dist/scan/query-progressive.cjs.map +2 -2
- package/dist/scan/query-progressive.d.ts +5 -3
- package/dist/scan/query-progressive.d.ts.map +1 -1
- package/dist/scan/query-progressive.js +7 -8
- package/dist/scan/query-progressive.js.map +1 -1
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +195 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +47 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +201 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +118 -103
- package/dist/scan/query.cjs.map +2 -2
- package/dist/scan/query.d.ts +29 -22
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +111 -111
- package/dist/scan/query.js.map +1 -1
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +623 -860
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -7
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -6
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +3 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -76
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +241 -292
- package/dist/vector-table-scan-source.cjs.map +2 -2
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +4 -4
- package/dist/worker-utils/index.cjs.map +1 -1
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +4 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +2 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -13
- package/src/arrow-geometry/binary-features.ts +4 -1
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +5 -4
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +3 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +5 -2
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +2 -2
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/index.ts +1 -5
- package/src/lib/api/create-data-source.ts +15 -3
- package/src/lib/api/load-loader.ts +1 -1
- package/src/lib/api/load.ts +21 -25
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +2 -11
- package/src/lib/api/parse-in-batches.ts +81 -17
- package/src/lib/api/parse-sync.ts +3 -7
- package/src/lib/api/parse.ts +2 -6
- package/src/lib/api/select-loader.ts +15 -33
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/native-arrow.ts +38 -25
- package/src/lib/loader-utils/option-defaults.ts +7 -8
- package/src/lib/loader-utils/option-utils.ts +12 -112
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +17 -2
- package/src/loader-utils/lib/log-utils/log.ts +2 -5
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +18 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +64 -43
- package/src/loader-utils/lib/sources/data-source.ts +0 -12
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +34 -18
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +12 -18
- package/src/loader-utils/loader-types.ts +23 -69
- package/src/loader-utils/source-types.ts +5 -0
- package/src/null-loader.ts +1 -20
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +34 -10
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +12 -13
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +210 -165
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +7 -7
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -16
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +0 -28
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +0 -26
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +0 -58
|
@@ -3,24 +3,11 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {getFloat16Storage, isNativeFloat16Array} from '@loaders.gl/core/schema';
|
|
6
|
-
import type {
|
|
7
|
-
BigTypedArray,
|
|
8
|
-
Mesh,
|
|
9
|
-
MeshAttribute,
|
|
10
|
-
MeshArrowTable,
|
|
11
|
-
MeshTable,
|
|
12
|
-
ArrowTable,
|
|
13
|
-
ColumnarTable,
|
|
14
|
-
Schema
|
|
15
|
-
} from '@loaders.gl/core/schema';
|
|
6
|
+
import type {BigTypedArray, Mesh, MeshAttribute, MeshTable, Schema} from '@loaders.gl/core/schema';
|
|
16
7
|
import {indexedMeshArrowSchema, meshArrowSchema} from '@loaders.gl/core/schema';
|
|
17
8
|
import * as arrow from 'apache-arrow';
|
|
18
9
|
import {getFixedSizeListVector} from '../arrow-utils/arrow-fixed-size-list-utils';
|
|
19
|
-
import {
|
|
20
|
-
deserializeArrowField,
|
|
21
|
-
deserializeArrowMetadata,
|
|
22
|
-
serializeArrowSchema
|
|
23
|
-
} from '../schema/convert-arrow-schema';
|
|
10
|
+
import {deserializeArrowField, deserializeArrowMetadata} from '../schema/convert-arrow-schema';
|
|
24
11
|
|
|
25
12
|
/** Arrow column inputs, including exact 64-bit integers that are not GPU attributes. */
|
|
26
13
|
export type MeshArrowAttributes = Record<
|
|
@@ -57,7 +44,7 @@ export type MeshArrowTableOptions = {
|
|
|
57
44
|
/** Convert a mesh to a columnar table. */
|
|
58
45
|
export function convertMeshToTable(mesh: Mesh, shape: 'columnar-table'): MeshTable;
|
|
59
46
|
/** Convert a mesh to an Apache Arrow table. */
|
|
60
|
-
export function convertMeshToTable(mesh: Mesh, shape: 'arrow
|
|
47
|
+
export function convertMeshToTable(mesh: Mesh, shape: 'arrow'): arrow.Table;
|
|
61
48
|
|
|
62
49
|
/**
|
|
63
50
|
* Convert a mesh to a specific table shape.
|
|
@@ -67,12 +54,12 @@ export function convertMeshToTable(mesh: Mesh, shape: 'arrow-table'): MeshArrowT
|
|
|
67
54
|
*/
|
|
68
55
|
export function convertMeshToTable(
|
|
69
56
|
mesh: Mesh,
|
|
70
|
-
shape: 'columnar-table' | 'arrow
|
|
71
|
-
):
|
|
57
|
+
shape: 'columnar-table' | 'arrow'
|
|
58
|
+
): MeshTable | arrow.Table {
|
|
72
59
|
switch (shape) {
|
|
73
60
|
case 'columnar-table':
|
|
74
61
|
return convertMeshToColumnarTable(mesh);
|
|
75
|
-
case 'arrow
|
|
62
|
+
case 'arrow':
|
|
76
63
|
return convertMeshToArrowTable(mesh);
|
|
77
64
|
default:
|
|
78
65
|
throw new Error(shape);
|
|
@@ -101,13 +88,8 @@ export function convertMeshToColumnarTable(mesh: Mesh): MeshTable {
|
|
|
101
88
|
};
|
|
102
89
|
}
|
|
103
90
|
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
* @param mesh Mesh to convert.
|
|
107
|
-
* @param batchSize Reserved for future chunked Arrow conversion.
|
|
108
|
-
* @returns Mesh data as an Apache Arrow table wrapper.
|
|
109
|
-
*/
|
|
110
|
-
export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): MeshArrowTable {
|
|
91
|
+
/** Builds a native Apache Arrow mesh table, including topology, indices, and bounds. */
|
|
92
|
+
export function convertMeshToArrowTable(mesh: Mesh): arrow.Table {
|
|
111
93
|
return makeMeshArrowTable(mesh.attributes, {
|
|
112
94
|
schema: mesh.schema,
|
|
113
95
|
topology: mesh.topology,
|
|
@@ -118,15 +100,15 @@ export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): MeshArr
|
|
|
118
100
|
}
|
|
119
101
|
|
|
120
102
|
/**
|
|
121
|
-
*
|
|
103
|
+
* Creates a native Apache Arrow mesh table from typed attributes.
|
|
122
104
|
* @param attributes Mesh attributes to expose as Arrow columns.
|
|
123
105
|
* @param options Mesh table metadata and optional schema.
|
|
124
|
-
* @returns
|
|
106
|
+
* @returns The Arrow table with mesh topology, bounds, and optional indices.
|
|
125
107
|
*/
|
|
126
108
|
export function makeMeshArrowTable(
|
|
127
109
|
attributes: MeshArrowAttributes,
|
|
128
110
|
options: MeshArrowTableOptions = {}
|
|
129
|
-
):
|
|
111
|
+
): arrow.Table {
|
|
130
112
|
const fields: arrow.Field[] = [];
|
|
131
113
|
const columns: {[columnName: string]: arrow.Vector} = {};
|
|
132
114
|
const attributeNames = getOrderedAttributeNames(attributes);
|
|
@@ -141,7 +123,7 @@ export function makeMeshArrowTable(
|
|
|
141
123
|
getAttributeArrowField(options.schema, attributeName, column, attribute.componentType)
|
|
142
124
|
);
|
|
143
125
|
|
|
144
|
-
if (attributeName ===
|
|
126
|
+
if (attributeName === attributeNames[0] && options.indices?.value?.length) {
|
|
145
127
|
const indicesField = indexedMeshArrowSchema.fields.find(field => field.name === 'indices')!;
|
|
146
128
|
columns.indices = getIndicesVector(options.indices.value, column.length, indicesField.type);
|
|
147
129
|
fields.push(indicesField);
|
|
@@ -151,19 +133,9 @@ export function makeMeshArrowTable(
|
|
|
151
133
|
const arrowSchema = new arrow.Schema(fields, getMeshArrowMetadata(options));
|
|
152
134
|
// Arrow's column-object constructor synthesizes an incompatible batch schema for empty
|
|
153
135
|
// fixed-size-list vectors. A schema-only table preserves the declared mesh fields instead.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
: new arrow.Table(arrowSchema, columns);
|
|
158
|
-
const schema = serializeArrowSchema(table.schema);
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
shape: 'arrow-table',
|
|
162
|
-
schema,
|
|
163
|
-
data: table,
|
|
164
|
-
topology: options.topology || 'point-list',
|
|
165
|
-
indices: options.indices
|
|
166
|
-
};
|
|
136
|
+
return columns[attributeNames[0]]?.length === 0
|
|
137
|
+
? new arrow.Table(arrowSchema)
|
|
138
|
+
: new arrow.Table(arrowSchema, columns);
|
|
167
139
|
}
|
|
168
140
|
|
|
169
141
|
/** Return an Arrow vector for a mesh attribute. */
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import {createFloat16Array, getFloat16Value, setFloat16Value} from '@loaders.gl/core/schema';
|
|
6
|
-
import type {Mesh, MeshAttribute, ColumnarTable,
|
|
6
|
+
import type {Mesh, MeshAttribute, ColumnarTable, Schema} from '@loaders.gl/core/schema';
|
|
7
7
|
import * as arrow from 'apache-arrow';
|
|
8
8
|
import {getFixedSizeListSize} from '../arrow-utils/arrow-fixed-size-list-utils';
|
|
9
9
|
import {serializeArrowSchema} from '../schema/convert-arrow-schema';
|
|
10
|
+
import {isArrowTable} from '../../../lib/loader-utils/native-arrow';
|
|
10
11
|
import {getMeshBoundingBox} from './mesh-utils';
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -14,26 +15,22 @@ import {getMeshBoundingBox} from './mesh-utils';
|
|
|
14
15
|
* @param table Table to convert.
|
|
15
16
|
* @returns Mesh reconstructed from the table.
|
|
16
17
|
*/
|
|
17
|
-
export function convertTableToMesh(table: ColumnarTable |
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// return convertColumnarTableToMesh(table);
|
|
21
|
-
case 'arrow-table':
|
|
22
|
-
return convertArrowTableToMesh(table);
|
|
23
|
-
default:
|
|
24
|
-
throw new Error(table.shape);
|
|
25
|
-
}
|
|
18
|
+
export function convertTableToMesh(table: ColumnarTable | arrow.Table): Mesh {
|
|
19
|
+
if (isArrowTable(table)) return convertArrowTableToMesh(table);
|
|
20
|
+
throw new Error(table.shape);
|
|
26
21
|
}
|
|
27
22
|
|
|
28
23
|
/**
|
|
29
24
|
* Convert an Apache Arrow mesh table to a loaders.gl Mesh.
|
|
30
|
-
* @param table Arrow table
|
|
25
|
+
* @param table Native Arrow table.
|
|
31
26
|
* @returns Mesh reconstructed from the Arrow table.
|
|
32
27
|
*/
|
|
33
|
-
export function convertArrowTableToMesh(
|
|
34
|
-
const arrowTable = table.data;
|
|
35
|
-
|
|
28
|
+
export function convertArrowTableToMesh(arrowTable: arrow.Table): Mesh {
|
|
36
29
|
const schema = serializeArrowSchema(arrowTable.schema);
|
|
30
|
+
// Legacy mesh batches describe their own vertices, not the cumulative stream extent.
|
|
31
|
+
const localBounds =
|
|
32
|
+
arrowTable.batches.length === 1 ? arrowTable.batches[0].metadata.get('boundingBox') : undefined;
|
|
33
|
+
if (localBounds) schema.metadata = {...schema.metadata, boundingBox: localBounds};
|
|
37
34
|
const fields = schema.fields;
|
|
38
35
|
|
|
39
36
|
const attributes: Mesh['attributes'] = {};
|
|
@@ -179,14 +176,20 @@ function getAttributeTypedArray(attributeData: arrow.Vector, size: number): any
|
|
|
179
176
|
return attributeData.toArray();
|
|
180
177
|
}
|
|
181
178
|
|
|
182
|
-
|
|
179
|
+
if (attributeData.length === 0) {
|
|
180
|
+
const EmptyStorage = attributeData.type.valueType.ArrayType;
|
|
181
|
+
return new EmptyStorage(0);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const values = attributeData.data.find(chunk => chunk.length > 0)!.children[0].values;
|
|
183
185
|
const TypedArrayConstructor = values.constructor as any;
|
|
184
186
|
const typedArray = new TypedArrayConstructor(attributeData.length * size);
|
|
185
187
|
let targetOffset = 0;
|
|
186
188
|
|
|
187
189
|
for (const data of attributeData.data) {
|
|
188
|
-
const child = data.children[0];
|
|
189
190
|
const sourceLength = data.length * size;
|
|
191
|
+
if (sourceLength === 0) continue;
|
|
192
|
+
const child = data.children[0];
|
|
190
193
|
const sourceOffset = child.offset || data.offset * size;
|
|
191
194
|
// Arrow chunks can either slice child values eagerly or retain offsets into the source buffer.
|
|
192
195
|
const sourceStart = sourceOffset + sourceLength <= child.values.length ? sourceOffset : 0;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {MeshAttributes} from '@loaders.gl/core/schema';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Holds an axis aligned bounding box
|
|
9
|
+
* TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)
|
|
10
|
+
*/
|
|
11
|
+
type BoundingBox = [[number, number, number], [number, number, number]];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get the (axis aligned) bounding box of a mesh
|
|
15
|
+
* @param attributes
|
|
16
|
+
* @returns array of two vectors representing the axis aligned bounding box
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line complexity
|
|
19
|
+
export function getMeshBoundingBox(attributes: MeshAttributes | null): BoundingBox | null {
|
|
20
|
+
const positionAttribute = attributes?.POSITION;
|
|
21
|
+
if (!positionAttribute || !('value' in positionAttribute) || !positionAttribute.value.length) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let minX = Infinity;
|
|
26
|
+
let minY = Infinity;
|
|
27
|
+
let minZ = Infinity;
|
|
28
|
+
let maxX = -Infinity;
|
|
29
|
+
let maxY = -Infinity;
|
|
30
|
+
let maxZ = -Infinity;
|
|
31
|
+
|
|
32
|
+
const positions = positionAttribute.value;
|
|
33
|
+
const len = positions.length;
|
|
34
|
+
|
|
35
|
+
for (let i = 0; i < len; i += 3) {
|
|
36
|
+
const x = positions[i];
|
|
37
|
+
const y = positions[i + 1];
|
|
38
|
+
const z = positions[i + 2];
|
|
39
|
+
|
|
40
|
+
minX = x < minX ? x : minX;
|
|
41
|
+
minY = y < minY ? y : minY;
|
|
42
|
+
minZ = z < minZ ? z : minZ;
|
|
43
|
+
|
|
44
|
+
maxX = x > maxX ? x : maxX;
|
|
45
|
+
maxY = y > maxY ? y : maxY;
|
|
46
|
+
maxZ = z > maxZ ? z : maxZ;
|
|
47
|
+
}
|
|
48
|
+
return [
|
|
49
|
+
[minX, minY, minZ],
|
|
50
|
+
[maxX, maxY, maxZ]
|
|
51
|
+
];
|
|
52
|
+
}
|
|
@@ -4,16 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
// Mesh category utilities
|
|
6
6
|
// TODO - move to mesh category module, or to math.gl/geometry module
|
|
7
|
-
import {
|
|
8
|
-
import {TypedArray} from '../../types/types';
|
|
7
|
+
import type {TypedArray} from '../../types/types';
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
export {getMeshBoundingBox} from './get-mesh-bounding-box';
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
* Holds an axis aligned bounding box
|
|
14
|
-
* TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)
|
|
15
|
-
*/
|
|
16
|
-
type BoundingBox = [[number, number, number], [number, number, number]];
|
|
11
|
+
type TypedArrays = {[key: string]: TypedArray};
|
|
17
12
|
|
|
18
13
|
/**
|
|
19
14
|
* Get number of vertices in mesh
|
|
@@ -30,44 +25,3 @@ export function getMeshSize(attributes: TypedArrays): number {
|
|
|
30
25
|
}
|
|
31
26
|
return size;
|
|
32
27
|
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Get the (axis aligned) bounding box of a mesh
|
|
36
|
-
* @param attributes
|
|
37
|
-
* @returns array of two vectors representing the axis aligned bounding box
|
|
38
|
-
*/
|
|
39
|
-
// eslint-disable-next-line complexity
|
|
40
|
-
export function getMeshBoundingBox(attributes: MeshAttributes | null): BoundingBox | null {
|
|
41
|
-
const positionAttribute = attributes?.POSITION;
|
|
42
|
-
if (!positionAttribute || !('value' in positionAttribute) || !positionAttribute.value.length) {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
let minX = Infinity;
|
|
47
|
-
let minY = Infinity;
|
|
48
|
-
let minZ = Infinity;
|
|
49
|
-
let maxX = -Infinity;
|
|
50
|
-
let maxY = -Infinity;
|
|
51
|
-
let maxZ = -Infinity;
|
|
52
|
-
|
|
53
|
-
const positions = positionAttribute.value;
|
|
54
|
-
const len = positions.length;
|
|
55
|
-
|
|
56
|
-
for (let i = 0; i < len; i += 3) {
|
|
57
|
-
const x = positions[i];
|
|
58
|
-
const y = positions[i + 1];
|
|
59
|
-
const z = positions[i + 2];
|
|
60
|
-
|
|
61
|
-
minX = x < minX ? x : minX;
|
|
62
|
-
minY = y < minY ? y : minY;
|
|
63
|
-
minZ = z < minZ ? z : minZ;
|
|
64
|
-
|
|
65
|
-
maxX = x > maxX ? x : maxX;
|
|
66
|
-
maxY = y > maxY ? y : maxY;
|
|
67
|
-
maxZ = z > maxZ ? z : maxZ;
|
|
68
|
-
}
|
|
69
|
-
return [
|
|
70
|
-
[minX, minY, minZ],
|
|
71
|
-
[maxX, maxY, maxZ]
|
|
72
|
-
];
|
|
73
|
-
}
|
|
@@ -243,7 +243,8 @@ export class PointCloudTiler {
|
|
|
243
243
|
/** Validates the decoded profile and creates a root cube from finite native coordinates. */
|
|
244
244
|
private async initialize(input: Mesh | MeshArrowTable): Promise<void> {
|
|
245
245
|
this.signal.throwIfAborted();
|
|
246
|
-
if ('
|
|
246
|
+
if (!('attributes' in input)) {
|
|
247
|
+
const table = input;
|
|
247
248
|
const buffers = new Set<ArrayBufferLike>();
|
|
248
249
|
let arrowBytes = 0;
|
|
249
250
|
/** Counts retained Arrow buffers and rejects null child values before conversion. */
|
|
@@ -260,15 +261,15 @@ export class PointCloudTiler {
|
|
|
260
261
|
if (data.dictionary)
|
|
261
262
|
for (const dictionaryData of data.dictionary.data) checkData(dictionaryData);
|
|
262
263
|
};
|
|
263
|
-
for (const batch of
|
|
264
|
+
for (const batch of table.batches) checkData(batch.data);
|
|
264
265
|
if (arrowBytes > this.options.maxInputBytes)
|
|
265
266
|
throw new Error('PointCloudTiler: input byte budget exceeded');
|
|
266
|
-
for (const column of
|
|
267
|
-
if (
|
|
267
|
+
for (const column of table.schema.fields) {
|
|
268
|
+
if (table.getChild(column.name)?.nullCount)
|
|
268
269
|
throw new Error('PointCloudTiler: null point attributes require an explicit mapping');
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
|
-
const mesh = '
|
|
272
|
+
const mesh = 'attributes' in input ? input : convertTableToMesh(input);
|
|
272
273
|
if (mesh.topology !== 'point-list' || mesh.indices)
|
|
273
274
|
throw new Error('PointCloudTiler: unindexed point-list input required');
|
|
274
275
|
const position = mesh.attributes.POSITION;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
TypedArrayConstructor,
|
|
10
10
|
ArrayType
|
|
11
11
|
} from '@loaders.gl/core/schema';
|
|
12
|
-
import {getFloat16ArrayConstructor} from '@math.gl/core';
|
|
12
|
+
import {getFloat16ArrayConstructor} from '@math.gl/core/types';
|
|
13
13
|
|
|
14
14
|
/** Deduce column types from values */
|
|
15
15
|
export function getDataTypeFromValue(
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
// Type deduction
|
|
6
6
|
import type {Schema, Field, ArrayType, Table} from '@loaders.gl/core/schema';
|
|
7
|
+
import type {Table as ArrowTable} from 'apache-arrow';
|
|
8
|
+
import {convertArrowToSchema} from './convert-arrow-schema';
|
|
7
9
|
import {getDataTypeFromArray, getDataTypeFromValue} from './data-type';
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -12,7 +14,8 @@ import {getDataTypeFromArray, getDataTypeFromValue} from './data-type';
|
|
|
12
14
|
* @param {*} schema
|
|
13
15
|
* @returns
|
|
14
16
|
*/
|
|
15
|
-
export function deduceTableSchema(table: Table): Schema {
|
|
17
|
+
export function deduceTableSchema(table: Table | ArrowTable): Schema {
|
|
18
|
+
if (!('shape' in table)) return convertArrowToSchema(table.schema);
|
|
16
19
|
switch (table.shape) {
|
|
17
20
|
case 'array-row-table':
|
|
18
21
|
case 'object-row-table':
|
|
@@ -24,7 +27,6 @@ export function deduceTableSchema(table: Table): Schema {
|
|
|
24
27
|
case 'columnar-table':
|
|
25
28
|
return deduceSchemaFromColumns(table.data);
|
|
26
29
|
|
|
27
|
-
case 'arrow-table':
|
|
28
30
|
default:
|
|
29
31
|
throw new Error('Deduce schema');
|
|
30
32
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import type * as arrow from 'apache-arrow';
|
|
5
6
|
import type {Table} from '@loaders.gl/core/schema';
|
|
6
7
|
|
|
7
8
|
import {ArrowLikeSchema} from './arrow-like-schema';
|
|
@@ -20,10 +21,10 @@ import {
|
|
|
20
21
|
} from '../tables/table-accessors';
|
|
21
22
|
|
|
22
23
|
class ArrowLikeVector {
|
|
23
|
-
table: Table;
|
|
24
|
+
table: Table | arrow.Table;
|
|
24
25
|
columnName: string;
|
|
25
26
|
|
|
26
|
-
constructor(table: Table, columnName: string) {
|
|
27
|
+
constructor(table: Table | arrow.Table, columnName: string) {
|
|
27
28
|
this.table = table;
|
|
28
29
|
this.columnName = columnName;
|
|
29
30
|
}
|
|
@@ -33,10 +34,8 @@ class ArrowLikeVector {
|
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
toArray(): ArrayLike<unknown> {
|
|
37
|
+
if (!('shape' in this.table)) return this.table.getChild(this.columnName)?.toArray();
|
|
36
38
|
switch (this.table.shape) {
|
|
37
|
-
case 'arrow-table':
|
|
38
|
-
const arrowTable = this.table.data as any;
|
|
39
|
-
return arrowTable.getChild(this.columnName)?.toArray();
|
|
40
39
|
case 'columnar-table':
|
|
41
40
|
return this.table.data[this.columnName];
|
|
42
41
|
default:
|
|
@@ -51,12 +50,13 @@ class ArrowLikeVector {
|
|
|
51
50
|
*/
|
|
52
51
|
export class ArrowLikeTable {
|
|
53
52
|
schema: ArrowLikeSchema;
|
|
54
|
-
table: Table;
|
|
53
|
+
table: Table | arrow.Table;
|
|
55
54
|
|
|
56
|
-
constructor(table: Table) {
|
|
57
|
-
const schema =
|
|
55
|
+
constructor(table: Table | arrow.Table) {
|
|
56
|
+
const schema =
|
|
57
|
+
'shape' in table ? table.schema || deduceTableSchema(table) : deduceTableSchema(table);
|
|
58
58
|
this.schema = new ArrowLikeSchema(schema.fields, schema.metadata);
|
|
59
|
-
this.table = {...table, schema};
|
|
59
|
+
this.table = 'shape' in table ? {...table, schema} : table;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// get schema() {
|
|
@@ -64,6 +64,7 @@ export class ArrowLikeTable {
|
|
|
64
64
|
// }
|
|
65
65
|
|
|
66
66
|
get data() {
|
|
67
|
+
if (!('shape' in this.table)) return this.table;
|
|
67
68
|
return this.table.shape === 'geojson-table' ? this.table.features : this.table.data;
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import {snapshotArrowSchema} from '../../arrow/arrow-metadata';
|
|
6
|
+
import type {Schema} from '@loaders.gl/core/schema';
|
|
6
7
|
import * as arrow from 'apache-arrow';
|
|
7
8
|
import {
|
|
8
9
|
convertArrowToSchema,
|
|
@@ -27,7 +28,7 @@ export class ArrowTableBuilder {
|
|
|
27
28
|
? convertArrowToSchema(this.arrowSchema)
|
|
28
29
|
: schema;
|
|
29
30
|
this.arrowBuilders = this.arrowSchema.fields.map(field =>
|
|
30
|
-
arrow.makeBuilder({type: field.type, nullValues: [null]})
|
|
31
|
+
arrow.makeBuilder({type: field.type, nullValues: [null, undefined]})
|
|
31
32
|
);
|
|
32
33
|
this.length = 0;
|
|
33
34
|
}
|
|
@@ -51,62 +52,28 @@ export class ArrowTableBuilder {
|
|
|
51
52
|
this.length++;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
/**
|
|
55
|
-
firstBatch():
|
|
56
|
-
|
|
57
|
-
// If there is data, a batch will be sent later
|
|
58
|
-
if (arrowRecordBatch.numCols !== 0) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
shape: 'arrow-table',
|
|
63
|
-
batchType: 'data',
|
|
64
|
-
length: arrowRecordBatch.numRows,
|
|
65
|
-
schema: this.schema,
|
|
66
|
-
data: new arrow.Table(arrowRecordBatch)
|
|
67
|
-
};
|
|
55
|
+
/** Emits the declared schema before any rows are buffered. */
|
|
56
|
+
firstBatch(): arrow.RecordBatch | null {
|
|
57
|
+
return this.length === 0 ? this._getArrowRecordBatch() : null;
|
|
68
58
|
}
|
|
69
59
|
|
|
70
|
-
/**
|
|
71
|
-
flushBatch():
|
|
72
|
-
|
|
73
|
-
if (arrowRecordBatch.numCols === 0) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
shape: 'arrow-table',
|
|
78
|
-
batchType: 'data',
|
|
79
|
-
length: arrowRecordBatch.numRows,
|
|
80
|
-
schema: this.schema,
|
|
81
|
-
data: new arrow.Table(arrowRecordBatch)
|
|
82
|
-
};
|
|
60
|
+
/** Flushes the buffered rows as a native record batch. */
|
|
61
|
+
flushBatch(): arrow.RecordBatch | null {
|
|
62
|
+
return this.length === 0 ? null : this._getArrowRecordBatch();
|
|
83
63
|
}
|
|
84
64
|
|
|
85
|
-
/**
|
|
86
|
-
finishBatch():
|
|
87
|
-
const
|
|
65
|
+
/** Finishes the builders and returns the final native batch when it has rows or fields. */
|
|
66
|
+
finishBatch(): arrow.RecordBatch | null {
|
|
67
|
+
const batch = this._getArrowRecordBatch();
|
|
88
68
|
this.arrowBuilders.forEach(builder => builder.finish());
|
|
89
|
-
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
return {
|
|
93
|
-
shape: 'arrow-table',
|
|
94
|
-
batchType: 'data',
|
|
95
|
-
length: arrowRecordBatch.numRows,
|
|
96
|
-
schema: this.schema,
|
|
97
|
-
data: new arrow.Table(arrowRecordBatch)
|
|
98
|
-
};
|
|
69
|
+
return batch.numCols || batch.numRows ? batch : null;
|
|
99
70
|
}
|
|
100
71
|
|
|
101
|
-
/**
|
|
102
|
-
finishTable():
|
|
103
|
-
const
|
|
72
|
+
/** Finishes the builders and returns a native Arrow table. */
|
|
73
|
+
finishTable(): arrow.Table {
|
|
74
|
+
const batch = this._getArrowRecordBatch();
|
|
104
75
|
this.arrowBuilders.forEach(builder => builder.finish());
|
|
105
|
-
return
|
|
106
|
-
shape: 'arrow-table',
|
|
107
|
-
schema: this.schema,
|
|
108
|
-
data: new arrow.Table(arrowRecordBatch)
|
|
109
|
-
};
|
|
76
|
+
return new arrow.Table(batch);
|
|
110
77
|
}
|
|
111
78
|
|
|
112
79
|
/** Extract a record batch flushing the currently accumulated data in the builders */
|
|
@@ -117,7 +84,10 @@ export class ArrowTableBuilder {
|
|
|
117
84
|
this.length = 0;
|
|
118
85
|
const structField = new arrow.Struct(arrowSchema.fields);
|
|
119
86
|
const arrowStructData = new arrow.Data(structField, 0, length, 0, undefined, arrowDatas);
|
|
120
|
-
const arrowRecordBatch = new arrow.RecordBatch(
|
|
87
|
+
const arrowRecordBatch = new arrow.RecordBatch(
|
|
88
|
+
snapshotArrowSchema(arrowSchema),
|
|
89
|
+
arrowStructData
|
|
90
|
+
);
|
|
121
91
|
return arrowRecordBatch;
|
|
122
92
|
}
|
|
123
93
|
}
|