@loaders.gl/core 5.0.0-beta.7 → 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 +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- 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/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 +274 -509
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +478 -450
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +121 -485
- 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 +8 -9
- 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 +5 -9
- 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 +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 +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 +3 -2
- 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 +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 +486 -410
- 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 +257 -88
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +9 -4
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +5 -3
- 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 +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 +5 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +13 -5
- package/dist/loader-utils/lib/scan-utils/logical-table-query.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 +22 -1
- 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 +17 -11
- 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 +53 -32
- 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 +3 -13
- 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 +26 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +114 -87
- 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/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/polyfills/index.cjs +3 -2
- 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 +36 -12
- package/dist/scan/arrow-execution/expressions.cjs.map +3 -3
- 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 +36 -12
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +11 -6
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -5
- 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 +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +41 -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 +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 +141 -92
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +37 -10
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +137 -96
- 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 +410 -626
- 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/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 +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 +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/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 +241 -291
- 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 +51 -11
- package/dist/worker-utils/index.cjs.map +3 -3
- 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 +2 -1
- package/dist/worker-utils/lib/library-utils/library-utils.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/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/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 +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/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/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -12
- 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 +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/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 +8 -12
- 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 +4 -3
- 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/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 +19 -3
- 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 +18 -8
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +28 -1
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +88 -56
- package/src/loader-utils/lib/sources/data-source.ts +3 -15
- 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 +27 -18
- package/src/loader-utils/loader-types.ts +186 -107
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/index.ts +3 -3
- 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 +41 -11
- 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 +230 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +254 -127
- 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 -11
- 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 +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 +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/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/wkt/index.ts +1 -1
- package/src/worker-utils/lib/library-utils/library-utils.ts +2 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- 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/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
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
// loaders.gl
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
4
|
-
|
|
5
|
-
import * as arrow from 'apache-arrow';
|
|
6
|
-
import type {GeoArrowDimension, GeoArrowEncoding} from '@loaders.gl/core/schema';
|
|
7
|
-
import {getGeoArrowUnionDimension, getGeoArrowUnionGeometryKind} from './geoarrow-union';
|
|
8
|
-
|
|
9
|
-
type GeometryKind =
|
|
10
|
-
| 'Point'
|
|
11
|
-
| 'LineString'
|
|
12
|
-
| 'Polygon'
|
|
13
|
-
| 'MultiPoint'
|
|
14
|
-
| 'MultiLineString'
|
|
15
|
-
| 'MultiPolygon'
|
|
16
|
-
| 'GeometryCollection';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Writes native GeoArrow values directly to WKT strings.
|
|
20
|
-
*
|
|
21
|
-
* The encoder traverses native Arrow scalar and union values without constructing GeoJSON
|
|
22
|
-
* geometry objects. A `null` result means the source layout is not a supported native geometry
|
|
23
|
-
* layout, allowing the caller to use its compatibility path.
|
|
24
|
-
*
|
|
25
|
-
* @param column Native GeoArrow vector.
|
|
26
|
-
* @param sourceEncoding Source GeoArrow encoding.
|
|
27
|
-
* @param dimension Optional semantic coordinate dimension.
|
|
28
|
-
* @returns WKT Arrow vector, or `null` for unsupported source layouts.
|
|
29
|
-
*/
|
|
30
|
-
export function encodeGeoArrowWKTVector(
|
|
31
|
-
column: arrow.Vector,
|
|
32
|
-
sourceEncoding: GeoArrowEncoding,
|
|
33
|
-
dimension?: GeoArrowDimension
|
|
34
|
-
): arrow.Vector | null {
|
|
35
|
-
if (!isNativeGeometryEncoding(sourceEncoding)) return null;
|
|
36
|
-
|
|
37
|
-
const values: (string | null)[] = [];
|
|
38
|
-
for (let rowIndex = 0; rowIndex < column.length; rowIndex++) {
|
|
39
|
-
const value = column.get(rowIndex);
|
|
40
|
-
if (value == null) {
|
|
41
|
-
values.push(null);
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
const geometryKind = getRowGeometryKind(column, rowIndex, sourceEncoding);
|
|
45
|
-
const rowDimension =
|
|
46
|
-
dimension ||
|
|
47
|
-
(sourceEncoding === 'geoarrow.geometrycollection'
|
|
48
|
-
? inferCollectionDimension(value)
|
|
49
|
-
: inferDimensionFromTypeId(column, rowIndex, sourceEncoding));
|
|
50
|
-
const wkt = encodeNativeValue(value, geometryKind, rowDimension, !dimension);
|
|
51
|
-
if (wkt === null) return null;
|
|
52
|
-
values.push(wkt);
|
|
53
|
-
}
|
|
54
|
-
return arrow.vectorFromArray(values, new arrow.Utf8());
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Returns whether an encoding contains native geometry values that WKT can represent. */
|
|
58
|
-
function isNativeGeometryEncoding(encoding: GeoArrowEncoding): boolean {
|
|
59
|
-
return (
|
|
60
|
-
encoding === 'geoarrow.point' ||
|
|
61
|
-
encoding === 'geoarrow.linestring' ||
|
|
62
|
-
encoding === 'geoarrow.polygon' ||
|
|
63
|
-
encoding === 'geoarrow.multipoint' ||
|
|
64
|
-
encoding === 'geoarrow.multilinestring' ||
|
|
65
|
-
encoding === 'geoarrow.multipolygon' ||
|
|
66
|
-
encoding === 'geoarrow.geometry' ||
|
|
67
|
-
encoding === 'geoarrow.geometrycollection'
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Converts one native scalar to a WKT value using its declared family. */
|
|
72
|
-
function encodeNativeValue(
|
|
73
|
-
value: unknown,
|
|
74
|
-
geometryKind: GeometryKind,
|
|
75
|
-
dimension: GeoArrowDimension,
|
|
76
|
-
preserveMemberDimensions = false
|
|
77
|
-
): string | null {
|
|
78
|
-
switch (geometryKind) {
|
|
79
|
-
case 'Point':
|
|
80
|
-
return encodePoint(value, dimension);
|
|
81
|
-
case 'LineString':
|
|
82
|
-
return encodeLineString(value, dimension);
|
|
83
|
-
case 'Polygon':
|
|
84
|
-
return encodePolygon(value, dimension);
|
|
85
|
-
case 'MultiPoint':
|
|
86
|
-
return encodeMultiPoint(value, dimension);
|
|
87
|
-
case 'MultiLineString':
|
|
88
|
-
return encodeMultiLineString(value, dimension);
|
|
89
|
-
case 'MultiPolygon':
|
|
90
|
-
return encodeMultiPolygon(value, dimension);
|
|
91
|
-
case 'GeometryCollection':
|
|
92
|
-
return encodeGeometryCollection(value, dimension, preserveMemberDimensions);
|
|
93
|
-
default:
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/** Encodes a Point scalar or empty point. */
|
|
99
|
-
function encodePoint(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
100
|
-
const coordinate = readCoordinate(value);
|
|
101
|
-
return coordinate
|
|
102
|
-
? `POINT${getDimensionSuffix(dimension)} (${encodeCoordinate(coordinate)})`
|
|
103
|
-
: 'POINT EMPTY';
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Encodes a LineString list. */
|
|
107
|
-
function encodeLineString(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
108
|
-
const coordinates = readChildren(value);
|
|
109
|
-
if (!coordinates) return null;
|
|
110
|
-
const encodedCoordinates = encodeCoordinateSequence(coordinates);
|
|
111
|
-
if (encodedCoordinates === null) return null;
|
|
112
|
-
return coordinates.length === 0
|
|
113
|
-
? `LINESTRING${getDimensionSuffix(dimension)} EMPTY`
|
|
114
|
-
: `LINESTRING${getDimensionSuffix(dimension)} (${encodedCoordinates})`;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** Encodes a Polygon list of rings. */
|
|
118
|
-
function encodePolygon(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
119
|
-
const rings = readChildren(value);
|
|
120
|
-
if (!rings) return null;
|
|
121
|
-
if (rings.length === 0) return `POLYGON${getDimensionSuffix(dimension)} EMPTY`;
|
|
122
|
-
const encodedRings = rings.map(ring => encodeCoordinateSequenceValue(ring));
|
|
123
|
-
if (encodedRings.some(encodedRing => encodedRing === null)) return null;
|
|
124
|
-
return `POLYGON${getDimensionSuffix(dimension)} (${encodedRings.join(', ')})`;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/** Encodes a MultiPoint list. */
|
|
128
|
-
function encodeMultiPoint(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
129
|
-
const points = readChildren(value);
|
|
130
|
-
if (!points) return null;
|
|
131
|
-
if (points.length === 0) return `MULTIPOINT${getDimensionSuffix(dimension)} EMPTY`;
|
|
132
|
-
const encodedPoints = points.map(point => {
|
|
133
|
-
const coordinate = readCoordinate(point);
|
|
134
|
-
return coordinate ? `(${encodeCoordinate(coordinate)})` : null;
|
|
135
|
-
});
|
|
136
|
-
if (encodedPoints.some(encodedPoint => encodedPoint === null)) return null;
|
|
137
|
-
return `MULTIPOINT${getDimensionSuffix(dimension)} (${encodedPoints.join(', ')})`;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/** Encodes a MultiLineString list of lines. */
|
|
141
|
-
function encodeMultiLineString(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
142
|
-
const lines = readChildren(value);
|
|
143
|
-
if (!lines) return null;
|
|
144
|
-
if (lines.length === 0) return `MULTILINESTRING${getDimensionSuffix(dimension)} EMPTY`;
|
|
145
|
-
const encodedLines = lines.map(line => encodeCoordinateSequenceValue(line));
|
|
146
|
-
if (encodedLines.some(encodedLine => encodedLine === null)) return null;
|
|
147
|
-
return `MULTILINESTRING${getDimensionSuffix(dimension)} (${encodedLines.join(', ')})`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** Encodes a MultiPolygon list of polygons. */
|
|
151
|
-
function encodeMultiPolygon(value: unknown, dimension: GeoArrowDimension): string | null {
|
|
152
|
-
const polygons = readChildren(value);
|
|
153
|
-
if (!polygons) return null;
|
|
154
|
-
if (polygons.length === 0) return `MULTIPOLYGON${getDimensionSuffix(dimension)} EMPTY`;
|
|
155
|
-
const encodedPolygons = polygons.map(polygon => {
|
|
156
|
-
const rings = readChildren(polygon);
|
|
157
|
-
if (!rings) return null;
|
|
158
|
-
const encodedRings = rings.map(ring => encodeCoordinateSequenceValue(ring));
|
|
159
|
-
return encodedRings.some(encodedRing => encodedRing === null)
|
|
160
|
-
? null
|
|
161
|
-
: `(${encodedRings.join(', ')})`;
|
|
162
|
-
});
|
|
163
|
-
if (encodedPolygons.some(encodedPolygon => encodedPolygon === null)) return null;
|
|
164
|
-
return `MULTIPOLYGON${getDimensionSuffix(dimension)} (${encodedPolygons.join(', ')})`;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/** Encodes a GeometryCollection dense union recursively. */
|
|
168
|
-
function encodeGeometryCollection(
|
|
169
|
-
value: unknown,
|
|
170
|
-
dimension: GeoArrowDimension,
|
|
171
|
-
preserveMemberDimensions: boolean
|
|
172
|
-
): string | null {
|
|
173
|
-
if (!isVectorLike(value)) return null;
|
|
174
|
-
const geometries: string[] = [];
|
|
175
|
-
for (let rowIndex = 0; rowIndex < value.length; rowIndex++) {
|
|
176
|
-
const unionVector = value as arrow.Vector;
|
|
177
|
-
const typeId = getUnionTypeId(unionVector, rowIndex);
|
|
178
|
-
const childField = getUnionField(unionVector, rowIndex);
|
|
179
|
-
const geometryKind = getGeoArrowUnionGeometryKind(
|
|
180
|
-
childField?.name,
|
|
181
|
-
typeId
|
|
182
|
-
) as GeometryKind | null;
|
|
183
|
-
const childDimension = getGeoArrowUnionDimension(childField?.name, childField?.type, typeId);
|
|
184
|
-
if (!geometryKind || !childDimension) return null;
|
|
185
|
-
const geometry = encodeNativeValue(
|
|
186
|
-
unionVector.get(rowIndex),
|
|
187
|
-
geometryKind,
|
|
188
|
-
preserveMemberDimensions ? childDimension : dimension,
|
|
189
|
-
preserveMemberDimensions
|
|
190
|
-
);
|
|
191
|
-
if (geometry === null) return null;
|
|
192
|
-
geometries.push(geometry);
|
|
193
|
-
}
|
|
194
|
-
return geometries.length === 0
|
|
195
|
-
? 'GEOMETRYCOLLECTION EMPTY'
|
|
196
|
-
: `GEOMETRYCOLLECTION (${geometries.join(', ')})`;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/** Encodes one coordinate sequence from a native list scalar. */
|
|
200
|
-
function encodeCoordinateSequenceValue(value: unknown): string | null {
|
|
201
|
-
const coordinates = readChildren(value);
|
|
202
|
-
if (!coordinates) return null;
|
|
203
|
-
const encodedCoordinates = encodeCoordinateSequence(coordinates);
|
|
204
|
-
return encodedCoordinates === null ? null : `(${encodedCoordinates})`;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** Encodes coordinate children without changing their semantic axis order. */
|
|
208
|
-
function encodeCoordinateSequence(values: readonly unknown[]): string | null {
|
|
209
|
-
const coordinates = values.map(value => {
|
|
210
|
-
const coordinate = readCoordinate(value);
|
|
211
|
-
return coordinate ? encodeCoordinate(coordinate) : null;
|
|
212
|
-
});
|
|
213
|
-
return coordinates.every(coordinate => coordinate !== null) ? coordinates.join(', ') : null;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/** Serializes one coordinate tuple. */
|
|
217
|
-
function encodeCoordinate(coordinate: readonly number[]): string {
|
|
218
|
-
return coordinate.map(value => String(value)).join(' ');
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/** Reads one interleaved or separated native coordinate scalar. */
|
|
222
|
-
function readCoordinate(value: unknown): number[] | null {
|
|
223
|
-
if (value && typeof value === 'object' && 'x' in value && 'y' in value) {
|
|
224
|
-
const record = value as {x: unknown; y: unknown; z?: unknown; m?: unknown};
|
|
225
|
-
const coordinate = [Number(record.x), Number(record.y)];
|
|
226
|
-
if (typeof record.z === 'number') coordinate.push(record.z);
|
|
227
|
-
if (typeof record.m === 'number') coordinate.push(record.m);
|
|
228
|
-
return coordinate.every(Number.isFinite) ? coordinate : null;
|
|
229
|
-
}
|
|
230
|
-
if (value && typeof (value as {toArray?: unknown}).toArray === 'function') {
|
|
231
|
-
return readCoordinate((value as {toArray(): ArrayLike<unknown>}).toArray());
|
|
232
|
-
}
|
|
233
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
234
|
-
const coordinate = Array.from(value as ArrayLike<unknown>, Number);
|
|
235
|
-
return coordinate.length >= 2 && coordinate.every(Number.isFinite) ? coordinate : null;
|
|
236
|
-
}
|
|
237
|
-
return null;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/** Reads children from Arrow vectors, arrays, and typed-array list scalars. */
|
|
241
|
-
function readChildren(value: unknown): unknown[] | null {
|
|
242
|
-
if (isVectorLike(value)) {
|
|
243
|
-
const children: unknown[] = [];
|
|
244
|
-
for (let index = 0; index < value.length; index++) children.push(value.get(index));
|
|
245
|
-
return children;
|
|
246
|
-
}
|
|
247
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
248
|
-
return Array.from(value as ArrayLike<unknown>);
|
|
249
|
-
}
|
|
250
|
-
return null;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/** Returns a dense union type ID for one logical row, including sliced data. */
|
|
254
|
-
function getUnionTypeId(vector: arrow.Vector, rowIndex: number): number {
|
|
255
|
-
let remainingRowIndex = rowIndex;
|
|
256
|
-
for (const data of vector.data) {
|
|
257
|
-
if (remainingRowIndex >= data.length) {
|
|
258
|
-
remainingRowIndex -= data.length;
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
const typeIdIndex =
|
|
262
|
-
data.typeIds.length <= data.length ? remainingRowIndex : data.offset + remainingRowIndex;
|
|
263
|
-
return data.typeIds[typeIdIndex];
|
|
264
|
-
}
|
|
265
|
-
throw new Error(`Dense union row ${rowIndex} is out of bounds.`);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/** Returns the semantic field for a dense-union row, including sliced vectors. */
|
|
269
|
-
function getUnionField(vector: arrow.Vector, rowIndex: number): arrow.Field | undefined {
|
|
270
|
-
const unionType = vector.type;
|
|
271
|
-
if (!(unionType instanceof arrow.DenseUnion)) return undefined;
|
|
272
|
-
const typeId = getUnionTypeId(vector, rowIndex);
|
|
273
|
-
const childIndex = unionType.typeIds.indexOf(typeId);
|
|
274
|
-
return childIndex >= 0 ? unionType.children[childIndex] : undefined;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/** Maps a standard GeoArrow union type ID to its geometry family. */
|
|
278
|
-
/** Infers row dimension from a union ID or native physical type. */
|
|
279
|
-
function inferDimensionFromTypeId(
|
|
280
|
-
column: arrow.Vector,
|
|
281
|
-
rowIndex: number,
|
|
282
|
-
sourceEncoding: GeoArrowEncoding
|
|
283
|
-
): GeoArrowDimension {
|
|
284
|
-
if (sourceEncoding === 'geoarrow.geometry') {
|
|
285
|
-
const typeId = getUnionTypeId(column, rowIndex);
|
|
286
|
-
const field = getUnionField(column, rowIndex);
|
|
287
|
-
return getGeoArrowUnionDimension(field?.name, field?.type, typeId) || 'xy';
|
|
288
|
-
}
|
|
289
|
-
let type = column.type;
|
|
290
|
-
while (type instanceof arrow.List || type instanceof arrow.LargeList) {
|
|
291
|
-
type = type.children[0].type;
|
|
292
|
-
}
|
|
293
|
-
if (type instanceof arrow.Struct) {
|
|
294
|
-
const names = new Set(type.children.map(field => field.name));
|
|
295
|
-
if (names.has('z') && names.has('m')) return 'xyzm';
|
|
296
|
-
if (names.has('m')) return 'xym';
|
|
297
|
-
if (names.has('z')) return 'xyz';
|
|
298
|
-
}
|
|
299
|
-
if (type instanceof arrow.FixedSizeList) {
|
|
300
|
-
return type.listSize === 4 ? 'xyzm' : type.listSize === 3 ? 'xyz' : 'xy';
|
|
301
|
-
}
|
|
302
|
-
return 'xy';
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/** Returns the geometry family for a logical native row. */
|
|
306
|
-
function getRowGeometryKind(
|
|
307
|
-
column: arrow.Vector,
|
|
308
|
-
rowIndex: number,
|
|
309
|
-
sourceEncoding: GeoArrowEncoding
|
|
310
|
-
): GeometryKind {
|
|
311
|
-
if (sourceEncoding === 'geoarrow.geometry') {
|
|
312
|
-
const typeId = getUnionTypeId(column, rowIndex);
|
|
313
|
-
const field = getUnionField(column, rowIndex);
|
|
314
|
-
return (getGeoArrowUnionGeometryKind(field?.name, typeId) ||
|
|
315
|
-
'GeometryCollection') as GeometryKind;
|
|
316
|
-
}
|
|
317
|
-
if (sourceEncoding === 'geoarrow.geometrycollection') return 'GeometryCollection';
|
|
318
|
-
return getGeometryKind(sourceEncoding);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
/** Infers a collection dimension from its first dense-union member. */
|
|
322
|
-
function inferCollectionDimension(value: unknown): GeoArrowDimension {
|
|
323
|
-
if (!isVectorLike(value)) return 'xy';
|
|
324
|
-
const vector = value as arrow.Vector;
|
|
325
|
-
if (vector.length > 0) {
|
|
326
|
-
const typeId = getUnionTypeId(vector, 0);
|
|
327
|
-
const field = getUnionField(vector, 0);
|
|
328
|
-
return getGeoArrowUnionDimension(field?.name, field?.type, typeId) || 'xy';
|
|
329
|
-
}
|
|
330
|
-
return 'xy';
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/** Returns the geometry family represented by a concrete native encoding. */
|
|
334
|
-
function getGeometryKind(encoding: GeoArrowEncoding): GeometryKind {
|
|
335
|
-
switch (encoding) {
|
|
336
|
-
case 'geoarrow.point':
|
|
337
|
-
return 'Point';
|
|
338
|
-
case 'geoarrow.linestring':
|
|
339
|
-
return 'LineString';
|
|
340
|
-
case 'geoarrow.polygon':
|
|
341
|
-
return 'Polygon';
|
|
342
|
-
case 'geoarrow.multipoint':
|
|
343
|
-
return 'MultiPoint';
|
|
344
|
-
case 'geoarrow.multilinestring':
|
|
345
|
-
return 'MultiLineString';
|
|
346
|
-
case 'geoarrow.multipolygon':
|
|
347
|
-
return 'MultiPolygon';
|
|
348
|
-
case 'geoarrow.geometry':
|
|
349
|
-
return 'GeometryCollection';
|
|
350
|
-
case 'geoarrow.geometrycollection':
|
|
351
|
-
return 'GeometryCollection';
|
|
352
|
-
default:
|
|
353
|
-
throw new Error(`Unsupported native WKT encoding "${encoding}".`);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/** Returns the WKT dimensionality suffix. */
|
|
358
|
-
function getDimensionSuffix(dimension: GeoArrowDimension): string {
|
|
359
|
-
return dimension === 'xy'
|
|
360
|
-
? ''
|
|
361
|
-
: dimension === 'xyzm'
|
|
362
|
-
? ' ZM'
|
|
363
|
-
: ` ${dimension.slice(2).toUpperCase()}`;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/** Tests Arrow vectors and nested list scalars. */
|
|
367
|
-
function isVectorLike(value: unknown): value is {length: number; get(index: number): unknown} {
|
|
368
|
-
return Boolean(
|
|
369
|
-
value &&
|
|
370
|
-
typeof (value as {length?: unknown}).length === 'number' &&
|
|
371
|
-
typeof (value as {get?: unknown}).get === 'function'
|
|
372
|
-
);
|
|
373
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// loaders.gl
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
4
|
-
|
|
5
|
-
import {FileProviderInterface} from './file-provider-interface';
|
|
6
|
-
import {copyToArrayBuffer} from '../binary-utils/memory-conversion-utils';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Checks if bigint can be converted to number and convert it if possible
|
|
10
|
-
* @param bigint bigint to be converted
|
|
11
|
-
* @returns number
|
|
12
|
-
*/
|
|
13
|
-
const toNumber = (bigint: bigint) => {
|
|
14
|
-
if (bigint > Number.MAX_SAFE_INTEGER) {
|
|
15
|
-
throw new Error('Offset is out of bounds');
|
|
16
|
-
}
|
|
17
|
-
return Number(bigint);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Provides file data using DataView
|
|
22
|
-
* @deprecated - will be replaced with ReadableFile
|
|
23
|
-
*/
|
|
24
|
-
export class DataViewFile implements FileProviderInterface {
|
|
25
|
-
/** The DataView from which data is provided */
|
|
26
|
-
private file: DataView;
|
|
27
|
-
|
|
28
|
-
constructor(file: DataView) {
|
|
29
|
-
this.file = file;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async destroy(): Promise<void> {}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
36
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
37
|
-
*/
|
|
38
|
-
async getUint8(offset: bigint): Promise<number> {
|
|
39
|
-
return this.file.getUint8(toNumber(offset));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Gets an unsigned 16-bit intege at the specified byte offset from the start of the file.
|
|
44
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
45
|
-
*/
|
|
46
|
-
async getUint16(offset: bigint): Promise<number> {
|
|
47
|
-
return this.file.getUint16(toNumber(offset), true);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
52
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
53
|
-
*/
|
|
54
|
-
async getUint32(offset: bigint): Promise<number> {
|
|
55
|
-
return this.file.getUint32(toNumber(offset), true);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Gets an unsigned 64-bit integer at the specified byte offset from the start of the file.
|
|
60
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
61
|
-
*/
|
|
62
|
-
async getBigUint64(offset: bigint): Promise<bigint> {
|
|
63
|
-
return this.file.getBigUint64(toNumber(offset), true);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
68
|
-
* @param startOffset The offset, in bytes, from the start of the file where to start reading the data.
|
|
69
|
-
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
70
|
-
*/
|
|
71
|
-
async slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer> {
|
|
72
|
-
return copyToArrayBuffer(
|
|
73
|
-
this.file.buffer,
|
|
74
|
-
toNumber(startOffset + BigInt(this.file.byteOffset)),
|
|
75
|
-
toNumber(endOffset - startOffset)
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/** the length (in bytes) of the data. */
|
|
80
|
-
get length() {
|
|
81
|
-
return BigInt(this.file.byteLength);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// loaders.gl
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
4
|
-
|
|
5
|
-
import {FileProviderInterface} from './file-provider-interface';
|
|
6
|
-
import {NodeFileFacade as NodeFile} from '../files/node-file-facade';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Provides file data using node fs library
|
|
10
|
-
* @deprecated - will be replaced with ReadableFile
|
|
11
|
-
*/
|
|
12
|
-
export class FileHandleFile implements FileProviderInterface {
|
|
13
|
-
/** The FileHandle from which data is provided */
|
|
14
|
-
private file: NodeFile;
|
|
15
|
-
|
|
16
|
-
/** Create a new FileHandleFile */
|
|
17
|
-
constructor(path: string, append: boolean = false) {
|
|
18
|
-
this.file = new NodeFile(path, append ? 'a+' : 'r');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Truncates the file descriptor.
|
|
23
|
-
* @param length desired file lenght
|
|
24
|
-
*/
|
|
25
|
-
async truncate(length: number): Promise<void> {
|
|
26
|
-
await this.file.truncate(length);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Append data to a file.
|
|
31
|
-
* @param buffer data to append
|
|
32
|
-
*/
|
|
33
|
-
async append(buffer: Uint8Array): Promise<void> {
|
|
34
|
-
await this.file.append(buffer);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** Close file */
|
|
38
|
-
async destroy(): Promise<void> {
|
|
39
|
-
await this.file.close();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
44
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
45
|
-
*/
|
|
46
|
-
async getUint8(offset: number | bigint): Promise<number> {
|
|
47
|
-
const arrayBuffer = await this.file.read(offset, 1);
|
|
48
|
-
const val = new Uint8Array(arrayBuffer).at(0);
|
|
49
|
-
if (val === undefined) {
|
|
50
|
-
throw new Error('something went wrong');
|
|
51
|
-
}
|
|
52
|
-
return val;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
57
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
58
|
-
*/
|
|
59
|
-
async getUint16(offset: number | bigint): Promise<number> {
|
|
60
|
-
const arrayBuffer = await this.file.read(offset, 2);
|
|
61
|
-
const val = new Uint16Array(arrayBuffer).at(0);
|
|
62
|
-
if (val === undefined) {
|
|
63
|
-
throw new Error('something went wrong');
|
|
64
|
-
}
|
|
65
|
-
return val;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
70
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
71
|
-
*/
|
|
72
|
-
async getUint32(offset: number | bigint): Promise<number> {
|
|
73
|
-
const arrayBuffer = await this.file.read(offset, 4);
|
|
74
|
-
const val = new Uint32Array(arrayBuffer).at(0);
|
|
75
|
-
if (val === undefined) {
|
|
76
|
-
throw new Error('something went wrong');
|
|
77
|
-
}
|
|
78
|
-
return val;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
83
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
84
|
-
*/
|
|
85
|
-
async getBigUint64(offset: number | bigint): Promise<bigint> {
|
|
86
|
-
const arrayBuffer = await this.file.read(offset, 8);
|
|
87
|
-
const val = new BigInt64Array(arrayBuffer).at(0);
|
|
88
|
-
if (val === undefined) {
|
|
89
|
-
throw new Error('something went wrong');
|
|
90
|
-
}
|
|
91
|
-
return val;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
96
|
-
* @param startOffset The offset, in byte, from the start of the file where to start reading the data.
|
|
97
|
-
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
98
|
-
*/
|
|
99
|
-
async slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer> {
|
|
100
|
-
const bigLength = endOffset - startOffset;
|
|
101
|
-
if (bigLength > Number.MAX_SAFE_INTEGER) {
|
|
102
|
-
throw new Error('too big slice');
|
|
103
|
-
}
|
|
104
|
-
const length = Number(bigLength);
|
|
105
|
-
return await this.file.read(startOffset, length);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* the length (in bytes) of the data.
|
|
110
|
-
*/
|
|
111
|
-
get length(): bigint {
|
|
112
|
-
return this.file.bigsize;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// loaders.gl
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Interface for providing file data
|
|
7
|
-
*/
|
|
8
|
-
export interface FileProviderInterface {
|
|
9
|
-
/**
|
|
10
|
-
* Cleanup class data
|
|
11
|
-
*/
|
|
12
|
-
destroy(): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
15
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
16
|
-
*/
|
|
17
|
-
getUint8(offset: bigint): Promise<number>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
21
|
-
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
22
|
-
*/
|
|
23
|
-
getUint16(offset: bigint): Promise<number>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
27
|
-
* @param offset The offset, in bytes, from the file of the view where to read the data.
|
|
28
|
-
*/
|
|
29
|
-
getUint32(offset: bigint): Promise<number>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
33
|
-
* @param offset The offset, in byte, from the file of the view where to read the data.
|
|
34
|
-
*/
|
|
35
|
-
getBigUint64(offset: bigint): Promise<bigint>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
39
|
-
* @param startOffset The offset, in bytes, from the start of the file where to start reading the data.
|
|
40
|
-
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
41
|
-
*/
|
|
42
|
-
slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer>;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* the length (in bytes) of the data.
|
|
46
|
-
*/
|
|
47
|
-
length: bigint;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Check is the object has FileProvider members
|
|
52
|
-
* @param fileProvider - tested object
|
|
53
|
-
*/
|
|
54
|
-
export const isFileProvider = (fileProvider: unknown) => {
|
|
55
|
-
return (
|
|
56
|
-
(fileProvider as FileProviderInterface)?.getUint8 &&
|
|
57
|
-
(fileProvider as FileProviderInterface)?.slice &&
|
|
58
|
-
(fileProvider as FileProviderInterface)?.length
|
|
59
|
-
);
|
|
60
|
-
};
|