@loaders.gl/core 5.0.0-beta.8 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GEOARROW-README.md +6 -0
- package/SCAN-README.md +2 -2
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +4 -1
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +1 -1
- package/dist/arrow-geometry/binary-features.js.map +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +270 -4
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +5 -4
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +198 -503
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +211 -218
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +166 -531
- package/dist/federated-table-scan-source.cjs.map +3 -3
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +5 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +1 -1
- package/dist/index.cjs +203 -197
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +7 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +2 -2
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +13 -12
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -5
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +55 -15
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +2 -5
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +2 -5
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +15 -24
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +7 -5
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -1
- package/dist/lib/loader-utils/native-arrow.js +34 -20
- package/dist/lib/loader-utils/native-arrow.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +7 -8
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +11 -105
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +126 -58
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +7 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +4 -2
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +0 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +2 -2
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +48 -3
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +12 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +17 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +15 -14
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +36 -22
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +0 -10
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +6 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +12 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +19 -67
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +2 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +4 -0
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +21 -9
- package/dist/loader-utils/tile-grid.cjs.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +32 -8
- package/dist/scan/arrow-execution/expressions.cjs.map +2 -2
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +15 -6
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +9 -5
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +7 -4
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +7 -8
- package/dist/scan/query-progressive.cjs.map +2 -2
- package/dist/scan/query-progressive.d.ts +5 -3
- package/dist/scan/query-progressive.d.ts.map +1 -1
- package/dist/scan/query-progressive.js +7 -8
- package/dist/scan/query-progressive.js.map +1 -1
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +195 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +47 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +201 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +118 -103
- package/dist/scan/query.cjs.map +2 -2
- package/dist/scan/query.d.ts +29 -22
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +111 -111
- package/dist/scan/query.js.map +1 -1
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +623 -860
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -7
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -6
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +3 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -76
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +241 -292
- package/dist/vector-table-scan-source.cjs.map +2 -2
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +4 -4
- package/dist/worker-utils/index.cjs.map +1 -1
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +4 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +2 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -13
- package/src/arrow-geometry/binary-features.ts +4 -1
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +5 -4
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +3 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +5 -2
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +2 -2
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/index.ts +1 -5
- package/src/lib/api/create-data-source.ts +15 -3
- package/src/lib/api/load-loader.ts +1 -1
- package/src/lib/api/load.ts +21 -25
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +2 -11
- package/src/lib/api/parse-in-batches.ts +81 -17
- package/src/lib/api/parse-sync.ts +3 -7
- package/src/lib/api/parse.ts +2 -6
- package/src/lib/api/select-loader.ts +15 -33
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/native-arrow.ts +38 -25
- package/src/lib/loader-utils/option-defaults.ts +7 -8
- package/src/lib/loader-utils/option-utils.ts +12 -112
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +17 -2
- package/src/loader-utils/lib/log-utils/log.ts +2 -5
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +18 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +64 -43
- package/src/loader-utils/lib/sources/data-source.ts +0 -12
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +34 -18
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +12 -18
- package/src/loader-utils/loader-types.ts +23 -69
- package/src/loader-utils/source-types.ts +5 -0
- package/src/null-loader.ts +1 -20
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +34 -10
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +12 -13
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +210 -165
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +7 -7
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -16
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +0 -28
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +0 -26
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +0 -58
|
@@ -2,24 +2,22 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
ArrayRowTable,
|
|
8
|
-
ObjectRowTable,
|
|
9
|
-
ColumnarTable,
|
|
10
|
-
ArrowTable
|
|
11
|
-
} from '@loaders.gl/core/schema';
|
|
5
|
+
import type {Table, ArrayRowTable, ObjectRowTable, ColumnarTable} from '@loaders.gl/core/schema';
|
|
6
|
+
import type * as arrow from 'apache-arrow';
|
|
12
7
|
import type {TableShape} from './table-converter';
|
|
13
8
|
import {convertTable} from '../convert-table';
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Converts between loaders.gl table wrapper shapes.
|
|
17
12
|
*/
|
|
18
|
-
export function convertTables(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export function convertTables(table: Table, shape:
|
|
13
|
+
export function convertTables(
|
|
14
|
+
table: Table | arrow.Table,
|
|
15
|
+
shape: 'object-row-table'
|
|
16
|
+
): ObjectRowTable;
|
|
17
|
+
export function convertTables(table: Table | arrow.Table, shape: 'array-row-table'): ArrayRowTable;
|
|
18
|
+
export function convertTables(table: Table | arrow.Table, shape: 'columnar-table'): ColumnarTable;
|
|
19
|
+
export function convertTables(table: Table | arrow.Table, shape: 'arrow'): arrow.Table;
|
|
20
|
+
export function convertTables(table: Table | arrow.Table, shape: TableShape): Table | arrow.Table {
|
|
23
21
|
switch (shape) {
|
|
24
22
|
case 'object-row-table':
|
|
25
23
|
return convertTable(table, 'object-row-table');
|
|
@@ -27,8 +25,8 @@ export function convertTables(table: Table, shape: TableShape): Table {
|
|
|
27
25
|
return convertTable(table, 'array-row-table');
|
|
28
26
|
case 'columnar-table':
|
|
29
27
|
return convertTable(table, 'columnar-table');
|
|
30
|
-
case 'arrow
|
|
31
|
-
return convertTable(table, 'arrow
|
|
28
|
+
case 'arrow':
|
|
29
|
+
return convertTable(table, 'arrow');
|
|
32
30
|
default:
|
|
33
31
|
throw new Error(`Unsupported table conversion target: ${shape}`);
|
|
34
32
|
}
|
|
@@ -4,30 +4,33 @@
|
|
|
4
4
|
|
|
5
5
|
import type {Converter} from '../../../converters/converters';
|
|
6
6
|
import type {Table} from '@loaders.gl/core/schema';
|
|
7
|
+
import type * as arrow from 'apache-arrow';
|
|
8
|
+
import {isArrowTable} from '../../../../../lib/loader-utils/native-arrow';
|
|
7
9
|
import {convertTables} from './convert-tables';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Shapes supported by the loaders.gl table converter.
|
|
11
13
|
*/
|
|
12
|
-
export type TableShape = 'object-row-table' | 'array-row-table' | 'columnar-table' | 'arrow
|
|
14
|
+
export type TableShape = 'object-row-table' | 'array-row-table' | 'columnar-table' | 'arrow';
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* Leaf converter for loaders.gl table wrapper shapes.
|
|
16
18
|
*/
|
|
17
19
|
export const TableConverter: Converter<TableShape> = {
|
|
18
20
|
id: 'table',
|
|
19
|
-
from: ['object-row-table', 'array-row-table', 'columnar-table', 'arrow
|
|
20
|
-
to: ['object-row-table', 'array-row-table', 'columnar-table', 'arrow
|
|
21
|
+
from: ['object-row-table', 'array-row-table', 'columnar-table', 'arrow'],
|
|
22
|
+
to: ['object-row-table', 'array-row-table', 'columnar-table', 'arrow'],
|
|
21
23
|
canConvert(sourceShape, targetShape) {
|
|
22
24
|
return sourceShape !== targetShape;
|
|
23
25
|
},
|
|
24
26
|
detectInputShape(input) {
|
|
27
|
+
if (isArrowTable(input)) return 'arrow';
|
|
25
28
|
if (
|
|
26
29
|
typeof input === 'object' &&
|
|
27
30
|
input !== null &&
|
|
28
31
|
'shape' in input &&
|
|
29
32
|
typeof input.shape === 'string' &&
|
|
30
|
-
['object-row-table', 'array-row-table', 'columnar-table'
|
|
33
|
+
['object-row-table', 'array-row-table', 'columnar-table'].includes(input.shape)
|
|
31
34
|
) {
|
|
32
35
|
return input.shape as TableShape;
|
|
33
36
|
}
|
|
@@ -36,13 +39,13 @@ export const TableConverter: Converter<TableShape> = {
|
|
|
36
39
|
convert(input, targetShape) {
|
|
37
40
|
switch (targetShape) {
|
|
38
41
|
case 'object-row-table':
|
|
39
|
-
return convertTables(input as Table, 'object-row-table');
|
|
42
|
+
return convertTables(input as Table | arrow.Table, 'object-row-table');
|
|
40
43
|
case 'array-row-table':
|
|
41
|
-
return convertTables(input as Table, 'array-row-table');
|
|
44
|
+
return convertTables(input as Table | arrow.Table, 'array-row-table');
|
|
42
45
|
case 'columnar-table':
|
|
43
|
-
return convertTables(input as Table, 'columnar-table');
|
|
44
|
-
case 'arrow
|
|
45
|
-
return convertTables(input as Table, 'arrow
|
|
46
|
+
return convertTables(input as Table | arrow.Table, 'columnar-table');
|
|
47
|
+
case 'arrow':
|
|
48
|
+
return convertTables(input as Table | arrow.Table, 'arrow');
|
|
46
49
|
default:
|
|
47
50
|
throw new Error(`Unsupported table conversion target: ${targetShape}`);
|
|
48
51
|
}
|
|
@@ -7,8 +7,7 @@ import type {
|
|
|
7
7
|
ObjectRowTable,
|
|
8
8
|
ArrayRowTable,
|
|
9
9
|
ColumnarTable,
|
|
10
|
-
GeoJSONTable
|
|
11
|
-
ArrowTable
|
|
10
|
+
GeoJSONTable
|
|
12
11
|
} from '@loaders.gl/core/schema';
|
|
13
12
|
|
|
14
13
|
/** Checks if a table is of array row layout */
|
|
@@ -30,8 +29,3 @@ export function isColumnarTable(table: Table): table is ColumnarTable {
|
|
|
30
29
|
export function isGeoJSONTable(table: Table): table is GeoJSONTable {
|
|
31
30
|
return table.shape === 'geojson-table';
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
/** Checks if table wraps an Apache Arrow table */
|
|
35
|
-
export function isArrowTable(table: Table): table is ArrowTable {
|
|
36
|
-
return table.shape === 'arrow-table';
|
|
37
|
-
}
|
package/src/wkt/index.ts
CHANGED
|
@@ -10,7 +10,10 @@ import {getTransferList, getTransferListForWriter} from '../worker-utils/get-tra
|
|
|
10
10
|
import {isBrowser, isMobile} from '../env-utils/globals';
|
|
11
11
|
|
|
12
12
|
/** Loader processing options mapped onto public task controls. */
|
|
13
|
-
export type ProcessOnWorkerOptions = WorkerOptions
|
|
13
|
+
export type ProcessOnWorkerOptions = WorkerOptions & {
|
|
14
|
+
/** Parser options to send independently of the worker routing controls. */
|
|
15
|
+
parserOptions?: Record<string, unknown>;
|
|
16
|
+
};
|
|
14
17
|
/** Code preload cancellation controls; preloading does not reserve workers. */
|
|
15
18
|
export type PreloadWorkerOptions = Pick<TaskRunControls, 'signal'>;
|
|
16
19
|
|
|
@@ -153,9 +156,9 @@ function getControls(options: WorkerOptions): TaskRunControls {
|
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
/** Removes caller-only callbacks before options cross the task boundary. */
|
|
156
|
-
function getParserOptions(options:
|
|
157
|
-
const {signal, onProgress, ...
|
|
158
|
-
return getTransferListForWriter(parserOptions);
|
|
159
|
+
function getParserOptions(options: ProcessOnWorkerOptions): Record<string, any> {
|
|
160
|
+
const {signal, onProgress, parserOptions, ...workerOptions} = options;
|
|
161
|
+
return getTransferListForWriter(parserOptions ?? workerOptions);
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
/** Opens one task-owned callback channel and guarantees cleanup if initialization fails. */
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/arrow-geometry/native-geometry.ts
|
|
31
|
-
var native_geometry_exports = {};
|
|
32
|
-
__export(native_geometry_exports, {
|
|
33
|
-
getGeoArrowNativeGeometry: () => getGeoArrowNativeGeometry,
|
|
34
|
-
getGeoArrowUnionGeometryKind: () => import_geoarrow_union_kind2.getGeoArrowUnionGeometryKind
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(native_geometry_exports);
|
|
37
|
-
var arrow = __toESM(require("apache-arrow"), 1);
|
|
38
|
-
var import_geoarrow_union_kind = require("./geoarrow-union-kind.cjs");
|
|
39
|
-
var import_geoarrow_union_kind2 = require("./geoarrow-union-kind.cjs");
|
|
40
|
-
function getGeoArrowNativeGeometry(column, rowIndex, encoding, maximumDepth = 64) {
|
|
41
|
-
if (rowIndex < 0 || rowIndex >= column.length || encoding === "geoarrow.box") return null;
|
|
42
|
-
if (encoding === "geoarrow.geometry") {
|
|
43
|
-
const unionCell = getUnionCell(column, rowIndex);
|
|
44
|
-
return unionCell ? readUnionGeometry(unionCell, maximumDepth, 0) : null;
|
|
45
|
-
}
|
|
46
|
-
if (encoding === "geoarrow.geometrycollection") {
|
|
47
|
-
const value = column.get(rowIndex);
|
|
48
|
-
return value == null ? null : { type: "GeometryCollection", geometries: readCollectionVector(value, maximumDepth, 0) };
|
|
49
|
-
}
|
|
50
|
-
if (!isNativeEncoding(encoding)) return null;
|
|
51
|
-
const coordinates = readNativeCoordinates(column.get(rowIndex), getEncodingDepth(encoding));
|
|
52
|
-
return coordinates ? makeConcreteGeometry(encoding, coordinates) : null;
|
|
53
|
-
}
|
|
54
|
-
function makeConcreteGeometry(encoding, coordinates) {
|
|
55
|
-
switch (encoding) {
|
|
56
|
-
case "geoarrow.point":
|
|
57
|
-
return { type: "Point", coordinates };
|
|
58
|
-
case "geoarrow.multipoint":
|
|
59
|
-
return { type: "MultiPoint", coordinates };
|
|
60
|
-
case "geoarrow.linestring":
|
|
61
|
-
return { type: "LineString", coordinates };
|
|
62
|
-
case "geoarrow.multilinestring":
|
|
63
|
-
return { type: "MultiLineString", coordinates };
|
|
64
|
-
case "geoarrow.polygon":
|
|
65
|
-
return { type: "Polygon", coordinates };
|
|
66
|
-
case "geoarrow.multipolygon":
|
|
67
|
-
return { type: "MultiPolygon", coordinates };
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
function readNativeCoordinates(value, depth) {
|
|
71
|
-
if (value == null) return null;
|
|
72
|
-
if (depth === 0) return readCoordinate(value);
|
|
73
|
-
const children = readChildren(value);
|
|
74
|
-
if (!children) return null;
|
|
75
|
-
const coordinates = [];
|
|
76
|
-
for (const child of children) {
|
|
77
|
-
const parsed = readNativeCoordinates(child, depth - 1);
|
|
78
|
-
if (!parsed) return null;
|
|
79
|
-
coordinates.push(parsed);
|
|
80
|
-
}
|
|
81
|
-
return coordinates;
|
|
82
|
-
}
|
|
83
|
-
function readCoordinate(value) {
|
|
84
|
-
if (value && typeof value === "object" && "x" in value && "y" in value) {
|
|
85
|
-
const coordinate = value;
|
|
86
|
-
const values = [coordinate.x, coordinate.y];
|
|
87
|
-
if (typeof coordinate.z === "number") values.push(coordinate.z);
|
|
88
|
-
if (typeof coordinate.m === "number") values.push(coordinate.m);
|
|
89
|
-
return values.every((item) => typeof item === "number") ? values : null;
|
|
90
|
-
}
|
|
91
|
-
if (value && typeof value.toArray === "function") {
|
|
92
|
-
return readCoordinate(value.toArray());
|
|
93
|
-
}
|
|
94
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
95
|
-
const values = Array.from(value);
|
|
96
|
-
return values.every((item) => typeof item === "number") ? values : null;
|
|
97
|
-
}
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
function readChildren(value) {
|
|
101
|
-
if (value && typeof value.toArray === "function") {
|
|
102
|
-
return Array.from(value.toArray());
|
|
103
|
-
}
|
|
104
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
105
|
-
return Array.from(value);
|
|
106
|
-
}
|
|
107
|
-
if (isVectorLike(value)) {
|
|
108
|
-
const children = [];
|
|
109
|
-
for (let index = 0; index < value.length; index++) children.push(value.get(index));
|
|
110
|
-
return children;
|
|
111
|
-
}
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
function getUnionCell(column, rowIndex) {
|
|
115
|
-
const unionType = column.type;
|
|
116
|
-
if (!(unionType instanceof arrow.DenseUnion)) return null;
|
|
117
|
-
let remainingRowIndex = rowIndex;
|
|
118
|
-
for (const chunk of column.data) {
|
|
119
|
-
if (remainingRowIndex >= chunk.length) {
|
|
120
|
-
remainingRowIndex -= chunk.length;
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
const bufferIndex = chunk.typeIds.length <= chunk.length ? remainingRowIndex : chunk.offset + remainingRowIndex;
|
|
124
|
-
const typeId = chunk.typeIds?.[bufferIndex];
|
|
125
|
-
const valueOffset = chunk.valueOffsets?.[bufferIndex];
|
|
126
|
-
const childIndex = unionType.typeIds.indexOf(typeId);
|
|
127
|
-
const child = childIndex >= 0 ? chunk.children[childIndex] : void 0;
|
|
128
|
-
const childField = childIndex >= 0 ? unionType.children[childIndex] : void 0;
|
|
129
|
-
if (!child || !childField || valueOffset === void 0 || valueOffset < 0 || valueOffset >= child.length) {
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
const childVector = arrow.makeVector(child);
|
|
133
|
-
return {
|
|
134
|
-
childName: childField.name,
|
|
135
|
-
typeId,
|
|
136
|
-
value: childVector.get(valueOffset)
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
return null;
|
|
140
|
-
}
|
|
141
|
-
function readUnionGeometry(cell, maximumDepth, depth) {
|
|
142
|
-
const unionGeometry = (0, import_geoarrow_union_kind.getGeoArrowUnionGeometryKind)(cell.childName, cell.typeId);
|
|
143
|
-
if (unionGeometry === "GeometryCollection") {
|
|
144
|
-
if (depth >= maximumDepth) {
|
|
145
|
-
throw new Error(
|
|
146
|
-
`GeometryCollection nesting exceeds maxGeometryCollectionDepth (${maximumDepth}).`
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
return {
|
|
150
|
-
type: "GeometryCollection",
|
|
151
|
-
geometries: readCollectionVector(cell.value, maximumDepth, depth + 1)
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
const encoding = getEncodingForUnionGeometry(unionGeometry);
|
|
155
|
-
if (!encoding) return null;
|
|
156
|
-
const coordinates = readNativeCoordinates(cell.value, getEncodingDepth(encoding));
|
|
157
|
-
return coordinates ? makeConcreteGeometry(encoding, coordinates) : null;
|
|
158
|
-
}
|
|
159
|
-
function getEncodingForUnionGeometry(geometryFamily) {
|
|
160
|
-
switch (geometryFamily) {
|
|
161
|
-
case "Point":
|
|
162
|
-
return "geoarrow.point";
|
|
163
|
-
case "LineString":
|
|
164
|
-
return "geoarrow.linestring";
|
|
165
|
-
case "Polygon":
|
|
166
|
-
return "geoarrow.polygon";
|
|
167
|
-
case "MultiPoint":
|
|
168
|
-
return "geoarrow.multipoint";
|
|
169
|
-
case "MultiLineString":
|
|
170
|
-
return "geoarrow.multilinestring";
|
|
171
|
-
case "MultiPolygon":
|
|
172
|
-
return "geoarrow.multipolygon";
|
|
173
|
-
default:
|
|
174
|
-
return null;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function readCollectionVector(value, maximumDepth, depth) {
|
|
178
|
-
if (!isVectorLike(value)) return [];
|
|
179
|
-
const geometries = [];
|
|
180
|
-
for (let rowIndex = 0; rowIndex < value.length; rowIndex++) {
|
|
181
|
-
const cell = getUnionCell(value, rowIndex);
|
|
182
|
-
if (!cell) continue;
|
|
183
|
-
const geometry = readUnionGeometry(cell, maximumDepth, depth);
|
|
184
|
-
if (geometry) geometries.push(geometry);
|
|
185
|
-
}
|
|
186
|
-
return geometries;
|
|
187
|
-
}
|
|
188
|
-
function getEncodingDepth(encoding) {
|
|
189
|
-
switch (encoding) {
|
|
190
|
-
case "geoarrow.point":
|
|
191
|
-
return 0;
|
|
192
|
-
case "geoarrow.linestring":
|
|
193
|
-
case "geoarrow.multipoint":
|
|
194
|
-
return 1;
|
|
195
|
-
case "geoarrow.polygon":
|
|
196
|
-
case "geoarrow.multilinestring":
|
|
197
|
-
return 2;
|
|
198
|
-
case "geoarrow.multipolygon":
|
|
199
|
-
return 3;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function isNativeEncoding(encoding) {
|
|
203
|
-
return encoding === "geoarrow.point" || encoding === "geoarrow.linestring" || encoding === "geoarrow.polygon" || encoding === "geoarrow.multipoint" || encoding === "geoarrow.multilinestring" || encoding === "geoarrow.multipolygon";
|
|
204
|
-
}
|
|
205
|
-
function isVectorLike(value) {
|
|
206
|
-
return Boolean(
|
|
207
|
-
value && typeof value.length === "number" && typeof value.get === "function"
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
211
|
-
0 && (module.exports = {
|
|
212
|
-
getGeoArrowNativeGeometry,
|
|
213
|
-
getGeoArrowUnionGeometryKind
|
|
214
|
-
});
|
|
215
|
-
//# sourceMappingURL=native-geometry.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/arrow-geometry/native-geometry.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as arrow from 'apache-arrow';\nimport type {GeoArrowEncoding} from '@loaders.gl/core/schema';\nimport {getGeoArrowUnionGeometryKind, type GeoArrowUnionGeometryKind} from './geoarrow-union-kind';\n\nexport {getGeoArrowUnionGeometryKind, type GeoArrowUnionGeometryKind} from './geoarrow-union-kind';\n\n/** Native geometry value containing coordinate arrays without GeoJSON properties. */\nexport type GeoArrowNativeGeometry =\n | {type: 'Point'; coordinates: number[]}\n | {type: 'MultiPoint'; coordinates: number[][]}\n | {type: 'LineString'; coordinates: number[][]}\n | {type: 'MultiLineString'; coordinates: number[][][]}\n | {type: 'Polygon'; coordinates: number[][][]}\n | {type: 'MultiPolygon'; coordinates: number[][][][]}\n | {type: 'GeometryCollection'; geometries: GeoArrowNativeGeometry[]};\n\ntype NativeEncoding = Exclude<\n GeoArrowEncoding,\n | 'geoarrow.geometry'\n | 'geoarrow.geometrycollection'\n | 'geoarrow.box'\n | 'geoarrow.wkb'\n | 'geoarrow.wkt'\n>;\ntype NativeCoordinates = number[] | NativeCoordinates[];\n\n/**\n * Reads one native GeoArrow row into a geometry-family tagged coordinate value.\n *\n * The result omits GeoJSON properties and preserves native coordinate nesting so callers can\n * process geometry without creating GeoJSON feature objects. Dense unions and spec-conforming\n * GeometryCollections are decoded recursively.\n *\n * @param column Native GeoArrow vector.\n * @param rowIndex Logical row index.\n * @param encoding Declared GeoArrow encoding.\n * @param maximumDepth Maximum nested GeometryCollection depth.\n * @returns Native geometry or `null` for a null/unsupported row.\n */\nexport function getGeoArrowNativeGeometry(\n column: arrow.Vector,\n rowIndex: number,\n encoding: GeoArrowEncoding,\n maximumDepth = 64\n): GeoArrowNativeGeometry | null {\n if (rowIndex < 0 || rowIndex >= column.length || encoding === 'geoarrow.box') return null;\n if (encoding === 'geoarrow.geometry') {\n const unionCell = getUnionCell(column, rowIndex);\n return unionCell ? readUnionGeometry(unionCell, maximumDepth, 0) : null;\n }\n if (encoding === 'geoarrow.geometrycollection') {\n const value = column.get(rowIndex);\n return value == null\n ? null\n : {type: 'GeometryCollection', geometries: readCollectionVector(value, maximumDepth, 0)};\n }\n if (!isNativeEncoding(encoding)) return null;\n const coordinates = readNativeCoordinates(column.get(rowIndex), getEncodingDepth(encoding));\n return coordinates ? makeConcreteGeometry(encoding, coordinates) : null;\n}\n\n/** Converts one concrete native encoding and coordinate nesting to a tagged geometry value. */\nfunction makeConcreteGeometry(\n encoding: NativeEncoding,\n coordinates: NativeCoordinates\n): GeoArrowNativeGeometry {\n switch (encoding) {\n case 'geoarrow.point':\n return {type: 'Point', coordinates: coordinates as number[]};\n case 'geoarrow.multipoint':\n return {type: 'MultiPoint', coordinates: coordinates as number[][]};\n case 'geoarrow.linestring':\n return {type: 'LineString', coordinates: coordinates as number[][]};\n case 'geoarrow.multilinestring':\n return {type: 'MultiLineString', coordinates: coordinates as number[][][]};\n case 'geoarrow.polygon':\n return {type: 'Polygon', coordinates: coordinates as number[][][]};\n case 'geoarrow.multipolygon':\n return {type: 'MultiPolygon', coordinates: coordinates as number[][][][]};\n }\n}\n\n/** Reads an Arrow native value recursively at the encoding's list depth. */\nfunction readNativeCoordinates(value: unknown, depth: number): NativeCoordinates | null {\n if (value == null) return null;\n if (depth === 0) return readCoordinate(value);\n const children = readChildren(value);\n if (!children) return null;\n const coordinates: NativeCoordinates[] = [];\n for (const child of children) {\n const parsed = readNativeCoordinates(child, depth - 1);\n if (!parsed) return null;\n coordinates.push(parsed);\n }\n return coordinates;\n}\n\n/** Reads interleaved or separated coordinate values by position. */\nfunction readCoordinate(value: unknown): number[] | null {\n if (value && typeof value === 'object' && 'x' in value && 'y' in value) {\n const coordinate = value as {x: unknown; y: unknown; z?: unknown; m?: unknown};\n const values = [coordinate.x, coordinate.y];\n if (typeof coordinate.z === 'number') values.push(coordinate.z);\n if (typeof coordinate.m === 'number') values.push(coordinate.m);\n return values.every(item => typeof item === 'number') ? (values as number[]) : null;\n }\n if (value && typeof (value as {toArray?: unknown}).toArray === 'function') {\n return readCoordinate((value as {toArray(): ArrayLike<unknown>}).toArray());\n }\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n const values = Array.from(value as ArrayLike<unknown>);\n return values.every(item => typeof item === 'number') ? (values as number[]) : null;\n }\n return null;\n}\n\n/** Reads list children from Arrow values and vectors. */\nfunction readChildren(value: unknown): unknown[] | null {\n if (value && typeof (value as {toArray?: unknown}).toArray === 'function') {\n return Array.from((value as {toArray(): ArrayLike<unknown>}).toArray());\n }\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n return Array.from(value as ArrayLike<unknown>);\n }\n if (isVectorLike(value)) {\n const children: unknown[] = [];\n for (let index = 0; index < value.length; index++) children.push(value.get(index));\n return children;\n }\n return null;\n}\n\n/** Resolves a dense-union cell from full or sliced Arrow buffers. */\nfunction getUnionCell(\n column: arrow.Vector,\n rowIndex: number\n): {\n childName: string;\n typeId: number;\n value: unknown;\n} | null {\n const unionType = column.type;\n if (!(unionType instanceof arrow.DenseUnion)) return null;\n let remainingRowIndex = rowIndex;\n for (const chunk of column.data) {\n if (remainingRowIndex >= chunk.length) {\n remainingRowIndex -= chunk.length;\n continue;\n }\n const bufferIndex =\n chunk.typeIds.length <= chunk.length ? remainingRowIndex : chunk.offset + remainingRowIndex;\n const typeId = chunk.typeIds?.[bufferIndex];\n const valueOffset = chunk.valueOffsets?.[bufferIndex];\n const childIndex = unionType.typeIds.indexOf(typeId);\n const child = childIndex >= 0 ? chunk.children[childIndex] : undefined;\n const childField = childIndex >= 0 ? unionType.children[childIndex] : undefined;\n if (\n !child ||\n !childField ||\n valueOffset === undefined ||\n valueOffset < 0 ||\n valueOffset >= child.length\n ) {\n return null;\n }\n const childVector = arrow.makeVector(child);\n return {\n childName: childField.name,\n typeId,\n value: childVector.get(valueOffset)\n };\n }\n return null;\n}\n\n/** Reads one union cell, including GeometryCollection children. */\nfunction readUnionGeometry(\n cell: {childName: string; typeId: number; value: unknown},\n maximumDepth: number,\n depth: number\n): GeoArrowNativeGeometry | null {\n const unionGeometry = getGeoArrowUnionGeometryKind(cell.childName, cell.typeId);\n if (unionGeometry === 'GeometryCollection') {\n if (depth >= maximumDepth) {\n throw new Error(\n `GeometryCollection nesting exceeds maxGeometryCollectionDepth (${maximumDepth}).`\n );\n }\n return {\n type: 'GeometryCollection',\n geometries: readCollectionVector(cell.value, maximumDepth, depth + 1)\n };\n }\n const encoding = getEncodingForUnionGeometry(unionGeometry);\n if (!encoding) return null;\n const coordinates = readNativeCoordinates(cell.value, getEncodingDepth(encoding));\n return coordinates ? makeConcreteGeometry(encoding, coordinates) : null;\n}\n\n/** Maps a resolved union family to its native encoding. */\nfunction getEncodingForUnionGeometry(\n geometryFamily: Exclude<GeoArrowUnionGeometryKind, 'GeometryCollection'> | null\n): NativeEncoding | null {\n switch (geometryFamily) {\n case 'Point':\n return 'geoarrow.point';\n case 'LineString':\n return 'geoarrow.linestring';\n case 'Polygon':\n return 'geoarrow.polygon';\n case 'MultiPoint':\n return 'geoarrow.multipoint';\n case 'MultiLineString':\n return 'geoarrow.multilinestring';\n case 'MultiPolygon':\n return 'geoarrow.multipolygon';\n default:\n return null;\n }\n}\n\n/** Reads all members of a GeometryCollection union vector. */\nfunction readCollectionVector(\n value: unknown,\n maximumDepth: number,\n depth: number\n): GeoArrowNativeGeometry[] {\n if (!isVectorLike(value)) return [];\n const geometries: GeoArrowNativeGeometry[] = [];\n for (let rowIndex = 0; rowIndex < value.length; rowIndex++) {\n const cell = getUnionCell(value as arrow.Vector, rowIndex);\n if (!cell) continue;\n const geometry = readUnionGeometry(cell, maximumDepth, depth);\n if (geometry) geometries.push(geometry);\n }\n return geometries;\n}\n\n/** Resolves native nesting depth from a concrete encoding. */\nfunction getEncodingDepth(encoding: NativeEncoding): 0 | 1 | 2 | 3 {\n switch (encoding) {\n case 'geoarrow.point':\n return 0;\n case 'geoarrow.linestring':\n case 'geoarrow.multipoint':\n return 1;\n case 'geoarrow.polygon':\n case 'geoarrow.multilinestring':\n return 2;\n case 'geoarrow.multipolygon':\n return 3;\n }\n}\n\n/** Checks whether an encoding is a concrete native geometry encoding. */\nfunction isNativeEncoding(encoding: GeoArrowEncoding): encoding is NativeEncoding {\n return (\n encoding === 'geoarrow.point' ||\n encoding === 'geoarrow.linestring' ||\n encoding === 'geoarrow.polygon' ||\n encoding === 'geoarrow.multipoint' ||\n encoding === 'geoarrow.multilinestring' ||\n encoding === 'geoarrow.multipolygon'\n );\n}\n\n/** Detects Arrow vectors returned for nested list or union values. */\nfunction isVectorLike(value: unknown): value is {length: number; get(index: number): unknown} {\n return Boolean(\n value &&\n typeof (value as {length?: unknown}).length === 'number' &&\n typeof (value as {get?: unknown}).get === 'function'\n );\n}\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": ["import_geoarrow_union_kind"]
|
|
7
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as arrow from 'apache-arrow';
|
|
2
|
-
import type { GeoArrowEncoding } from '@loaders.gl/core/schema';
|
|
3
|
-
export { getGeoArrowUnionGeometryKind, type GeoArrowUnionGeometryKind } from "./geoarrow-union-kind.js";
|
|
4
|
-
/** Native geometry value containing coordinate arrays without GeoJSON properties. */
|
|
5
|
-
export type GeoArrowNativeGeometry = {
|
|
6
|
-
type: 'Point';
|
|
7
|
-
coordinates: number[];
|
|
8
|
-
} | {
|
|
9
|
-
type: 'MultiPoint';
|
|
10
|
-
coordinates: number[][];
|
|
11
|
-
} | {
|
|
12
|
-
type: 'LineString';
|
|
13
|
-
coordinates: number[][];
|
|
14
|
-
} | {
|
|
15
|
-
type: 'MultiLineString';
|
|
16
|
-
coordinates: number[][][];
|
|
17
|
-
} | {
|
|
18
|
-
type: 'Polygon';
|
|
19
|
-
coordinates: number[][][];
|
|
20
|
-
} | {
|
|
21
|
-
type: 'MultiPolygon';
|
|
22
|
-
coordinates: number[][][][];
|
|
23
|
-
} | {
|
|
24
|
-
type: 'GeometryCollection';
|
|
25
|
-
geometries: GeoArrowNativeGeometry[];
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Reads one native GeoArrow row into a geometry-family tagged coordinate value.
|
|
29
|
-
*
|
|
30
|
-
* The result omits GeoJSON properties and preserves native coordinate nesting so callers can
|
|
31
|
-
* process geometry without creating GeoJSON feature objects. Dense unions and spec-conforming
|
|
32
|
-
* GeometryCollections are decoded recursively.
|
|
33
|
-
*
|
|
34
|
-
* @param column Native GeoArrow vector.
|
|
35
|
-
* @param rowIndex Logical row index.
|
|
36
|
-
* @param encoding Declared GeoArrow encoding.
|
|
37
|
-
* @param maximumDepth Maximum nested GeometryCollection depth.
|
|
38
|
-
* @returns Native geometry or `null` for a null/unsupported row.
|
|
39
|
-
*/
|
|
40
|
-
export declare function getGeoArrowNativeGeometry(column: arrow.Vector, rowIndex: number, encoding: GeoArrowEncoding, maximumDepth?: number): GeoArrowNativeGeometry | null;
|
|
41
|
-
//# sourceMappingURL=native-geometry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native-geometry.d.ts","sourceRoot":"","sources":["../../src/arrow-geometry/native-geometry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAC,4BAA4B,EAAE,KAAK,yBAAyB,EAAC,iCAA8B;AAEnG,qFAAqF;AACrF,MAAM,MAAM,sBAAsB,GAC9B;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAC,GACtC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,CAAA;CAAC,GAC7C;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,CAAA;CAAC,GAC7C;IAAC,IAAI,EAAE,iBAAiB,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;CAAC,GACpD;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;CAAC,GAC5C;IAAC,IAAI,EAAE,cAAc,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAA;CAAC,GACnD;IAAC,IAAI,EAAE,oBAAoB,CAAC;IAAC,UAAU,EAAE,sBAAsB,EAAE,CAAA;CAAC,CAAC;AAYvE;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,SAAK,GAChB,sBAAsB,GAAG,IAAI,CAe/B"}
|