@loaders.gl/core 5.0.0-beta.1 → 5.0.0-beta.11
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 +1 -1
- package/README.md +4 -2
- package/SCAN-README.md +3 -3
- package/SCHEMA-UTILS-README.md +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 +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- 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/index.cjs +0 -11
- package/dist/arrow-geometry/index.cjs.map +2 -2
- package/dist/arrow-geometry/index.d.ts +0 -1
- package/dist/arrow-geometry/index.d.ts.map +1 -1
- package/dist/arrow-geometry/index.js +0 -1
- package/dist/arrow-geometry/index.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 +105 -0
- package/dist/arrow-worker-transport.cjs.map +6 -0
- package/dist/arrow-worker-transport.d.ts +11 -0
- package/dist/arrow-worker-transport.d.ts.map +1 -0
- package/dist/arrow-worker-transport.js +77 -0
- package/dist/arrow-worker-transport.js.map +1 -0
- package/dist/cluster-source.cjs +6874 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/dist.dev.js +3040 -817
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2409 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- 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/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +2 -2
- 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 +8 -8
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +2 -2
- 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 +11 -12
- 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 +10 -13
- 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/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 +4 -8
- 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.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.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/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 +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +746 -1365
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- 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 +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.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/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- 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 +9 -10
- 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 +31 -114
- 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 +854 -1295
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +17 -8
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +9 -5
- 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/files/http-file-transport.d.ts +4 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.js +45 -1
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-types.d.ts +2 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/read-range-response.d.ts +3 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.js +62 -0
- package/dist/loader-utils/lib/files/read-range-response.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- 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/logical-table-query.d.ts +43 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +104 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/{experimental-scan-options.d.ts → query-options.d.ts} +5 -8
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts.map +1 -0
- package/dist/{schema-utils/lib/table/batch-builder/table-batch-aggregator.js → loader-utils/lib/scan-utils/query-options.js} +1 -1
- package/dist/loader-utils/lib/scan-utils/query-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +58 -18
- 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 +17 -6
- 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 +54 -3
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- 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 +18 -12
- 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 +58 -29
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts +4 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +53 -14
- 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 +31 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -0
- package/dist/loader-utils/lib/{scan-utils/experimental-scan-options.js → sources/table-source-collection.js} +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.js.map +1 -0
- 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/encode-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +2 -5
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.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 +40 -21
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +118 -91
- 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 +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.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 +771 -82
- package/dist/null-worker.js +742 -81
- package/dist/polyfills/images/encode-image-node.d.ts +18 -15
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/encode-image-node.js +19 -33
- package/dist/polyfills/images/encode-image-node.js.map +1 -1
- package/dist/polyfills/images/image-codecs-node.d.ts +2 -6
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -1
- package/dist/polyfills/images/image-codecs-node.js +2 -24
- package/dist/polyfills/images/image-codecs-node.js.map +1 -1
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +1 -1
- package/dist/polyfills/images/node-image-bitmap.js +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -1
- package/dist/polyfills/images/node-image-formats.js +10 -4
- package/dist/polyfills/images/node-image-formats.js.map +1 -1
- package/dist/polyfills/images/parse-image-node.d.ts +10 -2
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/parse-image-node.js +20 -32
- package/dist/polyfills/images/parse-image-node.js.map +1 -1
- package/dist/polyfills/index.cjs +76 -151
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +134 -0
- package/dist/scan/arrow-execution/expressions.cjs.map +7 -0
- package/dist/scan/arrow-execution/expressions.d.ts +11 -0
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -0
- package/dist/scan/arrow-execution/expressions.js +86 -0
- package/dist/scan/arrow-execution/expressions.js.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +255 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts +18 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js +224 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs +70 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts +8 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.js +39 -0
- package/dist/scan/arrow-execution/project-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution.cjs +34 -0
- package/dist/scan/arrow-execution.cjs.map +7 -0
- package/dist/scan/arrow-execution.d.ts +4 -0
- package/dist/scan/arrow-execution.d.ts.map +1 -0
- package/dist/scan/arrow-execution.js +6 -0
- package/dist/scan/arrow-execution.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.map +1 -1
- package/dist/scan/arrow-query.d.ts +1 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/catalog-query-source.cjs +122 -0
- package/dist/scan/catalog-query-source.cjs.map +7 -0
- package/dist/scan/catalog-query-source.d.ts +6 -0
- package/dist/scan/catalog-query-source.d.ts.map +1 -0
- package/dist/scan/catalog-query-source.js +115 -0
- package/dist/scan/catalog-query-source.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +42 -43
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +6 -10
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +39 -40
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +213 -6
- package/dist/scan/index.cjs.map +4 -4
- package/dist/scan/index.d.ts +15 -4
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -2
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +3 -294
- package/dist/scan/parse-sql-predicate.cjs.map +3 -3
- package/dist/scan/parse-sql-predicate.d.ts +6 -9
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -1
- package/dist/scan/parse-sql-predicate.js +5 -314
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +75 -0
- package/dist/scan/query-arrow-table-in-batches.cjs.map +7 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts +8 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.js +54 -0
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +65 -202
- package/dist/scan/query-arrow-table.cjs.map +3 -3
- package/dist/scan/query-arrow-table.d.ts +7 -40
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +51 -211
- package/dist/scan/query-arrow-table.js.map +1 -1
- 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 +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +39 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- 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 +140 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +35 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +120 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +385 -0
- package/dist/scan/query.cjs.map +7 -0
- package/dist/scan/query.d.ts +67 -0
- package/dist/scan/query.d.ts.map +1 -0
- package/dist/scan/query.js +402 -0
- package/dist/scan/query.js.map +1 -0
- package/dist/scan/resolve-query-source.cjs +59 -0
- package/dist/scan/resolve-query-source.cjs.map +7 -0
- package/dist/scan/resolve-query-source.d.ts +6 -0
- package/dist/scan/resolve-query-source.d.ts.map +1 -0
- package/dist/scan/resolve-query-source.js +37 -0
- package/dist/scan/resolve-query-source.js.map +1 -0
- 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.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.map +1 -1
- package/dist/scan/sql-catalog.cjs +110 -0
- package/dist/scan/sql-catalog.cjs.map +7 -0
- package/dist/scan/sql-catalog.d.ts +47 -0
- package/dist/scan/sql-catalog.d.ts.map +1 -0
- package/dist/scan/sql-catalog.js +97 -0
- package/dist/scan/sql-catalog.js.map +1 -0
- package/dist/scan/table-query.cjs.map +2 -2
- package/dist/scan/table-query.d.ts +4 -1
- package/dist/scan/table-query.d.ts.map +1 -1
- package/dist/scan/table-query.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/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 +3 -6
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +11 -7
- 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 +404 -620
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- 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/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/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 +7 -3
- 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 +13 -75
- 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/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.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 +1766 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/worker-utils/index.cjs +407 -1184
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/index.d.ts +2 -8
- package/dist/worker-utils/index.d.ts.map +1 -1
- package/dist/worker-utils/index.js +1 -10
- package/dist/worker-utils/index.js.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/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +3 -2
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +5 -7
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.js +76 -146
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +17 -45
- 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 +214 -312
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts +36 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js +23 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +3 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js +836 -147
- package/dist/worker-utils/null-worker-node.js.map +4 -4
- package/dist/worker-utils/null-worker.js +804 -143
- package/dist/worker-utils/null-worker.js.map +4 -4
- package/dist/worker-utils/types.d.ts +55 -72
- package/dist/worker-utils/types.d.ts.map +1 -1
- package/package.json +141 -35
- 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 +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/index.ts +0 -9
- 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 +126 -0
- package/src/cluster-source.ts +1 -0
- package/src/federated-table-scan-source.ts +1 -0
- 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/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +3 -3
- 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 +16 -16
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- 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 +4 -11
- 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/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +3 -2
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +50 -10
- package/src/loader-utils/lib/files/http-file-transport.ts +65 -1
- package/src/loader-utils/lib/files/http-file-types.ts +2 -0
- package/src/loader-utils/lib/files/read-range-response.ts +66 -0
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- 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/logical-table-query.ts +174 -0
- package/src/loader-utils/lib/scan-utils/query-options.ts +44 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +81 -28
- package/src/loader-utils/lib/scan-utils/table-query.ts +76 -8
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +101 -53
- package/src/loader-utils/lib/sources/data-source.ts +57 -16
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +39 -0
- 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/encode-with-worker.ts +5 -6
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +41 -24
- package/src/loader-utils/loader-types.ts +190 -111
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/README.md +2 -2
- package/src/polyfills/images/encode-image-node.ts +44 -37
- package/src/polyfills/images/image-codecs-node.ts +2 -37
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +1 -1
- package/src/polyfills/images/node-image-formats.ts +10 -4
- package/src/polyfills/images/parse-image-node.ts +31 -40
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +116 -0
- package/src/scan/arrow-execution/filter-arrow-table.ts +298 -0
- package/src/scan/arrow-execution/project-arrow-table.ts +53 -0
- package/src/scan/arrow-execution.ts +7 -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 -0
- package/src/scan/catalog-query-source.ts +132 -0
- package/src/scan/federated-table-scan-source.ts +67 -78
- package/src/scan/index.ts +64 -6
- package/src/scan/parse-sql-predicate.ts +14 -367
- package/src/scan/query-arrow-table-in-batches.ts +55 -0
- package/src/scan/query-arrow-table.ts +81 -271
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +229 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +199 -0
- package/src/scan/query.ts +594 -0
- package/src/scan/resolve-query-source.ts +47 -0
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +6 -6
- package/src/scan/sql-catalog.ts +167 -0
- package/src/scan/table-query.ts +6 -1
- 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/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +8 -19
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +19 -10
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- 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/deduce-table-schema.ts +8 -4
- 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 +27 -95
- 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/row-utils.ts +2 -2
- 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/vector-table-scan-source.ts +1 -0
- package/src/worker-utils/index.ts +2 -18
- package/src/worker-utils/lib/library-utils/library-utils.ts +3 -2
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/create-worker.ts +89 -188
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +246 -402
- package/src/worker-utils/lib/worker-api/task-runtime.ts +66 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +2 -0
- package/src/worker-utils/types.ts +74 -109
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs +0 -477
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts +0 -29
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js +0 -434
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs +0 -39
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts +0 -2
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js +0 -5
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.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/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.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/arrow-transport.cjs +0 -691
- package/dist/schema-utils/arrow-transport.cjs.map +0 -6
- package/dist/schema-utils/arrow-transport.d.ts +0 -4
- package/dist/schema-utils/arrow-transport.d.ts.map +0 -1
- package/dist/schema-utils/arrow-transport.js +0 -7
- package/dist/schema-utils/arrow-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +0 -76
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +0 -182
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +0 -33
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +0 -134
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.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.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +0 -32
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.js +0 -91
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +0 -20
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.js +0 -131
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +0 -58
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +0 -116
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +0 -34
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.js +0 -74
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +0 -94
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +0 -246
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +0 -67
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +0 -175
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +0 -1
- package/src/arrow-geometry/arrow-geoarrow-adapter.ts +0 -568
- package/src/geoarrow/lib/arrow-geoarrow-adapter.ts +0 -12
- 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/loader-utils/lib/scan-utils/experimental-scan-options.ts +0 -46
- package/src/polyfills/images/encode-image.node.ts.disabled +0 -41
- package/src/polyfills/images/parse-image.node.ts.disabled +0 -55
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/arrow-transport.ts +0 -7
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +0 -282
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +0 -247
- 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/worker-utils/lib/async-queue/async-queue.ts +0 -100
- package/src/worker-utils/lib/worker-farm/worker-body.ts +0 -145
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +0 -144
- package/src/worker-utils/lib/worker-farm/worker-job.ts +0 -85
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +0 -316
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +0 -206
|
@@ -2,44 +2,54 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
5
|
+
import type {Table as ApacheArrowTable, RecordBatch} from 'apache-arrow';
|
|
6
|
+
import type {TableBatch} from '@loaders.gl/core/schema';
|
|
7
|
+
import type {TableScanReadOptions, TableQueryExecutionSummary} from './scan-query-metadata';
|
|
8
|
+
import {emitQueryComplete} from './scan-query-metadata';
|
|
8
9
|
import {filterColumnarRowIndices, validateColumnarPredicate} from './columnar-predicate';
|
|
9
|
-
import {validateTableQueryLimit} from './table-query';
|
|
10
|
+
import {validateTableQueryLimit, validateTableQueryOffset} from './table-query';
|
|
11
|
+
|
|
12
|
+
/** Physical batches handled by the shared scan executor. */
|
|
13
|
+
type ScanBatch = TableBatch | ApacheArrowTable | RecordBatch;
|
|
10
14
|
|
|
11
15
|
/** Reads source batches while allowing the shared executor to observe fetched bytes. */
|
|
12
|
-
export type TableScanBatchReader = (
|
|
16
|
+
export type TableScanBatchReader<BatchT = TableBatch> = (
|
|
13
17
|
signal?: AbortSignal,
|
|
14
18
|
onByteLength?: (byteLength: number) => void
|
|
15
|
-
) => AsyncIterable<
|
|
19
|
+
) => AsyncIterable<BatchT>;
|
|
16
20
|
|
|
17
21
|
/** Optional batch kernels for formats with a native vectorized predicate implementation. */
|
|
18
|
-
export type TableScanBatchOperators = Readonly<{
|
|
19
|
-
/** Applies a residual predicate
|
|
20
|
-
filter?: (
|
|
22
|
+
export type TableScanBatchOperators<BatchT = TableBatch> = Readonly<{
|
|
23
|
+
/** Applies a residual predicate locally or on a worker; async kernels must observe the signal. */
|
|
24
|
+
filter?: (
|
|
25
|
+
batch: BatchT,
|
|
26
|
+
predicate: TableScanReadOptions['predicate'],
|
|
27
|
+
signal?: AbortSignal
|
|
28
|
+
) => BatchT | Promise<BatchT>;
|
|
21
29
|
/** Applies a projection while preserving the source batch shape. */
|
|
22
|
-
project?: (batch:
|
|
30
|
+
project?: (batch: BatchT, columns?: readonly string[]) => BatchT;
|
|
23
31
|
}>;
|
|
24
32
|
|
|
25
|
-
/** Wraps an Arrow table in the standard single-result scan batch envelope. */
|
|
26
|
-
export function makeTableScanBatch(table: ArrowTable): ArrowTableBatch {
|
|
27
|
-
return {...table, batchType: 'data', length: table.data.numRows} as ArrowTableBatch;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
33
|
/**
|
|
31
|
-
* Executes the common residual table-scan stages for row and
|
|
34
|
+
* Executes the common residual table-scan stages for row, columnar, and native Arrow chunks.
|
|
35
|
+
* Native Arrow predicates require a format-supplied filter kernel.
|
|
32
36
|
*
|
|
33
37
|
* Format adapters provide only their parser-specific batch reader. Keeping filtering, projection,
|
|
34
38
|
* limits, cancellation, and telemetry here avoids copying the same executor into every format
|
|
35
39
|
* package while preserving each format's native batch shape.
|
|
36
40
|
*/
|
|
37
|
-
export async function* executeTableScanBatches(
|
|
38
|
-
readBatches: TableScanBatchReader
|
|
39
|
-
options: TableScanReadOptions
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
export async function* executeTableScanBatches<BatchT extends ScanBatch>(
|
|
42
|
+
readBatches: TableScanBatchReader<BatchT>,
|
|
43
|
+
options: TableScanReadOptions &
|
|
44
|
+
Readonly<{
|
|
45
|
+
/** Omits empty batches from the output stream. */
|
|
46
|
+
skipEmptyBatches?: boolean;
|
|
47
|
+
}> = {},
|
|
48
|
+
operators: TableScanBatchOperators<NoInfer<BatchT>> = {}
|
|
49
|
+
): AsyncIterable<BatchT> {
|
|
42
50
|
validateTableQueryLimit(options.limit);
|
|
51
|
+
validateTableQueryOffset(options.offset);
|
|
52
|
+
let skip = options.offset ?? 0;
|
|
43
53
|
const startedAt = Date.now();
|
|
44
54
|
let sourcesRead = 0;
|
|
45
55
|
let batchesRead = 0;
|
|
@@ -48,12 +58,13 @@ export async function* executeTableScanBatches(
|
|
|
48
58
|
let rowsRetained = 0;
|
|
49
59
|
let rowsReturned = 0;
|
|
50
60
|
let bytesFetched = 0;
|
|
51
|
-
let status:
|
|
52
|
-
let earlyTerminationReason:
|
|
61
|
+
let status: TableQueryExecutionSummary['status'] = 'early-terminated';
|
|
62
|
+
let earlyTerminationReason: TableQueryExecutionSummary['earlyTerminationReason'];
|
|
53
63
|
let executionError: unknown;
|
|
54
64
|
let remaining =
|
|
55
65
|
options.limit === undefined ? Number.POSITIVE_INFINITY : Math.max(0, options.limit);
|
|
56
66
|
try {
|
|
67
|
+
options.signal?.throwIfAborted();
|
|
57
68
|
if (remaining <= 0) {
|
|
58
69
|
earlyTerminationReason = 'limit';
|
|
59
70
|
return;
|
|
@@ -67,28 +78,43 @@ export async function* executeTableScanBatches(
|
|
|
67
78
|
earlyTerminationReason = 'limit';
|
|
68
79
|
return;
|
|
69
80
|
}
|
|
81
|
+
options.signal?.throwIfAborted();
|
|
70
82
|
batchesRead++;
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
const rowCount = getScanBatchRowCount(batch);
|
|
84
|
+
rowsRead += rowCount;
|
|
85
|
+
if (options.predicate && !operators.filter && !('shape' in batch)) {
|
|
86
|
+
throw new Error('Native Arrow scans require a filter kernel for residual predicates.');
|
|
87
|
+
}
|
|
88
|
+
const filteredBatch = operators.filter
|
|
89
|
+
? await operators.filter(batch, options.predicate, options.signal)
|
|
90
|
+
: (('shape' in batch ? filterTableBatch(batch, options.predicate) : batch) as BatchT);
|
|
91
|
+
options.signal?.throwIfAborted();
|
|
92
|
+
const filteredRowCount = getScanBatchRowCount(filteredBatch);
|
|
73
93
|
if (options.predicate) {
|
|
74
|
-
rowsTested +=
|
|
75
|
-
rowsRetained +=
|
|
94
|
+
rowsTested += rowCount;
|
|
95
|
+
rowsRetained += filteredRowCount;
|
|
76
96
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
81
|
-
if (projectedBatch.length <= remaining) {
|
|
82
|
-
remaining -= projectedBatch.length;
|
|
83
|
-
rowsReturned += projectedBatch.length;
|
|
84
|
-
yield projectedBatch;
|
|
85
|
-
} else {
|
|
86
|
-
const outputBatch = truncateTableBatch(projectedBatch, remaining);
|
|
87
|
-
rowsReturned += outputBatch.length;
|
|
88
|
-
earlyTerminationReason = 'limit';
|
|
89
|
-
yield outputBatch;
|
|
90
|
-
return;
|
|
97
|
+
if (skip >= filteredRowCount && (skip > 0 || options.skipEmptyBatches)) {
|
|
98
|
+
skip -= filteredRowCount;
|
|
99
|
+
continue;
|
|
91
100
|
}
|
|
101
|
+
const end = Math.min(filteredRowCount, skip + remaining);
|
|
102
|
+
const window =
|
|
103
|
+
skip || end < filteredRowCount
|
|
104
|
+
? (('shape' in filteredBatch
|
|
105
|
+
? sliceTableBatch(filteredBatch, skip, end)
|
|
106
|
+
: filteredBatch.slice(skip, end)) as BatchT)
|
|
107
|
+
: filteredBatch;
|
|
108
|
+
skip = 0;
|
|
109
|
+
const output = operators.project
|
|
110
|
+
? operators.project(window, options.columns)
|
|
111
|
+
: projectTableBatch(window, options.columns);
|
|
112
|
+
remaining -= getScanBatchRowCount(window);
|
|
113
|
+
rowsReturned += getScanBatchRowCount(output);
|
|
114
|
+
if (remaining === 0) earlyTerminationReason = 'limit';
|
|
115
|
+
yield output;
|
|
116
|
+
if (remaining === 0) return;
|
|
117
|
+
options.signal?.throwIfAborted();
|
|
92
118
|
}
|
|
93
119
|
status = 'completed';
|
|
94
120
|
} catch (error) {
|
|
@@ -99,8 +125,8 @@ export async function* executeTableScanBatches(
|
|
|
99
125
|
if (status === 'early-terminated' && !earlyTerminationReason) {
|
|
100
126
|
earlyTerminationReason = 'consumer-return';
|
|
101
127
|
}
|
|
102
|
-
|
|
103
|
-
options.
|
|
128
|
+
emitQueryComplete(
|
|
129
|
+
options.onQueryComplete,
|
|
104
130
|
Object.freeze({
|
|
105
131
|
status,
|
|
106
132
|
sourcesPlanned: 1,
|
|
@@ -123,10 +149,26 @@ export async function* executeTableScanBatches(
|
|
|
123
149
|
}
|
|
124
150
|
}
|
|
125
151
|
|
|
152
|
+
/** Reads the row count from native Arrow chunks and portable batch envelopes. */
|
|
153
|
+
function getScanBatchRowCount(batch: ScanBatch): number {
|
|
154
|
+
return 'shape' in batch ? batch.length : batch.numRows;
|
|
155
|
+
}
|
|
156
|
+
|
|
126
157
|
/** Truncates a batch without changing its native representation. */
|
|
127
|
-
export function truncateTableBatch
|
|
158
|
+
export function truncateTableBatch<BatchType extends ScanBatch>(
|
|
159
|
+
batch: BatchType,
|
|
160
|
+
length: number
|
|
161
|
+
): BatchType {
|
|
162
|
+
return (
|
|
163
|
+
'shape' in batch ? sliceTableBatch(batch, 0, length) : batch.slice(0, length)
|
|
164
|
+
) as BatchType;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Slices rows in a batch, preserving Arrow buffers and the batch shape. */
|
|
168
|
+
function sliceTableBatch(batch: TableBatch, start: number, end: number): TableBatch {
|
|
169
|
+
const length = end - start;
|
|
128
170
|
if (batch.shape === 'object-row-table' || batch.shape === 'array-row-table') {
|
|
129
|
-
return {...batch, data: batch.data.slice(
|
|
171
|
+
return {...batch, data: batch.data.slice(start, end), length} as TableBatch;
|
|
130
172
|
}
|
|
131
173
|
if (batch.shape === 'columnar-table') {
|
|
132
174
|
return {
|
|
@@ -134,36 +176,42 @@ export function truncateTableBatch(batch: TableBatch, length: number): TableBatc
|
|
|
134
176
|
data: Object.fromEntries(
|
|
135
177
|
Object.entries(batch.data).map(([name, values]) => [
|
|
136
178
|
name,
|
|
137
|
-
Array.from(values as ArrayLike<unknown>).slice(
|
|
179
|
+
Array.from(values as ArrayLike<unknown>).slice(start, end)
|
|
138
180
|
])
|
|
139
181
|
),
|
|
140
182
|
length
|
|
141
183
|
};
|
|
142
184
|
}
|
|
143
|
-
|
|
144
|
-
return {...batch, features: batch.features.slice(0, length), length};
|
|
185
|
+
return {...batch, features: batch.features.slice(start, end), length};
|
|
145
186
|
}
|
|
146
187
|
|
|
147
188
|
/** Projects a batch in the caller-requested order while preserving its shape. */
|
|
148
|
-
export function projectTableBatch
|
|
189
|
+
export function projectTableBatch<BatchType extends ScanBatch>(
|
|
190
|
+
batch: BatchType,
|
|
191
|
+
columns?: readonly string[]
|
|
192
|
+
): BatchType {
|
|
149
193
|
if (columns === undefined) return batch;
|
|
194
|
+
if (!('shape' in batch)) {
|
|
195
|
+
const indices = columns
|
|
196
|
+
.map(column => batch.schema.fields.findIndex(field => field.name === column))
|
|
197
|
+
.filter(index => index >= 0);
|
|
198
|
+
return batch.selectAt(indices) as BatchType;
|
|
199
|
+
}
|
|
150
200
|
const schema = projectTableSchema(batch, columns);
|
|
151
201
|
if (batch.shape === 'object-row-table') {
|
|
152
202
|
return {
|
|
153
203
|
...batch,
|
|
154
204
|
schema,
|
|
155
205
|
data: batch.data.map(row => Object.fromEntries(columns.map(column => [column, row[column]])))
|
|
156
|
-
} as
|
|
206
|
+
} as BatchType;
|
|
157
207
|
}
|
|
158
208
|
if (batch.shape === 'columnar-table') {
|
|
159
209
|
return {
|
|
160
210
|
...batch,
|
|
161
211
|
schema,
|
|
162
212
|
data: Object.fromEntries(columns.map(column => [column, batch.data[column]]))
|
|
163
|
-
};
|
|
213
|
+
} as BatchType;
|
|
164
214
|
}
|
|
165
|
-
if (batch.shape === 'arrow-table')
|
|
166
|
-
return {...batch, schema, data: batch.data.select([...columns])};
|
|
167
215
|
return batch;
|
|
168
216
|
}
|
|
169
217
|
|
|
@@ -7,7 +7,7 @@ import type {BatchableDataType, DataType, SyncDataType} from '../../types';
|
|
|
7
7
|
import type {ReadableFile} from '../files/file';
|
|
8
8
|
import {mergeOptions} from '../option-utils/merge-options';
|
|
9
9
|
import {resolvePath} from '../path-utils/file-aliases';
|
|
10
|
-
import {
|
|
10
|
+
import {getLoaderLog} from '../log-utils/log';
|
|
11
11
|
import {getAuthenticatedFetch} from '../request-utils/request-credentials';
|
|
12
12
|
import {resolveAuthenticationOptions} from '../request-utils/authentication';
|
|
13
13
|
|
|
@@ -18,6 +18,8 @@ export type DataSourceOptions = StrictLoaderOptions & {
|
|
|
18
18
|
core?: StrictLoaderOptions['core'] & {
|
|
19
19
|
/** Allows application to specify which source should be selected. Matches `Source.type`. Defaults to 'auto' */
|
|
20
20
|
type?: string;
|
|
21
|
+
/** Stable query-visible source name. Defaults to an available data or file name. */
|
|
22
|
+
name?: string;
|
|
21
23
|
/** Any dataset attributions (in case underlying metadata does not include attributions) */
|
|
22
24
|
attributions?: string[];
|
|
23
25
|
/** Removed in v5. Move these options to `core` and the root loader namespaces. */
|
|
@@ -95,6 +97,8 @@ export abstract class DataSource<DataT, OptionsT extends DataSourceOptions> {
|
|
|
95
97
|
options: Required<OptionsT & DataSourceOptions>;
|
|
96
98
|
readonly data: DataT;
|
|
97
99
|
readonly url: string;
|
|
100
|
+
/** Stable query-visible name, resolved without fetching source data. */
|
|
101
|
+
readonly name: string;
|
|
98
102
|
|
|
99
103
|
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
100
104
|
loadOptions: StrictLoaderOptions;
|
|
@@ -118,6 +122,7 @@ export abstract class DataSource<DataT, OptionsT extends DataSourceOptions> {
|
|
|
118
122
|
) as Required<OptionsT & DataSourceOptions>;
|
|
119
123
|
this.data = data;
|
|
120
124
|
this.url = typeof data === 'string' ? resolvePath(data) : '';
|
|
125
|
+
this.name = getDataSourceName(data, this.options);
|
|
121
126
|
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(this.options));
|
|
122
127
|
this.loadOptions = loadOptions;
|
|
123
128
|
const fetch = getFetchFunction(loadOptions);
|
|
@@ -127,6 +132,8 @@ export abstract class DataSource<DataT, OptionsT extends DataSourceOptions> {
|
|
|
127
132
|
}
|
|
128
133
|
|
|
129
134
|
setProps(options: OptionsT) {
|
|
135
|
+
if (options.core?.name !== undefined && options.core.name !== this.name)
|
|
136
|
+
throw new Error('Data source names are fixed at creation.');
|
|
130
137
|
const mergedOptions = mergeOptions<DataSourceOptions>(this.options, options) as Required<
|
|
131
138
|
OptionsT & DataSourceOptions
|
|
132
139
|
>;
|
|
@@ -162,7 +169,7 @@ export abstract class DataSource<DataT, OptionsT extends DataSourceOptions> {
|
|
|
162
169
|
if (callback) {
|
|
163
170
|
callback(normalizedError, this);
|
|
164
171
|
} else {
|
|
165
|
-
|
|
172
|
+
getLoaderLog(this.options).warn(`${this.constructor.name}: ${normalizedError.message}`)();
|
|
166
173
|
}
|
|
167
174
|
return normalizedError;
|
|
168
175
|
}
|
|
@@ -193,7 +200,7 @@ export function getSourceLoaderOptions(options: DataSourceOptions): StrictLoader
|
|
|
193
200
|
if (options?.core) {
|
|
194
201
|
loadOptions.core = {...options.core};
|
|
195
202
|
const parserCore = loadOptions.core as Record<string, unknown>;
|
|
196
|
-
for (const key of ['type', 'attributions', 'loaders', 'onError', 'loadOptions']) {
|
|
203
|
+
for (const key of ['type', 'name', 'attributions', 'loaders', 'onError', 'loadOptions']) {
|
|
197
204
|
delete parserCore[key];
|
|
198
205
|
}
|
|
199
206
|
if (Object.keys(parserCore).length === 0) {
|
|
@@ -201,18 +208,6 @@ export function getSourceLoaderOptions(options: DataSourceOptions): StrictLoader
|
|
|
201
208
|
}
|
|
202
209
|
}
|
|
203
210
|
|
|
204
|
-
const topLevelBaseUri = typeof loadOptions.baseUri === 'string' ? loadOptions.baseUri : undefined;
|
|
205
|
-
const topLevelBaseUrl = typeof loadOptions.baseUrl === 'string' ? loadOptions.baseUrl : undefined;
|
|
206
|
-
|
|
207
|
-
if (topLevelBaseUri !== undefined || topLevelBaseUrl !== undefined) {
|
|
208
|
-
loadOptions.core ||= {};
|
|
209
|
-
if (loadOptions.core.baseUrl === undefined) {
|
|
210
|
-
loadOptions.core.baseUrl = topLevelBaseUrl ?? topLevelBaseUri;
|
|
211
|
-
}
|
|
212
|
-
delete loadOptions.baseUri;
|
|
213
|
-
delete loadOptions.baseUrl;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
211
|
return loadOptions as StrictLoaderOptions;
|
|
217
212
|
}
|
|
218
213
|
|
|
@@ -230,7 +225,53 @@ function normalizeError(error: unknown, message: string): Error {
|
|
|
230
225
|
function unavailableCoreApiMethod(methodName: keyof CoreAPI) {
|
|
231
226
|
return () => {
|
|
232
227
|
throw new Error(
|
|
233
|
-
`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.
|
|
228
|
+
`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.createDataSourceSync().`
|
|
234
229
|
);
|
|
235
230
|
};
|
|
236
231
|
}
|
|
232
|
+
|
|
233
|
+
/** Derives a stable identifier from explicit options or already available data metadata. */
|
|
234
|
+
function getDataSourceName(data: unknown, options: DataSourceOptions): string {
|
|
235
|
+
const explicitName = options.core?.name;
|
|
236
|
+
if (explicitName !== undefined) {
|
|
237
|
+
if (typeof explicitName !== 'string' || !explicitName.trim())
|
|
238
|
+
throw new Error('Data source name must be a non-empty string.');
|
|
239
|
+
return explicitName;
|
|
240
|
+
}
|
|
241
|
+
if (data && typeof data === 'object') {
|
|
242
|
+
const named = data as {
|
|
243
|
+
name?: unknown;
|
|
244
|
+
schema?: {metadata?: Map<string, unknown> | Record<string, unknown>};
|
|
245
|
+
};
|
|
246
|
+
if (typeof named.name === 'string' && named.name.trim())
|
|
247
|
+
return data instanceof Blob ? removeFileExtension(named.name) : named.name;
|
|
248
|
+
const metadata = named.schema?.metadata;
|
|
249
|
+
const embeddedName = metadata instanceof Map ? metadata.get('name') : metadata?.name;
|
|
250
|
+
if (typeof embeddedName === 'string' && embeddedName.trim()) return embeddedName;
|
|
251
|
+
}
|
|
252
|
+
if (typeof data === 'string') {
|
|
253
|
+
try {
|
|
254
|
+
const url = new URL(data.replace(/\\/g, '/'), 'https://source.invalid/');
|
|
255
|
+
if (!['data:', 'blob:'].includes(url.protocol)) {
|
|
256
|
+
let basename = url.pathname.split('/').filter(Boolean).pop();
|
|
257
|
+
if (basename) {
|
|
258
|
+
try {
|
|
259
|
+
basename = decodeURIComponent(basename);
|
|
260
|
+
} catch {
|
|
261
|
+
/* Keep malformed encoded names literal. */
|
|
262
|
+
}
|
|
263
|
+
return removeFileExtension(basename);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
} catch {
|
|
267
|
+
/* Invalid URLs still receive a source-type fallback name. */
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return options.core?.type && options.core.type !== 'auto' ? options.core.type : 'source';
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Removes a filename suffix without erasing a hidden filename. */
|
|
274
|
+
function removeFileExtension(name: string): string {
|
|
275
|
+
const extension = name.lastIndexOf('.');
|
|
276
|
+
return extension > 0 ? name.slice(0, extension) : name;
|
|
277
|
+
}
|
|
@@ -20,7 +20,7 @@ export interface ImageSource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Normalized capabilities of an Image service
|
|
22
22
|
* @example
|
|
23
|
-
* The
|
|
23
|
+
* The WMSLoader will normalize the response to the WMS `GetCapabilities`
|
|
24
24
|
* data structure extracted from WMS XML response into an ImageSourceMetadata.
|
|
25
25
|
*/
|
|
26
26
|
export type ImageSourceMetadata = {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {Table as ArrowTable} from 'apache-arrow';
|
|
6
|
+
import type {Schema} from '@loaders.gl/core/schema';
|
|
7
|
+
import type {TableScanSource} from '../scan-utils/scan-query-metadata';
|
|
8
|
+
|
|
9
|
+
/** Source exposing named tables. Returned handles remain owned by the source or caller. */
|
|
10
|
+
export interface TableSourceCollection {
|
|
11
|
+
/** Resolves one table without loading unrelated tables. */
|
|
12
|
+
getTable(
|
|
13
|
+
name: string,
|
|
14
|
+
options?: {signal?: AbortSignal}
|
|
15
|
+
): ArrowTable | TableScanSource | Promise<ArrowTable | TableScanSource>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Metadata for one named table without reading its result rows. */
|
|
19
|
+
export type TableMetadata = Readonly<{
|
|
20
|
+
/** Unique loaded table name within its parent source. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Already available schema; table listings may omit it for lazy discovery. */
|
|
23
|
+
schema?: Schema;
|
|
24
|
+
/** Whether the source exposes this table through the common query contract. */
|
|
25
|
+
queryable?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
|
|
28
|
+
/** Metadata-only discovery implemented by sources exposing multiple tables. */
|
|
29
|
+
export interface TableDiscoverySource {
|
|
30
|
+
/** Lists table names without opening their row readers. */
|
|
31
|
+
getTablesMetadata(options?: {
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}): readonly TableMetadata[] | Promise<readonly TableMetadata[]>;
|
|
34
|
+
/** Discovers one table schema without materializing its rows. */
|
|
35
|
+
getTableMetadata?(
|
|
36
|
+
name: string,
|
|
37
|
+
options?: {signal?: AbortSignal}
|
|
38
|
+
): TableMetadata | Promise<TableMetadata>;
|
|
39
|
+
}
|
|
@@ -25,7 +25,7 @@ export function mergeImageSourceLoaderProps<Props extends {loadOptions?: any}>(
|
|
|
25
25
|
...props,
|
|
26
26
|
loadOptions: {
|
|
27
27
|
...props.loadOptions,
|
|
28
|
-
fetch: getFetchFunction(props.loadOptions)
|
|
28
|
+
core: {...props.loadOptions?.core, fetch: getFetchFunction(props.loadOptions)}
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import type {Table as ArrowTable} from 'apache-arrow';
|
|
5
6
|
import type {
|
|
6
|
-
ArrowTable,
|
|
7
7
|
BinaryFeatureCollection,
|
|
8
8
|
GeoArrowEncodingPreference,
|
|
9
9
|
GeoJSONTable,
|
|
@@ -33,7 +33,7 @@ export interface VectorSource {
|
|
|
33
33
|
/**
|
|
34
34
|
* Normalized capabilities of an Image service
|
|
35
35
|
* @example
|
|
36
|
-
* The
|
|
36
|
+
* The WMSLoader will normalize the response to the WMS `GetCapabilities`
|
|
37
37
|
* data structure extracted from WMS XML response into an VectorSourceMetadata.
|
|
38
38
|
*/
|
|
39
39
|
export type VectorSourceMetadata = {
|
|
@@ -79,7 +79,7 @@ export type GetFeaturesParameters = {
|
|
|
79
79
|
requestCrs?: CRSIdentifier;
|
|
80
80
|
/**
|
|
81
81
|
* Requested feature encoding for the returned table.
|
|
82
|
-
* `arrow` returns a
|
|
82
|
+
* `arrow` returns a native Apache Arrow `Table`.
|
|
83
83
|
*/
|
|
84
84
|
format?: 'geojson' | 'binary' | 'arrow';
|
|
85
85
|
/** Preferred GeoArrow encoding when `format` is `arrow`. */
|
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
Feature,
|
|
8
|
-
GeoJSONTable,
|
|
9
|
-
BinaryFeatureCollection,
|
|
10
|
-
ArrowTable
|
|
11
|
-
} from '@loaders.gl/core/schema';
|
|
5
|
+
import type {Table} from 'apache-arrow';
|
|
6
|
+
import type {Schema, Feature, GeoJSONTable, BinaryFeatureCollection} from '@loaders.gl/core/schema';
|
|
12
7
|
import {TileSource, TileSourceProps, GetTileParameters} from './tile-source';
|
|
13
8
|
import type {GetTileDataParameters} from './tile-source';
|
|
14
9
|
|
|
15
|
-
export type VectorTile = Feature[] | GeoJSONTable | BinaryFeatureCollection |
|
|
10
|
+
export type VectorTile = Feature[] | GeoJSONTable | BinaryFeatureCollection | Table;
|
|
16
11
|
|
|
17
12
|
export type VectorTileSourceProps = TileSourceProps;
|
|
18
13
|
|
|
@@ -25,5 +20,5 @@ export interface VectorTileSource extends TileSource {
|
|
|
25
20
|
getVectorTile(parameters: GetTileParameters): Promise<VectorTile | null>;
|
|
26
21
|
getTileData(
|
|
27
22
|
parameters: GetTileDataParameters
|
|
28
|
-
): Promise<Feature[] | GeoJSONTable | BinaryFeatureCollection |
|
|
23
|
+
): Promise<Feature[] | GeoJSONTable | BinaryFeatureCollection | Table | null>;
|
|
29
24
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {canProcessOnWorker} from '@loaders.gl/core/worker-utils';
|
|
6
6
|
import {Writer, WriterOptions} from '../../writer-types';
|
|
7
7
|
import {isBrowser} from '../env-utils/globals';
|
|
8
8
|
|
|
@@ -12,10 +12,6 @@ import {isBrowser} from '../env-utils/globals';
|
|
|
12
12
|
* @param options
|
|
13
13
|
*/
|
|
14
14
|
export function canEncodeWithWorker(writer: Writer, options?: WriterOptions) {
|
|
15
|
-
if (!WorkerFarm.isSupported()) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
15
|
const nodeWorkers = options?._nodeWorkers ?? options?.core?._nodeWorkers;
|
|
20
16
|
const useWorkers = options?.worker ?? options?.core?.worker;
|
|
21
17
|
|
|
@@ -24,5 +20,8 @@ export function canEncodeWithWorker(writer: Writer, options?: WriterOptions) {
|
|
|
24
20
|
return false;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
return
|
|
23
|
+
return canProcessOnWorker(
|
|
24
|
+
{...writer, options: writer.options || {}},
|
|
25
|
+
{worker: Boolean(useWorkers), _nodeWorkers: Boolean(nodeWorkers)}
|
|
26
|
+
);
|
|
28
27
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import {NullLog} from '../log-utils/log';
|
|
5
6
|
import {
|
|
6
7
|
canProcessOnWorker,
|
|
7
8
|
canProcessOnWorkerInBatches,
|
|
@@ -45,11 +46,7 @@ export function canParseWithWorker(loader: Loader, options?: StrictLoaderOptions
|
|
|
45
46
|
)
|
|
46
47
|
return false;
|
|
47
48
|
// Multifile workers cannot transfer an application's custom fetch callback.
|
|
48
|
-
if (
|
|
49
|
-
loader.id === 'shapefile' &&
|
|
50
|
-
(typeof options?.fetch === 'function' || typeof options?.core?.fetch === 'function')
|
|
51
|
-
)
|
|
52
|
-
return false;
|
|
49
|
+
if (loader.id === 'shapefile' && typeof options?.core?.fetch === 'function') return false;
|
|
53
50
|
const workerOptions = getWorkerOptions(options);
|
|
54
51
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
55
52
|
if (!isBrowser && !nodeWorkers) {
|
|
@@ -147,14 +144,18 @@ export async function parseWithWorker(
|
|
|
147
144
|
onProgress: options?.onProgress || context?.reportProgress
|
|
148
145
|
},
|
|
149
146
|
{
|
|
150
|
-
process: async (input, processOptions,
|
|
147
|
+
process: async (input, processOptions, workerContext, parseContext) => {
|
|
151
148
|
if (!parseOnMainThread) {
|
|
152
149
|
throw new Error('Worker not set up to parse on main thread');
|
|
153
150
|
}
|
|
154
151
|
const {_loaderIds, _loaderIsArray, ...workerParseContext} = parseContext || {};
|
|
155
152
|
const mainThreadContext =
|
|
156
|
-
context || parseContext
|
|
157
|
-
? ({
|
|
153
|
+
context || parseContext || workerContext?.signal
|
|
154
|
+
? ({
|
|
155
|
+
...context,
|
|
156
|
+
...workerParseContext,
|
|
157
|
+
signal: workerContext?.signal ?? context?.signal
|
|
158
|
+
} as LoaderContext)
|
|
158
159
|
: undefined;
|
|
159
160
|
return await callParseOnMainThread(
|
|
160
161
|
parseOnMainThread,
|
|
@@ -201,14 +202,18 @@ export async function* parseWithWorkerInBatches(
|
|
|
201
202
|
onProgress: options?.onProgress || context?.reportProgress
|
|
202
203
|
},
|
|
203
204
|
{
|
|
204
|
-
process: async (input, processOptions,
|
|
205
|
+
process: async (input, processOptions, workerContext, parseContext) => {
|
|
205
206
|
if (!parseOnMainThread) {
|
|
206
207
|
throw new Error('Worker not set up to parse on main thread');
|
|
207
208
|
}
|
|
208
209
|
const {_loaderIds, _loaderIsArray, ...workerParseContext} = parseContext || {};
|
|
209
210
|
const mainThreadContext =
|
|
210
|
-
context || parseContext
|
|
211
|
-
? ({
|
|
211
|
+
context || parseContext || workerContext?.signal
|
|
212
|
+
? ({
|
|
213
|
+
...context,
|
|
214
|
+
...workerParseContext,
|
|
215
|
+
signal: workerContext?.signal ?? context?.signal
|
|
216
|
+
} as LoaderContext)
|
|
212
217
|
: undefined;
|
|
213
218
|
return await callParseOnMainThread(
|
|
214
219
|
parseOnMainThread,
|
|
@@ -299,7 +304,7 @@ function resolveWorkerLoaders(
|
|
|
299
304
|
}
|
|
300
305
|
|
|
301
306
|
/**
|
|
302
|
-
*
|
|
307
|
+
* Prepares worker routing controls and serializable parser options.
|
|
303
308
|
* @param options
|
|
304
309
|
* @param loader Loader whose parser will handle the worker request.
|
|
305
310
|
*/
|
|
@@ -309,7 +314,15 @@ function getWorkerOptions(options: StrictLoaderOptions = {}, loader?: Loader) {
|
|
|
309
314
|
...portableOptions,
|
|
310
315
|
signal: undefined,
|
|
311
316
|
onProgress: undefined,
|
|
312
|
-
...(portableOptions.core
|
|
317
|
+
...(portableOptions.core
|
|
318
|
+
? {
|
|
319
|
+
core: {
|
|
320
|
+
...portableOptions.core,
|
|
321
|
+
authentications: undefined,
|
|
322
|
+
log: isDisabledLog(portableOptions.core.log) ? null : undefined
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
: {})
|
|
313
326
|
};
|
|
314
327
|
const serializedOptions = JSON.parse(
|
|
315
328
|
JSON.stringify(optionsToSerialize, (_key, value) => {
|
|
@@ -320,19 +333,18 @@ function getWorkerOptions(options: StrictLoaderOptions = {}, loader?: Loader) {
|
|
|
320
333
|
})
|
|
321
334
|
);
|
|
322
335
|
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
};
|
|
327
|
-
// The decision has already been made before dispatch, so worker runtimes should
|
|
328
|
-
// receive the established boolean form even when the caller selected `auto`.
|
|
329
|
-
if (workerOptions.worker === 'auto') {
|
|
330
|
-
workerOptions.worker = true;
|
|
336
|
+
// The decision has already been made before dispatch.
|
|
337
|
+
if (serializedOptions.core?.worker === 'auto') {
|
|
338
|
+
serializedOptions.core.worker = true;
|
|
331
339
|
}
|
|
332
340
|
if (loader) {
|
|
333
|
-
|
|
341
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
334
342
|
}
|
|
335
|
-
return
|
|
343
|
+
return {
|
|
344
|
+
...serializedOptions,
|
|
345
|
+
...serializedOptions.core,
|
|
346
|
+
parserOptions: serializedOptions
|
|
347
|
+
};
|
|
336
348
|
}
|
|
337
349
|
|
|
338
350
|
/** Restores exact bigint leaves after JSON removes callbacks; ordinary JSON values keep their shape. */
|
|
@@ -374,7 +386,7 @@ function getSerializableLoaderContext(context?: LoaderContext) {
|
|
|
374
386
|
*/
|
|
375
387
|
function shouldParseCSVWithWorker(options?: StrictLoaderOptions): boolean {
|
|
376
388
|
const csvOptions = options as {csv?: {shape?: string}; core?: {shape?: string}} | undefined;
|
|
377
|
-
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === 'arrow
|
|
389
|
+
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === 'arrow';
|
|
378
390
|
}
|
|
379
391
|
|
|
380
392
|
/**
|
|
@@ -390,3 +402,8 @@ function isLoaderWithWorkerResultDeserializer(
|
|
|
390
402
|
'function'
|
|
391
403
|
);
|
|
392
404
|
}
|
|
405
|
+
|
|
406
|
+
/** Preserves explicit log suppression when crossing the worker boundary. */
|
|
407
|
+
function isDisabledLog(logger: unknown): boolean {
|
|
408
|
+
return logger === null || logger instanceof NullLog;
|
|
409
|
+
}
|