@loaders.gl/core 5.0.0-beta.1 → 5.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GEOARROW-README.md +1 -1
- package/README.md +4 -2
- package/SCAN-README.md +3 -3
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/index.cjs +0 -11
- package/dist/arrow-geometry/index.cjs.map +2 -2
- package/dist/arrow-geometry/index.d.ts +0 -1
- package/dist/arrow-geometry/index.d.ts.map +1 -1
- package/dist/arrow-geometry/index.js +0 -1
- package/dist/arrow-geometry/index.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +105 -0
- package/dist/arrow-worker-transport.cjs.map +6 -0
- package/dist/arrow-worker-transport.d.ts +11 -0
- package/dist/arrow-worker-transport.d.ts.map +1 -0
- package/dist/arrow-worker-transport.js +77 -0
- package/dist/arrow-worker-transport.js.map +1 -0
- package/dist/cluster-source.cjs +6874 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/dist.dev.js +3040 -817
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2409 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +8 -8
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +11 -12
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +10 -13
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +746 -1365
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +9 -10
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +31 -114
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +854 -1295
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +17 -8
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +9 -5
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +4 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.js +45 -1
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-types.d.ts +2 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/read-range-response.d.ts +3 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.js +62 -0
- package/dist/loader-utils/lib/files/read-range-response.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +43 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +104 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/{experimental-scan-options.d.ts → query-options.d.ts} +5 -8
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts.map +1 -0
- package/dist/{schema-utils/lib/table/batch-builder/table-batch-aggregator.js → loader-utils/lib/scan-utils/query-options.js} +1 -1
- package/dist/loader-utils/lib/scan-utils/query-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +58 -18
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +17 -6
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +54 -3
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +18 -12
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +58 -29
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts +4 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +53 -14
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +31 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -0
- package/dist/loader-utils/lib/{scan-utils/experimental-scan-options.js → sources/table-source-collection.js} +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +2 -5
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +40 -21
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +118 -91
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +771 -82
- package/dist/null-worker.js +742 -81
- package/dist/polyfills/images/encode-image-node.d.ts +18 -15
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/encode-image-node.js +19 -33
- package/dist/polyfills/images/encode-image-node.js.map +1 -1
- package/dist/polyfills/images/image-codecs-node.d.ts +2 -6
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -1
- package/dist/polyfills/images/image-codecs-node.js +2 -24
- package/dist/polyfills/images/image-codecs-node.js.map +1 -1
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +1 -1
- package/dist/polyfills/images/node-image-bitmap.js +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -1
- package/dist/polyfills/images/node-image-formats.js +10 -4
- package/dist/polyfills/images/node-image-formats.js.map +1 -1
- package/dist/polyfills/images/parse-image-node.d.ts +10 -2
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/parse-image-node.js +20 -32
- package/dist/polyfills/images/parse-image-node.js.map +1 -1
- package/dist/polyfills/index.cjs +76 -151
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +134 -0
- package/dist/scan/arrow-execution/expressions.cjs.map +7 -0
- package/dist/scan/arrow-execution/expressions.d.ts +11 -0
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -0
- package/dist/scan/arrow-execution/expressions.js +86 -0
- package/dist/scan/arrow-execution/expressions.js.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +255 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts +18 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js +224 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs +70 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts +8 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.js +39 -0
- package/dist/scan/arrow-execution/project-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution.cjs +34 -0
- package/dist/scan/arrow-execution.cjs.map +7 -0
- package/dist/scan/arrow-execution.d.ts +4 -0
- package/dist/scan/arrow-execution.d.ts.map +1 -0
- package/dist/scan/arrow-execution.js +6 -0
- package/dist/scan/arrow-execution.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs.map +1 -1
- package/dist/scan/arrow-query.d.ts +1 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/catalog-query-source.cjs +122 -0
- package/dist/scan/catalog-query-source.cjs.map +7 -0
- package/dist/scan/catalog-query-source.d.ts +6 -0
- package/dist/scan/catalog-query-source.d.ts.map +1 -0
- package/dist/scan/catalog-query-source.js +115 -0
- package/dist/scan/catalog-query-source.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +42 -43
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +6 -10
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +39 -40
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +213 -6
- package/dist/scan/index.cjs.map +4 -4
- package/dist/scan/index.d.ts +15 -4
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -2
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +3 -294
- package/dist/scan/parse-sql-predicate.cjs.map +3 -3
- package/dist/scan/parse-sql-predicate.d.ts +6 -9
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -1
- package/dist/scan/parse-sql-predicate.js +5 -314
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +75 -0
- package/dist/scan/query-arrow-table-in-batches.cjs.map +7 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts +8 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.js +54 -0
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +65 -202
- package/dist/scan/query-arrow-table.cjs.map +3 -3
- package/dist/scan/query-arrow-table.d.ts +7 -40
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +51 -211
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +39 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +140 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +35 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +120 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +385 -0
- package/dist/scan/query.cjs.map +7 -0
- package/dist/scan/query.d.ts +67 -0
- package/dist/scan/query.d.ts.map +1 -0
- package/dist/scan/query.js +402 -0
- package/dist/scan/query.js.map +1 -0
- package/dist/scan/resolve-query-source.cjs +59 -0
- package/dist/scan/resolve-query-source.cjs.map +7 -0
- package/dist/scan/resolve-query-source.d.ts +6 -0
- package/dist/scan/resolve-query-source.d.ts.map +1 -0
- package/dist/scan/resolve-query-source.js +37 -0
- package/dist/scan/resolve-query-source.js.map +1 -0
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/sql-catalog.cjs +110 -0
- package/dist/scan/sql-catalog.cjs.map +7 -0
- package/dist/scan/sql-catalog.d.ts +47 -0
- package/dist/scan/sql-catalog.d.ts.map +1 -0
- package/dist/scan/sql-catalog.js +97 -0
- package/dist/scan/sql-catalog.js.map +1 -0
- package/dist/scan/table-query.cjs.map +2 -2
- package/dist/scan/table-query.d.ts +4 -1
- package/dist/scan/table-query.d.ts.map +1 -1
- package/dist/scan/table-query.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +3 -6
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +11 -7
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +404 -620
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +7 -3
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +13 -75
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +1766 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/worker-utils/index.cjs +407 -1184
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/index.d.ts +2 -8
- package/dist/worker-utils/index.d.ts.map +1 -1
- package/dist/worker-utils/index.js +1 -10
- package/dist/worker-utils/index.js.map +1 -1
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +3 -2
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +5 -7
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.js +76 -146
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +17 -45
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +214 -312
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts +36 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js +23 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +3 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js +836 -147
- package/dist/worker-utils/null-worker-node.js.map +4 -4
- package/dist/worker-utils/null-worker.js +804 -143
- package/dist/worker-utils/null-worker.js.map +4 -4
- package/dist/worker-utils/types.d.ts +55 -72
- package/dist/worker-utils/types.d.ts.map +1 -1
- package/package.json +141 -35
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/index.ts +0 -9
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +126 -0
- package/src/cluster-source.ts +1 -0
- package/src/federated-table-scan-source.ts +1 -0
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +3 -3
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +16 -16
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +4 -11
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +3 -2
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +50 -10
- package/src/loader-utils/lib/files/http-file-transport.ts +65 -1
- package/src/loader-utils/lib/files/http-file-types.ts +2 -0
- package/src/loader-utils/lib/files/read-range-response.ts +66 -0
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +174 -0
- package/src/loader-utils/lib/scan-utils/query-options.ts +44 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +81 -28
- package/src/loader-utils/lib/scan-utils/table-query.ts +76 -8
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +101 -53
- package/src/loader-utils/lib/sources/data-source.ts +57 -16
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +39 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +5 -6
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +41 -24
- package/src/loader-utils/loader-types.ts +190 -111
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/README.md +2 -2
- package/src/polyfills/images/encode-image-node.ts +44 -37
- package/src/polyfills/images/image-codecs-node.ts +2 -37
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +1 -1
- package/src/polyfills/images/node-image-formats.ts +10 -4
- package/src/polyfills/images/parse-image-node.ts +31 -40
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +116 -0
- package/src/scan/arrow-execution/filter-arrow-table.ts +298 -0
- package/src/scan/arrow-execution/project-arrow-table.ts +53 -0
- package/src/scan/arrow-execution.ts +7 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -0
- package/src/scan/catalog-query-source.ts +132 -0
- package/src/scan/federated-table-scan-source.ts +67 -78
- package/src/scan/index.ts +64 -6
- package/src/scan/parse-sql-predicate.ts +14 -367
- package/src/scan/query-arrow-table-in-batches.ts +55 -0
- package/src/scan/query-arrow-table.ts +81 -271
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +229 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +199 -0
- package/src/scan/query.ts +594 -0
- package/src/scan/resolve-query-source.ts +47 -0
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +6 -6
- package/src/scan/sql-catalog.ts +167 -0
- package/src/scan/table-query.ts +6 -1
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +8 -19
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +19 -10
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +8 -4
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +27 -95
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/row-utils.ts +2 -2
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/vector-table-scan-source.ts +1 -0
- package/src/worker-utils/index.ts +2 -18
- package/src/worker-utils/lib/library-utils/library-utils.ts +3 -2
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/create-worker.ts +89 -188
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +246 -402
- package/src/worker-utils/lib/worker-api/task-runtime.ts +66 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +2 -0
- package/src/worker-utils/types.ts +74 -109
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs +0 -477
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts +0 -29
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js +0 -434
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs +0 -39
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts +0 -2
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js +0 -5
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/arrow-transport.cjs +0 -691
- package/dist/schema-utils/arrow-transport.cjs.map +0 -6
- package/dist/schema-utils/arrow-transport.d.ts +0 -4
- package/dist/schema-utils/arrow-transport.d.ts.map +0 -1
- package/dist/schema-utils/arrow-transport.js +0 -7
- package/dist/schema-utils/arrow-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +0 -76
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +0 -182
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +0 -33
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +0 -134
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +0 -32
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.js +0 -91
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +0 -20
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.js +0 -131
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +0 -58
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +0 -116
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +0 -34
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.js +0 -74
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +0 -94
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +0 -246
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +0 -67
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +0 -175
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +0 -1
- package/src/arrow-geometry/arrow-geoarrow-adapter.ts +0 -568
- package/src/geoarrow/lib/arrow-geoarrow-adapter.ts +0 -12
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/loader-utils/lib/scan-utils/experimental-scan-options.ts +0 -46
- package/src/polyfills/images/encode-image.node.ts.disabled +0 -41
- package/src/polyfills/images/parse-image.node.ts.disabled +0 -55
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/arrow-transport.ts +0 -7
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +0 -282
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +0 -247
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
- package/src/worker-utils/lib/async-queue/async-queue.ts +0 -100
- package/src/worker-utils/lib/worker-farm/worker-body.ts +0 -145
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +0 -144
- package/src/worker-utils/lib/worker-farm/worker-job.ts +0 -85
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +0 -316
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +0 -206
|
@@ -1,477 +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/arrow-geoarrow-adapter.ts
|
|
31
|
-
var arrow_geoarrow_adapter_exports = {};
|
|
32
|
-
__export(arrow_geoarrow_adapter_exports, {
|
|
33
|
-
inferGeoArrowCoordinateLayoutFromArrowType: () => inferGeoArrowCoordinateLayoutFromArrowType,
|
|
34
|
-
inferGeoArrowDimensionFromArrowType: () => inferGeoArrowDimensionFromArrowType,
|
|
35
|
-
inferGeoArrowEncodingFromArrowType: () => inferGeoArrowEncodingFromArrowType,
|
|
36
|
-
makeArrowVectorFromGeoArrowColumn: () => makeArrowVectorFromGeoArrowColumn,
|
|
37
|
-
makeGeoArrowColumnFromArrowVector: () => makeGeoArrowColumnFromArrowVector
|
|
38
|
-
});
|
|
39
|
-
module.exports = __toCommonJS(arrow_geoarrow_adapter_exports);
|
|
40
|
-
var arrow = __toESM(require("apache-arrow"), 1);
|
|
41
|
-
function makeGeoArrowColumnFromArrowVector(vector, options = {}) {
|
|
42
|
-
const encoding = options.encoding ?? inferGeoArrowEncodingFromArrowType(vector.type);
|
|
43
|
-
const dimension = options.dimension ?? (isSerializedArrowType(vector.type) ? "xy" : inferGeoArrowDimensionFromArrowType(vector.type));
|
|
44
|
-
const coordinateLayout = options.coordinateLayout === void 0 ? inferGeoArrowCoordinateLayoutFromArrowType(vector.type) : options.coordinateLayout;
|
|
45
|
-
return {
|
|
46
|
-
encoding,
|
|
47
|
-
dimension,
|
|
48
|
-
coordinateLayout,
|
|
49
|
-
chunks: vector.data.map((data) => makeGeoArrowArrayFromArrowData(data)),
|
|
50
|
-
metadata: options.metadata
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function makeArrowVectorFromGeoArrowColumn(column) {
|
|
54
|
-
return new arrow.Vector(
|
|
55
|
-
column.chunks.map(
|
|
56
|
-
(chunk) => makeArrowDataFromGeoArrowArray(chunk, column.dimension, column.coordinateLayout)
|
|
57
|
-
)
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
function inferGeoArrowEncodingFromArrowType(type) {
|
|
61
|
-
if (arrow.DataType.isDenseUnion(type)) return "geoarrow.geometry";
|
|
62
|
-
if (arrow.DataType.isBinary(type) || arrow.DataType.isLargeBinary(type) || arrow.DataType.isBinaryView(type)) {
|
|
63
|
-
return "geoarrow.wkb";
|
|
64
|
-
}
|
|
65
|
-
if (arrow.DataType.isUtf8(type) || arrow.DataType.isLargeUtf8(type) || arrow.DataType.isUtf8View(type)) {
|
|
66
|
-
return "geoarrow.wkt";
|
|
67
|
-
}
|
|
68
|
-
const nesting = getArrowListNesting(type);
|
|
69
|
-
switch (nesting) {
|
|
70
|
-
case 0:
|
|
71
|
-
return "geoarrow.point";
|
|
72
|
-
case 1:
|
|
73
|
-
return "geoarrow.linestring";
|
|
74
|
-
case 2:
|
|
75
|
-
return "geoarrow.polygon";
|
|
76
|
-
case 3:
|
|
77
|
-
return "geoarrow.multipolygon";
|
|
78
|
-
default:
|
|
79
|
-
throw new Error(`Cannot infer GeoArrow encoding from Arrow type ${type.toString()}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function inferGeoArrowDimensionFromArrowType(type) {
|
|
83
|
-
if (arrow.DataType.isFixedSizeList(type)) {
|
|
84
|
-
const dimensionName = type.children[0]?.name.toLowerCase();
|
|
85
|
-
if (isGeoArrowDimension(dimensionName)) return dimensionName;
|
|
86
|
-
switch (type.listSize) {
|
|
87
|
-
case 2:
|
|
88
|
-
return "xy";
|
|
89
|
-
case 3:
|
|
90
|
-
return "xyz";
|
|
91
|
-
case 4:
|
|
92
|
-
return "xyzm";
|
|
93
|
-
default:
|
|
94
|
-
throw new Error(
|
|
95
|
-
`GeoArrow coordinates require 2, 3, or 4 values, received ${type.listSize}`
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (arrow.DataType.isStruct(type)) {
|
|
100
|
-
const names = type.children.map((field) => field.name.toLowerCase());
|
|
101
|
-
if (names[0] === "x" && names[1] === "y") {
|
|
102
|
-
if (names[2] === "m") return "xym";
|
|
103
|
-
if (names[2] === "z" && names[3] === "m") return "xyzm";
|
|
104
|
-
if (names[2] === "z") return "xyz";
|
|
105
|
-
return "xy";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (arrow.DataType.isList(type) || arrow.DataType.isLargeList(type)) {
|
|
109
|
-
return inferGeoArrowDimensionFromArrowType(type.children[0].type);
|
|
110
|
-
}
|
|
111
|
-
if (arrow.DataType.isDenseUnion(type)) {
|
|
112
|
-
return type.children.reduce(
|
|
113
|
-
(dimension, field) => mergeGeoArrowDimensions(dimension, inferGeoArrowDimensionFromUnionChild(field)),
|
|
114
|
-
"xy"
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
throw new Error(`Cannot infer GeoArrow dimension from Arrow type ${type.toString()}`);
|
|
118
|
-
}
|
|
119
|
-
function inferGeoArrowCoordinateLayoutFromArrowType(type) {
|
|
120
|
-
if (arrow.DataType.isFixedSizeList(type)) return "interleaved";
|
|
121
|
-
if (arrow.DataType.isStruct(type)) return "separated";
|
|
122
|
-
if (arrow.DataType.isList(type) || arrow.DataType.isLargeList(type)) {
|
|
123
|
-
return inferGeoArrowCoordinateLayoutFromArrowType(type.children[0].type);
|
|
124
|
-
}
|
|
125
|
-
if (arrow.DataType.isDenseUnion(type)) {
|
|
126
|
-
for (const field of type.children) {
|
|
127
|
-
const layout = inferGeoArrowCoordinateLayoutFromArrowType(field.type);
|
|
128
|
-
if (layout) return layout;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
function makeGeoArrowArrayFromArrowData(data) {
|
|
134
|
-
const validity = makeGeoArrowValidity(data);
|
|
135
|
-
if (arrow.DataType.isFixedSizeList(data.type)) {
|
|
136
|
-
return {
|
|
137
|
-
kind: "fixed-size-list",
|
|
138
|
-
length: data.length,
|
|
139
|
-
size: data.type.listSize,
|
|
140
|
-
child: makeGeoArrowArrayFromArrowData(data.children[0]),
|
|
141
|
-
validity
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
if (arrow.DataType.isList(data.type) || arrow.DataType.isLargeList(data.type)) {
|
|
145
|
-
return {
|
|
146
|
-
kind: "list",
|
|
147
|
-
length: data.length,
|
|
148
|
-
offsets: data.valueOffsets,
|
|
149
|
-
child: makeGeoArrowArrayFromArrowData(data.children[0]),
|
|
150
|
-
validity
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
if (arrow.DataType.isStruct(data.type)) {
|
|
154
|
-
const children = {};
|
|
155
|
-
for (let childIndex = 0; childIndex < data.type.children.length; childIndex++) {
|
|
156
|
-
children[data.type.children[childIndex].name] = makeGeoArrowArrayFromArrowData(
|
|
157
|
-
data.children[childIndex]
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
return { kind: "struct", length: data.length, children, validity };
|
|
161
|
-
}
|
|
162
|
-
if (arrow.DataType.isDenseUnion(data.type)) {
|
|
163
|
-
const unionType = data.type;
|
|
164
|
-
return {
|
|
165
|
-
kind: "dense-union",
|
|
166
|
-
length: data.length,
|
|
167
|
-
typeIds: data.typeIds,
|
|
168
|
-
valueOffsets: data.valueOffsets,
|
|
169
|
-
children: unionType.children.map((field, childIndex) => ({
|
|
170
|
-
name: field.name,
|
|
171
|
-
typeId: unionType.typeIds[childIndex],
|
|
172
|
-
encoding: inferGeoArrowEncodingFromUnionChild(field),
|
|
173
|
-
dimension: inferGeoArrowDimensionFromUnionChild(field),
|
|
174
|
-
coordinateLayout: inferGeoArrowCoordinateLayoutFromArrowType(field.type),
|
|
175
|
-
data: makeGeoArrowArrayFromArrowData(data.children[childIndex])
|
|
176
|
-
}))
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
if (arrow.DataType.isBinaryView(data.type) || arrow.DataType.isUtf8View(data.type)) {
|
|
180
|
-
const viewBytes = data.values;
|
|
181
|
-
return {
|
|
182
|
-
kind: "serialized",
|
|
183
|
-
encoding: arrow.DataType.isBinaryView(data.type) ? "binary" : "utf8",
|
|
184
|
-
length: data.length,
|
|
185
|
-
offsets: new Int32Array(0),
|
|
186
|
-
values: new Uint8Array(0),
|
|
187
|
-
views: new Uint32Array(
|
|
188
|
-
viewBytes.buffer,
|
|
189
|
-
viewBytes.byteOffset,
|
|
190
|
-
Math.floor(viewBytes.byteLength / Uint32Array.BYTES_PER_ELEMENT)
|
|
191
|
-
),
|
|
192
|
-
dataBuffers: data.variadicBuffers,
|
|
193
|
-
validity
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
if (isOffsetSerializedArrowType(data.type)) {
|
|
197
|
-
return {
|
|
198
|
-
kind: "serialized",
|
|
199
|
-
encoding: arrow.DataType.isBinary(data.type) || arrow.DataType.isLargeBinary(data.type) ? "binary" : "utf8",
|
|
200
|
-
length: data.length,
|
|
201
|
-
offsets: data.valueOffsets,
|
|
202
|
-
values: data.values,
|
|
203
|
-
validity
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
if (arrow.DataType.isInt(data.type) || arrow.DataType.isFloat(data.type)) {
|
|
207
|
-
return {
|
|
208
|
-
kind: "primitive",
|
|
209
|
-
length: data.length,
|
|
210
|
-
values: data.values,
|
|
211
|
-
validity
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
throw new Error(`Unsupported GeoArrow physical Arrow type ${data.type.toString()}`);
|
|
215
|
-
}
|
|
216
|
-
function makeGeoArrowValidity(data) {
|
|
217
|
-
if (data.nullCount === 0 || !data.nullBitmap || data.nullBitmap.length === 0) return void 0;
|
|
218
|
-
return { values: data.nullBitmap, bitOffset: data.offset };
|
|
219
|
-
}
|
|
220
|
-
function makeArrowDataFromGeoArrowArray(array, dimension, coordinateLayout) {
|
|
221
|
-
const validity = makeCompactValidity(array.validity, array.length);
|
|
222
|
-
const nullCount = validity ? -1 : 0;
|
|
223
|
-
const validityBuffers = validity ? { [arrow.BufferType.VALIDITY]: validity } : {};
|
|
224
|
-
switch (array.kind) {
|
|
225
|
-
case "primitive": {
|
|
226
|
-
const values = makePackedPrimitiveValues(array);
|
|
227
|
-
return new arrow.Data(getArrowTypeForValues(values), 0, array.length, nullCount, {
|
|
228
|
-
...validityBuffers,
|
|
229
|
-
[arrow.BufferType.DATA]: values
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
case "fixed-size-list": {
|
|
233
|
-
const child = makeArrowDataFromGeoArrowArray(array.child, dimension, coordinateLayout);
|
|
234
|
-
const childStart = (array.offset ?? 0) * array.size;
|
|
235
|
-
const slicedChild = childStart === 0 && child.length === array.length * array.size ? child : child.slice(childStart, array.length * array.size);
|
|
236
|
-
const type = new arrow.FixedSizeList(
|
|
237
|
-
array.size,
|
|
238
|
-
new arrow.Field("value", slicedChild.type, true)
|
|
239
|
-
);
|
|
240
|
-
return new arrow.Data(type, 0, array.length, nullCount, validityBuffers, [slicedChild]);
|
|
241
|
-
}
|
|
242
|
-
case "list": {
|
|
243
|
-
const child = makeArrowDataFromGeoArrowArray(array.child, dimension, coordinateLayout);
|
|
244
|
-
const offsets = makeArrowOffsets(array.offsets, array.offset, array.length, array.offsetBase);
|
|
245
|
-
const field = new arrow.Field("value", child.type, true);
|
|
246
|
-
const type = offsets instanceof BigInt64Array ? new arrow.LargeList(field) : new arrow.List(field);
|
|
247
|
-
return new arrow.Data(
|
|
248
|
-
type,
|
|
249
|
-
0,
|
|
250
|
-
array.length,
|
|
251
|
-
nullCount,
|
|
252
|
-
{ ...validityBuffers, [arrow.BufferType.OFFSET]: offsets },
|
|
253
|
-
[child]
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
case "struct": {
|
|
257
|
-
const fields = [];
|
|
258
|
-
const children = [];
|
|
259
|
-
for (const [name, childArray] of Object.entries(array.children)) {
|
|
260
|
-
let child = makeArrowDataFromGeoArrowArray(childArray, dimension, coordinateLayout);
|
|
261
|
-
const childOffset = array.offset ?? 0;
|
|
262
|
-
if (childOffset > 0 || child.length !== array.length) {
|
|
263
|
-
child = child.slice(childOffset, array.length);
|
|
264
|
-
}
|
|
265
|
-
fields.push(new arrow.Field(name, child.type, true));
|
|
266
|
-
children.push(child);
|
|
267
|
-
}
|
|
268
|
-
return new arrow.Data(
|
|
269
|
-
new arrow.Struct(fields),
|
|
270
|
-
0,
|
|
271
|
-
array.length,
|
|
272
|
-
nullCount,
|
|
273
|
-
validityBuffers,
|
|
274
|
-
children
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
case "dense-union":
|
|
278
|
-
return makeArrowDenseUnionData(array, dimension, coordinateLayout);
|
|
279
|
-
case "serialized": {
|
|
280
|
-
if (array.views) {
|
|
281
|
-
const type2 = array.encoding === "binary" ? new arrow.BinaryView() : new arrow.Utf8View();
|
|
282
|
-
const viewBytes = new Uint8Array(
|
|
283
|
-
array.views.buffer,
|
|
284
|
-
array.views.byteOffset,
|
|
285
|
-
array.views.byteLength
|
|
286
|
-
);
|
|
287
|
-
return new arrow.Data(
|
|
288
|
-
type2,
|
|
289
|
-
0,
|
|
290
|
-
array.length,
|
|
291
|
-
nullCount,
|
|
292
|
-
{ ...validityBuffers, [arrow.BufferType.DATA]: viewBytes },
|
|
293
|
-
[],
|
|
294
|
-
void 0,
|
|
295
|
-
array.dataBuffers
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
const offsets = makeArrowOffsets(array.offsets, array.offset, array.length, array.offsetBase);
|
|
299
|
-
const type = getSerializedArrowType(array.encoding, offsets);
|
|
300
|
-
return new arrow.Data(type, 0, array.length, nullCount, {
|
|
301
|
-
...validityBuffers,
|
|
302
|
-
[arrow.BufferType.OFFSET]: offsets,
|
|
303
|
-
[arrow.BufferType.DATA]: array.values
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
function makeArrowDenseUnionData(array, dimension, coordinateLayout) {
|
|
309
|
-
const offset = array.offset ?? 0;
|
|
310
|
-
const sourceTypeIds = array.typeIds.subarray(offset, offset + array.length);
|
|
311
|
-
const typeIds = sourceTypeIds instanceof Int8Array ? sourceTypeIds : new Int8Array(sourceTypeIds.buffer, sourceTypeIds.byteOffset, sourceTypeIds.byteLength);
|
|
312
|
-
const valueOffsets = array.valueOffsets.subarray(offset, offset + array.length);
|
|
313
|
-
const children = array.children.map(
|
|
314
|
-
(child) => makeArrowDataFromGeoArrowArray(
|
|
315
|
-
child.data,
|
|
316
|
-
child.dimension ?? dimension,
|
|
317
|
-
child.coordinateLayout === void 0 ? coordinateLayout : child.coordinateLayout
|
|
318
|
-
)
|
|
319
|
-
);
|
|
320
|
-
if (array.validity) {
|
|
321
|
-
for (let rowIndex = 0; rowIndex < array.length; rowIndex++) {
|
|
322
|
-
if (isGeoArrowValueValid(array.validity, rowIndex)) continue;
|
|
323
|
-
const childIndex = array.children.findIndex((child) => child.typeId === typeIds[rowIndex]);
|
|
324
|
-
const childOffset = valueOffsets[rowIndex];
|
|
325
|
-
const childValidity = array.children[childIndex]?.data.validity;
|
|
326
|
-
if (childIndex < 0 || childOffset < 0 || childOffset >= children[childIndex].length || !childValidity || isGeoArrowValueValid(childValidity, childOffset)) {
|
|
327
|
-
throw new Error("GeoArrow dense-union null does not reference a nullable child value");
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
const fields = array.children.map(
|
|
332
|
-
(child, childIndex) => new arrow.Field(
|
|
333
|
-
getArrowUnionChildName(child.name, child.dimension ?? dimension),
|
|
334
|
-
children[childIndex].type,
|
|
335
|
-
true
|
|
336
|
-
)
|
|
337
|
-
);
|
|
338
|
-
const type = new arrow.DenseUnion(
|
|
339
|
-
Int32Array.from(array.children.map((child) => child.typeId)),
|
|
340
|
-
fields
|
|
341
|
-
);
|
|
342
|
-
return new arrow.Data(
|
|
343
|
-
type,
|
|
344
|
-
0,
|
|
345
|
-
array.length,
|
|
346
|
-
0,
|
|
347
|
-
{ [arrow.BufferType.TYPE]: typeIds, [arrow.BufferType.OFFSET]: valueOffsets },
|
|
348
|
-
children
|
|
349
|
-
);
|
|
350
|
-
}
|
|
351
|
-
function makePackedPrimitiveValues(array) {
|
|
352
|
-
const offset = array.offset ?? 0;
|
|
353
|
-
const stride = array.stride ?? 1;
|
|
354
|
-
if (stride === 1) {
|
|
355
|
-
return array.values.subarray(offset, offset + array.length);
|
|
356
|
-
}
|
|
357
|
-
const ValuesConstructor = array.values.constructor;
|
|
358
|
-
const values = new ValuesConstructor(array.length);
|
|
359
|
-
for (let index = 0; index < array.length; index++) {
|
|
360
|
-
values[index] = array.values[offset + index * stride];
|
|
361
|
-
}
|
|
362
|
-
return values;
|
|
363
|
-
}
|
|
364
|
-
function getArrowTypeForValues(values) {
|
|
365
|
-
if (values instanceof Int8Array) return new arrow.Int8();
|
|
366
|
-
if (values instanceof Uint8Array || values instanceof Uint8ClampedArray) return new arrow.Uint8();
|
|
367
|
-
if (values instanceof Int16Array) return new arrow.Int16();
|
|
368
|
-
if (values instanceof Uint16Array) return new arrow.Uint16();
|
|
369
|
-
if (values instanceof Int32Array) return new arrow.Int32();
|
|
370
|
-
if (values instanceof Uint32Array) return new arrow.Uint32();
|
|
371
|
-
if (values instanceof BigInt64Array) return new arrow.Int64();
|
|
372
|
-
if (values instanceof BigUint64Array) return new arrow.Uint64();
|
|
373
|
-
if (values instanceof Float32Array) return new arrow.Float32();
|
|
374
|
-
if (values instanceof Float64Array) return new arrow.Float64();
|
|
375
|
-
throw new Error(`Unsupported GeoArrow primitive values ${values.constructor.name}`);
|
|
376
|
-
}
|
|
377
|
-
function makeArrowOffsets(offsets, offset = 0, length, offsetBase = 0) {
|
|
378
|
-
const source = offsets.subarray(offset, offset + length + 1);
|
|
379
|
-
if (offsetBase === 0 || offsetBase === 0n) return source;
|
|
380
|
-
const normalized = offsets instanceof BigInt64Array ? new BigInt64Array(source.length) : new Int32Array(source.length);
|
|
381
|
-
for (let index = 0; index < source.length; index++) {
|
|
382
|
-
if (normalized instanceof BigInt64Array) {
|
|
383
|
-
normalized[index] = BigInt(source[index]) - BigInt(offsetBase);
|
|
384
|
-
} else {
|
|
385
|
-
normalized[index] = Number(source[index]) - Number(offsetBase);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return normalized;
|
|
389
|
-
}
|
|
390
|
-
function makeCompactValidity(validity, length) {
|
|
391
|
-
if (!validity) return void 0;
|
|
392
|
-
const bitOffset = validity.bitOffset ?? 0;
|
|
393
|
-
if (bitOffset === 0 && validity.values.length === Math.ceil(length / 8)) {
|
|
394
|
-
return validity.values;
|
|
395
|
-
}
|
|
396
|
-
const values = new Uint8Array(Math.ceil(length / 8));
|
|
397
|
-
let nullCount = 0;
|
|
398
|
-
for (let index = 0; index < length; index++) {
|
|
399
|
-
if (isGeoArrowValueValid(validity, index)) values[index >> 3] |= 1 << (index & 7);
|
|
400
|
-
else nullCount++;
|
|
401
|
-
}
|
|
402
|
-
return nullCount > 0 ? values : void 0;
|
|
403
|
-
}
|
|
404
|
-
function isGeoArrowValueValid(validity, index) {
|
|
405
|
-
const bitIndex = (validity.bitOffset ?? 0) + index;
|
|
406
|
-
return Boolean(validity.values[bitIndex >> 3] & 1 << (bitIndex & 7));
|
|
407
|
-
}
|
|
408
|
-
function inferGeoArrowEncodingFromUnionChild(field) {
|
|
409
|
-
const normalizedName = field.name.replace(/[^a-z]/gi, "").toLowerCase();
|
|
410
|
-
const names = {
|
|
411
|
-
point: "geoarrow.point",
|
|
412
|
-
linestring: "geoarrow.linestring",
|
|
413
|
-
polygon: "geoarrow.polygon",
|
|
414
|
-
multipoint: "geoarrow.multipoint",
|
|
415
|
-
multilinestring: "geoarrow.multilinestring",
|
|
416
|
-
multipolygon: "geoarrow.multipolygon",
|
|
417
|
-
geometrycollection: "geoarrow.geometrycollection"
|
|
418
|
-
};
|
|
419
|
-
for (const [name, encoding] of Object.entries(names)) {
|
|
420
|
-
if (normalizedName.startsWith(name)) return encoding;
|
|
421
|
-
}
|
|
422
|
-
return inferGeoArrowEncodingFromArrowType(field.type);
|
|
423
|
-
}
|
|
424
|
-
function inferGeoArrowDimensionFromUnionChild(field) {
|
|
425
|
-
if (/\sZM$/i.test(field.name)) return "xyzm";
|
|
426
|
-
if (/\sM$/i.test(field.name)) return "xym";
|
|
427
|
-
if (/\sZ$/i.test(field.name)) return "xyz";
|
|
428
|
-
return inferGeoArrowDimensionFromArrowType(field.type);
|
|
429
|
-
}
|
|
430
|
-
function getArrowUnionChildName(name, dimension) {
|
|
431
|
-
if (/\s(?:Z|M|ZM)$/i.test(name) || dimension === "xy") return name;
|
|
432
|
-
const suffix = dimension === "xyz" ? "Z" : dimension === "xym" ? "M" : "ZM";
|
|
433
|
-
return `${name} ${suffix}`;
|
|
434
|
-
}
|
|
435
|
-
function getArrowListNesting(type) {
|
|
436
|
-
let nesting = 0;
|
|
437
|
-
let currentType = type;
|
|
438
|
-
while (arrow.DataType.isList(currentType) || arrow.DataType.isLargeList(currentType)) {
|
|
439
|
-
nesting++;
|
|
440
|
-
currentType = currentType.children[0].type;
|
|
441
|
-
}
|
|
442
|
-
if (arrow.DataType.isFixedSizeList(currentType) || arrow.DataType.isStruct(currentType)) {
|
|
443
|
-
return nesting;
|
|
444
|
-
}
|
|
445
|
-
throw new Error(`GeoArrow type does not terminate in coordinates: ${type.toString()}`);
|
|
446
|
-
}
|
|
447
|
-
function getSerializedArrowType(encoding, offsets) {
|
|
448
|
-
if (encoding === "binary") {
|
|
449
|
-
return offsets instanceof BigInt64Array ? new arrow.LargeBinary() : new arrow.Binary();
|
|
450
|
-
}
|
|
451
|
-
return offsets instanceof BigInt64Array ? new arrow.LargeUtf8() : new arrow.Utf8();
|
|
452
|
-
}
|
|
453
|
-
function isOffsetSerializedArrowType(type) {
|
|
454
|
-
return arrow.DataType.isBinary(type) || arrow.DataType.isLargeBinary(type) || arrow.DataType.isUtf8(type) || arrow.DataType.isLargeUtf8(type);
|
|
455
|
-
}
|
|
456
|
-
function isSerializedArrowType(type) {
|
|
457
|
-
return isOffsetSerializedArrowType(type) || arrow.DataType.isBinaryView(type) || arrow.DataType.isUtf8View(type);
|
|
458
|
-
}
|
|
459
|
-
function isGeoArrowDimension(value) {
|
|
460
|
-
return value === "xy" || value === "xyz" || value === "xym" || value === "xyzm";
|
|
461
|
-
}
|
|
462
|
-
function mergeGeoArrowDimensions(left, right) {
|
|
463
|
-
if (left === right) return left;
|
|
464
|
-
if (left === "xy") return right;
|
|
465
|
-
if (right === "xy") return left;
|
|
466
|
-
if (left === "xyzm" || right === "xyzm") return "xyzm";
|
|
467
|
-
return left === "xym" && right === "xym" ? "xym" : "xyzm";
|
|
468
|
-
}
|
|
469
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
470
|
-
0 && (module.exports = {
|
|
471
|
-
inferGeoArrowCoordinateLayoutFromArrowType,
|
|
472
|
-
inferGeoArrowDimensionFromArrowType,
|
|
473
|
-
inferGeoArrowEncodingFromArrowType,
|
|
474
|
-
makeArrowVectorFromGeoArrowColumn,
|
|
475
|
-
makeGeoArrowColumnFromArrowVector
|
|
476
|
-
});
|
|
477
|
-
//# sourceMappingURL=arrow-geoarrow-adapter.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/arrow-geometry/arrow-geoarrow-adapter.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {\n GeoArrowArray,\n GeoArrowColumn,\n GeoArrowCoordinateLayout,\n GeoArrowDenseUnion,\n GeoArrowDimension,\n GeoArrowEncoding,\n GeoArrowNumericArray,\n GeoArrowOffsets,\n GeoArrowValidity\n} from '@math.gl/geospatial/geoarrow';\nimport * as arrow from 'apache-arrow';\n\n/** Options for adapting an Apache Arrow vector to math.gl's runtime-neutral GeoArrow ABI. */\nexport type MakeGeoArrowColumnFromArrowVectorOptions = {\n /** GeoArrow extension encoding. Inferred from the physical type when omitted. */\n encoding?: GeoArrowEncoding;\n /** Semantic coordinate dimension. Inferred from native coordinate fields when omitted. */\n dimension?: GeoArrowDimension;\n /** Coordinate organization. Inferred from the physical type when omitted. */\n coordinateLayout?: GeoArrowCoordinateLayout | null;\n /** Opaque extension metadata retained on the descriptor envelope. */\n metadata?: Readonly<Record<string, unknown>>;\n};\n\n/**\n * Adapts Apache Arrow physical buffers to `@math.gl/geospatial/geoarrow` borrowed descriptors.\n * Arrow slices already adjust numeric buffers, list offsets, union buffers, and fixed-width\n * children. Their Data.offset is retained only as the validity bitmap's bit offset;\n * copying it onto the geometry descriptor would apply the physical slice twice.\n */\nexport function makeGeoArrowColumnFromArrowVector(\n vector: arrow.Vector,\n options: MakeGeoArrowColumnFromArrowVectorOptions = {}\n): GeoArrowColumn {\n const encoding = options.encoding ?? inferGeoArrowEncodingFromArrowType(vector.type);\n const dimension =\n options.dimension ??\n (isSerializedArrowType(vector.type) ? 'xy' : inferGeoArrowDimensionFromArrowType(vector.type));\n const coordinateLayout =\n options.coordinateLayout === undefined\n ? inferGeoArrowCoordinateLayoutFromArrowType(vector.type)\n : options.coordinateLayout;\n\n return {\n encoding,\n dimension,\n coordinateLayout,\n chunks: vector.data.map(data => makeGeoArrowArrayFromArrowData(data)),\n metadata: options.metadata\n };\n}\n\n/** Converts a math.gl GeoArrow descriptor back to an Apache Arrow vector. */\nexport function makeArrowVectorFromGeoArrowColumn(column: GeoArrowColumn): arrow.Vector {\n return new arrow.Vector(\n column.chunks.map(chunk =>\n makeArrowDataFromGeoArrowArray(chunk, column.dimension, column.coordinateLayout)\n )\n );\n}\n\n/** Infers a GeoArrow encoding from an Apache Arrow physical type. */\nexport function inferGeoArrowEncodingFromArrowType(type: arrow.DataType): GeoArrowEncoding {\n if (arrow.DataType.isDenseUnion(type)) return 'geoarrow.geometry';\n if (\n arrow.DataType.isBinary(type) ||\n arrow.DataType.isLargeBinary(type) ||\n arrow.DataType.isBinaryView(type)\n ) {\n return 'geoarrow.wkb';\n }\n if (\n arrow.DataType.isUtf8(type) ||\n arrow.DataType.isLargeUtf8(type) ||\n arrow.DataType.isUtf8View(type)\n ) {\n return 'geoarrow.wkt';\n }\n\n const nesting = getArrowListNesting(type);\n switch (nesting) {\n case 0:\n return 'geoarrow.point';\n case 1:\n return 'geoarrow.linestring';\n case 2:\n return 'geoarrow.polygon';\n case 3:\n return 'geoarrow.multipolygon';\n default:\n throw new Error(`Cannot infer GeoArrow encoding from Arrow type ${type.toString()}`);\n }\n}\n\n/** Infers semantic coordinate dimensions from Arrow coordinate fields. */\nexport function inferGeoArrowDimensionFromArrowType(type: arrow.DataType): GeoArrowDimension {\n if (arrow.DataType.isFixedSizeList(type)) {\n const dimensionName = type.children[0]?.name.toLowerCase();\n if (isGeoArrowDimension(dimensionName)) return dimensionName;\n switch (type.listSize) {\n case 2:\n return 'xy';\n case 3:\n return 'xyz';\n case 4:\n return 'xyzm';\n default:\n throw new Error(\n `GeoArrow coordinates require 2, 3, or 4 values, received ${type.listSize}`\n );\n }\n }\n if (arrow.DataType.isStruct(type)) {\n const names = type.children.map(field => field.name.toLowerCase());\n if (names[0] === 'x' && names[1] === 'y') {\n if (names[2] === 'm') return 'xym';\n if (names[2] === 'z' && names[3] === 'm') return 'xyzm';\n if (names[2] === 'z') return 'xyz';\n return 'xy';\n }\n }\n if (arrow.DataType.isList(type) || arrow.DataType.isLargeList(type)) {\n return inferGeoArrowDimensionFromArrowType(type.children[0].type);\n }\n if (arrow.DataType.isDenseUnion(type)) {\n return type.children.reduce<GeoArrowDimension>(\n (dimension, field) =>\n mergeGeoArrowDimensions(dimension, inferGeoArrowDimensionFromUnionChild(field)),\n 'xy'\n );\n }\n throw new Error(`Cannot infer GeoArrow dimension from Arrow type ${type.toString()}`);\n}\n\n/** Infers whether Arrow coordinate leaves are interleaved or separated. */\nexport function inferGeoArrowCoordinateLayoutFromArrowType(\n type: arrow.DataType\n): GeoArrowCoordinateLayout | null {\n if (arrow.DataType.isFixedSizeList(type)) return 'interleaved';\n if (arrow.DataType.isStruct(type)) return 'separated';\n if (arrow.DataType.isList(type) || arrow.DataType.isLargeList(type)) {\n return inferGeoArrowCoordinateLayoutFromArrowType(type.children[0].type);\n }\n if (arrow.DataType.isDenseUnion(type)) {\n for (const field of type.children) {\n const layout = inferGeoArrowCoordinateLayoutFromArrowType(field.type);\n if (layout) return layout;\n }\n }\n return null;\n}\n\nfunction makeGeoArrowArrayFromArrowData(data: arrow.Data): GeoArrowArray {\n const validity = makeGeoArrowValidity(data);\n if (arrow.DataType.isFixedSizeList(data.type)) {\n return {\n kind: 'fixed-size-list',\n length: data.length,\n size: data.type.listSize,\n child: makeGeoArrowArrayFromArrowData(data.children[0]),\n validity\n };\n }\n if (arrow.DataType.isList(data.type) || arrow.DataType.isLargeList(data.type)) {\n return {\n kind: 'list',\n length: data.length,\n offsets: data.valueOffsets as GeoArrowOffsets,\n child: makeGeoArrowArrayFromArrowData(data.children[0]),\n validity\n };\n }\n if (arrow.DataType.isStruct(data.type)) {\n const children: Record<string, GeoArrowArray> = {};\n for (let childIndex = 0; childIndex < data.type.children.length; childIndex++) {\n children[data.type.children[childIndex].name] = makeGeoArrowArrayFromArrowData(\n data.children[childIndex]\n );\n }\n return {kind: 'struct', length: data.length, children, validity};\n }\n if (arrow.DataType.isDenseUnion(data.type)) {\n const unionType = data.type as arrow.DenseUnion;\n return {\n kind: 'dense-union',\n length: data.length,\n typeIds: data.typeIds as Int8Array | Uint8Array,\n valueOffsets: data.valueOffsets,\n children: unionType.children.map((field, childIndex) => ({\n name: field.name,\n typeId: unionType.typeIds[childIndex],\n encoding: inferGeoArrowEncodingFromUnionChild(field),\n dimension: inferGeoArrowDimensionFromUnionChild(field),\n coordinateLayout: inferGeoArrowCoordinateLayoutFromArrowType(field.type),\n data: makeGeoArrowArrayFromArrowData(data.children[childIndex])\n }))\n };\n }\n if (arrow.DataType.isBinaryView(data.type) || arrow.DataType.isUtf8View(data.type)) {\n const viewBytes = data.values as Uint8Array;\n return {\n kind: 'serialized',\n encoding: arrow.DataType.isBinaryView(data.type) ? 'binary' : 'utf8',\n length: data.length,\n offsets: new Int32Array(0),\n values: new Uint8Array(0),\n views: new Uint32Array(\n viewBytes.buffer,\n viewBytes.byteOffset,\n Math.floor(viewBytes.byteLength / Uint32Array.BYTES_PER_ELEMENT)\n ),\n dataBuffers: data.variadicBuffers,\n validity\n };\n }\n if (isOffsetSerializedArrowType(data.type)) {\n return {\n kind: 'serialized',\n encoding:\n arrow.DataType.isBinary(data.type) || arrow.DataType.isLargeBinary(data.type)\n ? 'binary'\n : 'utf8',\n length: data.length,\n offsets: data.valueOffsets as GeoArrowOffsets,\n values: data.values as Uint8Array,\n validity\n };\n }\n if (arrow.DataType.isInt(data.type) || arrow.DataType.isFloat(data.type)) {\n return {\n kind: 'primitive',\n length: data.length,\n values: data.values as GeoArrowNumericArray,\n validity\n };\n }\n throw new Error(`Unsupported GeoArrow physical Arrow type ${data.type.toString()}`);\n}\n\nfunction makeGeoArrowValidity(data: arrow.Data): GeoArrowValidity | undefined {\n if (data.nullCount === 0 || !data.nullBitmap || data.nullBitmap.length === 0) return undefined;\n return {values: data.nullBitmap, bitOffset: data.offset};\n}\n\nfunction makeArrowDataFromGeoArrowArray(\n array: GeoArrowArray,\n dimension: GeoArrowDimension,\n coordinateLayout: GeoArrowCoordinateLayout | null\n): arrow.Data {\n const validity = makeCompactValidity(array.validity, array.length);\n const nullCount = validity ? -1 : 0;\n const validityBuffers = validity ? {[arrow.BufferType.VALIDITY]: validity} : {};\n\n switch (array.kind) {\n case 'primitive': {\n const values = makePackedPrimitiveValues(array);\n return new arrow.Data(getArrowTypeForValues(values), 0, array.length, nullCount, {\n ...validityBuffers,\n [arrow.BufferType.DATA]: values\n });\n }\n case 'fixed-size-list': {\n const child = makeArrowDataFromGeoArrowArray(array.child, dimension, coordinateLayout);\n const childStart = (array.offset ?? 0) * array.size;\n const slicedChild =\n childStart === 0 && child.length === array.length * array.size\n ? child\n : child.slice(childStart, array.length * array.size);\n const type = new arrow.FixedSizeList(\n array.size,\n new arrow.Field('value', slicedChild.type, true)\n );\n return new arrow.Data(type, 0, array.length, nullCount, validityBuffers, [slicedChild]);\n }\n case 'list': {\n const child = makeArrowDataFromGeoArrowArray(array.child, dimension, coordinateLayout);\n const offsets = makeArrowOffsets(array.offsets, array.offset, array.length, array.offsetBase);\n const field = new arrow.Field('value', child.type, true);\n const type =\n offsets instanceof BigInt64Array ? new arrow.LargeList(field) : new arrow.List(field);\n return new arrow.Data(\n type,\n 0,\n array.length,\n nullCount,\n {...validityBuffers, [arrow.BufferType.OFFSET]: offsets},\n [child]\n );\n }\n case 'struct': {\n const fields: arrow.Field[] = [];\n const children: arrow.Data[] = [];\n for (const [name, childArray] of Object.entries(array.children)) {\n let child = makeArrowDataFromGeoArrowArray(childArray, dimension, coordinateLayout);\n const childOffset = array.offset ?? 0;\n if (childOffset > 0 || child.length !== array.length) {\n child = child.slice(childOffset, array.length);\n }\n fields.push(new arrow.Field(name, child.type, true));\n children.push(child);\n }\n return new arrow.Data(\n new arrow.Struct(fields),\n 0,\n array.length,\n nullCount,\n validityBuffers,\n children\n );\n }\n case 'dense-union':\n return makeArrowDenseUnionData(array, dimension, coordinateLayout);\n case 'serialized': {\n if (array.views) {\n const type = array.encoding === 'binary' ? new arrow.BinaryView() : new arrow.Utf8View();\n const viewBytes = new Uint8Array(\n array.views.buffer,\n array.views.byteOffset,\n array.views.byteLength\n );\n return new arrow.Data(\n type,\n 0,\n array.length,\n nullCount,\n {...validityBuffers, [arrow.BufferType.DATA]: viewBytes},\n [],\n undefined,\n array.dataBuffers\n );\n }\n const offsets = makeArrowOffsets(array.offsets, array.offset, array.length, array.offsetBase);\n const type = getSerializedArrowType(array.encoding, offsets);\n return new arrow.Data(type, 0, array.length, nullCount, {\n ...validityBuffers,\n [arrow.BufferType.OFFSET]: offsets,\n [arrow.BufferType.DATA]: array.values\n });\n }\n }\n}\n\nfunction makeArrowDenseUnionData(\n array: GeoArrowDenseUnion,\n dimension: GeoArrowDimension,\n coordinateLayout: GeoArrowCoordinateLayout | null\n): arrow.Data {\n const offset = array.offset ?? 0;\n const sourceTypeIds = array.typeIds.subarray(offset, offset + array.length);\n const typeIds =\n sourceTypeIds instanceof Int8Array\n ? sourceTypeIds\n : new Int8Array(sourceTypeIds.buffer, sourceTypeIds.byteOffset, sourceTypeIds.byteLength);\n const valueOffsets = array.valueOffsets.subarray(offset, offset + array.length);\n const children = array.children.map(child =>\n makeArrowDataFromGeoArrowArray(\n child.data,\n child.dimension ?? dimension,\n child.coordinateLayout === undefined ? coordinateLayout : child.coordinateLayout\n )\n );\n\n if (array.validity) {\n for (let rowIndex = 0; rowIndex < array.length; rowIndex++) {\n if (isGeoArrowValueValid(array.validity, rowIndex)) continue;\n const childIndex = array.children.findIndex(child => child.typeId === typeIds[rowIndex]);\n const childOffset = valueOffsets[rowIndex];\n const childValidity = array.children[childIndex]?.data.validity;\n if (\n childIndex < 0 ||\n childOffset < 0 ||\n childOffset >= children[childIndex].length ||\n !childValidity ||\n isGeoArrowValueValid(childValidity, childOffset)\n ) {\n throw new Error('GeoArrow dense-union null does not reference a nullable child value');\n }\n }\n }\n\n const fields = array.children.map(\n (child, childIndex) =>\n new arrow.Field(\n getArrowUnionChildName(child.name, child.dimension ?? dimension),\n children[childIndex].type,\n true\n )\n );\n const type = new arrow.DenseUnion(\n Int32Array.from(array.children.map(child => child.typeId)),\n fields\n );\n return new arrow.Data(\n type,\n 0,\n array.length,\n 0,\n {[arrow.BufferType.TYPE]: typeIds, [arrow.BufferType.OFFSET]: valueOffsets},\n children\n );\n}\n\nfunction makePackedPrimitiveValues(\n array: Extract<GeoArrowArray, {kind: 'primitive'}>\n): GeoArrowNumericArray {\n const offset = array.offset ?? 0;\n const stride = array.stride ?? 1;\n if (stride === 1) {\n return array.values.subarray(offset, offset + array.length) as GeoArrowNumericArray;\n }\n const ValuesConstructor = array.values.constructor as {\n new (length: number): GeoArrowNumericArray;\n };\n const values = new ValuesConstructor(array.length);\n for (let index = 0; index < array.length; index++) {\n values[index] = array.values[offset + index * stride] as never;\n }\n return values;\n}\n\nfunction getArrowTypeForValues(values: GeoArrowNumericArray): arrow.DataType {\n if (values instanceof Int8Array) return new arrow.Int8();\n if (values instanceof Uint8Array || values instanceof Uint8ClampedArray) return new arrow.Uint8();\n if (values instanceof Int16Array) return new arrow.Int16();\n if (values instanceof Uint16Array) return new arrow.Uint16();\n if (values instanceof Int32Array) return new arrow.Int32();\n if (values instanceof Uint32Array) return new arrow.Uint32();\n if (values instanceof BigInt64Array) return new arrow.Int64();\n if (values instanceof BigUint64Array) return new arrow.Uint64();\n if (values instanceof Float32Array) return new arrow.Float32();\n if (values instanceof Float64Array) return new arrow.Float64();\n throw new Error(`Unsupported GeoArrow primitive values ${(values as object).constructor.name}`);\n}\n\nfunction makeArrowOffsets(\n offsets: GeoArrowOffsets,\n offset = 0,\n length: number,\n offsetBase: number | bigint = 0\n): GeoArrowOffsets {\n const source = offsets.subarray(offset, offset + length + 1) as GeoArrowOffsets;\n if (offsetBase === 0 || offsetBase === 0n) return source;\n const normalized =\n offsets instanceof BigInt64Array\n ? new BigInt64Array(source.length)\n : new Int32Array(source.length);\n for (let index = 0; index < source.length; index++) {\n if (normalized instanceof BigInt64Array) {\n normalized[index] = BigInt(source[index]) - BigInt(offsetBase);\n } else {\n normalized[index] = Number(source[index]) - Number(offsetBase);\n }\n }\n return normalized;\n}\n\nfunction makeCompactValidity(\n validity: GeoArrowValidity | undefined,\n length: number\n): Uint8Array | undefined {\n if (!validity) return undefined;\n const bitOffset = validity.bitOffset ?? 0;\n if (bitOffset === 0 && validity.values.length === Math.ceil(length / 8)) {\n return validity.values;\n }\n const values = new Uint8Array(Math.ceil(length / 8));\n let nullCount = 0;\n for (let index = 0; index < length; index++) {\n if (isGeoArrowValueValid(validity, index)) values[index >> 3] |= 1 << (index & 7);\n else nullCount++;\n }\n return nullCount > 0 ? values : undefined;\n}\n\nfunction isGeoArrowValueValid(validity: GeoArrowValidity, index: number): boolean {\n const bitIndex = (validity.bitOffset ?? 0) + index;\n return Boolean(validity.values[bitIndex >> 3] & (1 << (bitIndex & 7)));\n}\n\nfunction inferGeoArrowEncodingFromUnionChild(field: arrow.Field): GeoArrowEncoding {\n const normalizedName = field.name.replace(/[^a-z]/gi, '').toLowerCase();\n const names: Record<string, GeoArrowEncoding> = {\n point: 'geoarrow.point',\n linestring: 'geoarrow.linestring',\n polygon: 'geoarrow.polygon',\n multipoint: 'geoarrow.multipoint',\n multilinestring: 'geoarrow.multilinestring',\n multipolygon: 'geoarrow.multipolygon',\n geometrycollection: 'geoarrow.geometrycollection'\n };\n for (const [name, encoding] of Object.entries(names)) {\n if (normalizedName.startsWith(name)) return encoding;\n }\n return inferGeoArrowEncodingFromArrowType(field.type);\n}\n\nfunction inferGeoArrowDimensionFromUnionChild(field: arrow.Field): GeoArrowDimension {\n if (/\\sZM$/i.test(field.name)) return 'xyzm';\n if (/\\sM$/i.test(field.name)) return 'xym';\n if (/\\sZ$/i.test(field.name)) return 'xyz';\n return inferGeoArrowDimensionFromArrowType(field.type);\n}\n\nfunction getArrowUnionChildName(name: string, dimension: GeoArrowDimension): string {\n if (/\\s(?:Z|M|ZM)$/i.test(name) || dimension === 'xy') return name;\n const suffix = dimension === 'xyz' ? 'Z' : dimension === 'xym' ? 'M' : 'ZM';\n return `${name} ${suffix}`;\n}\n\nfunction getArrowListNesting(type: arrow.DataType): number {\n let nesting = 0;\n let currentType = type;\n while (arrow.DataType.isList(currentType) || arrow.DataType.isLargeList(currentType)) {\n nesting++;\n currentType = currentType.children[0].type;\n }\n if (arrow.DataType.isFixedSizeList(currentType) || arrow.DataType.isStruct(currentType)) {\n return nesting;\n }\n throw new Error(`GeoArrow type does not terminate in coordinates: ${type.toString()}`);\n}\n\nfunction getSerializedArrowType(\n encoding: 'binary' | 'utf8',\n offsets: GeoArrowOffsets\n): arrow.DataType {\n if (encoding === 'binary') {\n return offsets instanceof BigInt64Array ? new arrow.LargeBinary() : new arrow.Binary();\n }\n return offsets instanceof BigInt64Array ? new arrow.LargeUtf8() : new arrow.Utf8();\n}\n\nfunction isOffsetSerializedArrowType(type: arrow.DataType): boolean {\n return (\n arrow.DataType.isBinary(type) ||\n arrow.DataType.isLargeBinary(type) ||\n arrow.DataType.isUtf8(type) ||\n arrow.DataType.isLargeUtf8(type)\n );\n}\n\nfunction isSerializedArrowType(type: arrow.DataType): boolean {\n return (\n isOffsetSerializedArrowType(type) ||\n arrow.DataType.isBinaryView(type) ||\n arrow.DataType.isUtf8View(type)\n );\n}\n\nfunction isGeoArrowDimension(value: string | undefined): value is GeoArrowDimension {\n return value === 'xy' || value === 'xyz' || value === 'xym' || value === 'xyzm';\n}\n\nfunction mergeGeoArrowDimensions(\n left: GeoArrowDimension,\n right: GeoArrowDimension\n): GeoArrowDimension {\n if (left === right) return left;\n if (left === 'xy') return right;\n if (right === 'xy') return left;\n if (left === 'xyzm' || right === 'xyzm') return 'xyzm';\n return left === 'xym' && right === 'xym' ? 'xym' : 'xyzm';\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,YAAuB;AAoBhB,SAAS,kCACd,QACA,UAAoD,CAAC,GACrC;AAChB,QAAM,WAAW,QAAQ,YAAY,mCAAmC,OAAO,IAAI;AACnF,QAAM,YACJ,QAAQ,cACP,sBAAsB,OAAO,IAAI,IAAI,OAAO,oCAAoC,OAAO,IAAI;AAC9F,QAAM,mBACJ,QAAQ,qBAAqB,SACzB,2CAA2C,OAAO,IAAI,IACtD,QAAQ;AAEd,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ,OAAO,KAAK,IAAI,UAAQ,+BAA+B,I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UAAU,QAAQ,UAAU,SAAS,UAAU,SAAS,UAAU;AAC3E;AAEA,SAAS,wBACP,MACA,OACmB;AACnB,MAAI,SAAS,MAAO,QAAO;AAC3B,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,UAAU,KAAM,QAAO;AAC3B,MAAI,SAAS,UAAU,UAAU,OAAQ,QAAO;AAChD,SAAO,SAAS,SAAS,UAAU,QAAQ,QAAQ;AACrD;",
|
|
6
|
-
"names": ["type"]
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { GeoArrowColumn, GeoArrowCoordinateLayout, GeoArrowDimension, GeoArrowEncoding } from '@math.gl/geospatial/geoarrow';
|
|
2
|
-
import * as arrow from 'apache-arrow';
|
|
3
|
-
/** Options for adapting an Apache Arrow vector to math.gl's runtime-neutral GeoArrow ABI. */
|
|
4
|
-
export type MakeGeoArrowColumnFromArrowVectorOptions = {
|
|
5
|
-
/** GeoArrow extension encoding. Inferred from the physical type when omitted. */
|
|
6
|
-
encoding?: GeoArrowEncoding;
|
|
7
|
-
/** Semantic coordinate dimension. Inferred from native coordinate fields when omitted. */
|
|
8
|
-
dimension?: GeoArrowDimension;
|
|
9
|
-
/** Coordinate organization. Inferred from the physical type when omitted. */
|
|
10
|
-
coordinateLayout?: GeoArrowCoordinateLayout | null;
|
|
11
|
-
/** Opaque extension metadata retained on the descriptor envelope. */
|
|
12
|
-
metadata?: Readonly<Record<string, unknown>>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Adapts Apache Arrow physical buffers to `@math.gl/geospatial/geoarrow` borrowed descriptors.
|
|
16
|
-
* Arrow slices already adjust numeric buffers, list offsets, union buffers, and fixed-width
|
|
17
|
-
* children. Their Data.offset is retained only as the validity bitmap's bit offset;
|
|
18
|
-
* copying it onto the geometry descriptor would apply the physical slice twice.
|
|
19
|
-
*/
|
|
20
|
-
export declare function makeGeoArrowColumnFromArrowVector(vector: arrow.Vector, options?: MakeGeoArrowColumnFromArrowVectorOptions): GeoArrowColumn;
|
|
21
|
-
/** Converts a math.gl GeoArrow descriptor back to an Apache Arrow vector. */
|
|
22
|
-
export declare function makeArrowVectorFromGeoArrowColumn(column: GeoArrowColumn): arrow.Vector;
|
|
23
|
-
/** Infers a GeoArrow encoding from an Apache Arrow physical type. */
|
|
24
|
-
export declare function inferGeoArrowEncodingFromArrowType(type: arrow.DataType): GeoArrowEncoding;
|
|
25
|
-
/** Infers semantic coordinate dimensions from Arrow coordinate fields. */
|
|
26
|
-
export declare function inferGeoArrowDimensionFromArrowType(type: arrow.DataType): GeoArrowDimension;
|
|
27
|
-
/** Infers whether Arrow coordinate leaves are interleaved or separated. */
|
|
28
|
-
export declare function inferGeoArrowCoordinateLayoutFromArrowType(type: arrow.DataType): GeoArrowCoordinateLayout | null;
|
|
29
|
-
//# sourceMappingURL=arrow-geoarrow-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-geoarrow-adapter.d.ts","sourceRoot":"","sources":["../../src/arrow-geometry/arrow-geoarrow-adapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,cAAc,EACd,wBAAwB,EAExB,iBAAiB,EACjB,gBAAgB,EAIjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,6FAA6F;AAC7F,MAAM,MAAM,wCAAwC,GAAG;IACrD,iFAAiF;IACjF,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,0FAA0F;IAC1F,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACnD,qEAAqE;IACrE,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,GAAE,wCAA6C,GACrD,cAAc,CAiBhB;AAED,6EAA6E;AAC7E,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,cAAc,GAAG,KAAK,CAAC,MAAM,CAMtF;AAED,qEAAqE;AACrE,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,gBAAgB,CA8BzF;AAED,0EAA0E;AAC1E,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,iBAAiB,CAqC3F;AAED,2EAA2E;AAC3E,wBAAgB,0CAA0C,CACxD,IAAI,EAAE,KAAK,CAAC,QAAQ,GACnB,wBAAwB,GAAG,IAAI,CAajC"}
|