@loaders.gl/core 5.0.0-beta.7 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GEOARROW-README.md +6 -0
- package/SCAN-README.md +2 -2
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +4 -1
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +1 -1
- package/dist/arrow-geometry/binary-features.js.map +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +274 -509
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +478 -450
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +121 -485
- package/dist/federated-table-scan-source.cjs.map +3 -3
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +8 -9
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +5 -9
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +486 -410
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +9 -10
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +31 -114
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +257 -88
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +9 -4
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +5 -3
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +5 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +13 -5
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +48 -3
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +12 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +22 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +17 -11
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +53 -32
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +3 -13
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +6 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +26 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +114 -87
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +21 -9
- package/dist/loader-utils/tile-grid.cjs.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/polyfills/index.cjs +3 -2
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +36 -12
- package/dist/scan/arrow-execution/expressions.cjs.map +3 -3
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +36 -12
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +11 -6
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -5
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +41 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +195 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +47 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +201 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +141 -92
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +37 -10
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +137 -96
- package/dist/scan/query.js.map +1 -1
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +410 -626
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +7 -3
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -76
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +241 -291
- package/dist/vector-table-scan-source.cjs.map +2 -2
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +51 -11
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +2 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +4 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +2 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -12
- package/src/arrow-geometry/binary-features.ts +4 -1
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +3 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +8 -12
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +4 -3
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +19 -3
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +18 -8
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +28 -1
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +88 -56
- package/src/loader-utils/lib/sources/data-source.ts +3 -15
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +34 -18
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +27 -18
- package/src/loader-utils/loader-types.ts +186 -107
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +41 -11
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +230 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +254 -127
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +7 -7
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -11
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +8 -4
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/row-utils.ts +2 -2
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/library-utils/library-utils.ts +2 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
|
@@ -37,26 +37,24 @@ export class ClusterSource extends DataSource {
|
|
|
37
37
|
super(data, {});
|
|
38
38
|
const positions = [];
|
|
39
39
|
const rowIndices = [];
|
|
40
|
-
if (
|
|
41
|
-
const columns = getGeometryColumnsFromSchema(data.
|
|
40
|
+
if (!('shape' in data)) {
|
|
41
|
+
const columns = getGeometryColumnsFromSchema(data.schema);
|
|
42
42
|
const columnNames = Object.keys(columns);
|
|
43
43
|
this.geometryColumn =
|
|
44
44
|
options.geometryColumn ?? (columnNames.length === 1 ? columnNames[0] : undefined);
|
|
45
45
|
this.geometryEncoding = this.geometryColumn
|
|
46
46
|
? columns[this.geometryColumn]?.encoding
|
|
47
47
|
: undefined;
|
|
48
|
-
if (!this.geometryColumn ||
|
|
49
|
-
!this.geometryEncoding ||
|
|
50
|
-
!data.data.getChild(this.geometryColumn)) {
|
|
48
|
+
if (!this.geometryColumn || !this.geometryEncoding || !data.getChild(this.geometryColumn)) {
|
|
51
49
|
throw new Error('ClusterSource requires an explicitly identified GeoArrow geometry column');
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
|
-
const geometryVector =
|
|
52
|
+
const geometryVector = !('shape' in data) ? data.getChild(this.geometryColumn) : null;
|
|
55
53
|
// Native point bounds read Arrow buffers directly, including chunks, slices and nulls.
|
|
56
54
|
const pointBounds = geometryVector && this.geometryEncoding === 'geoarrow.point' && !options.getClusterPosition
|
|
57
55
|
? getGeoArrowRowBounds(geometryVector, this.geometryEncoding)
|
|
58
56
|
: null;
|
|
59
|
-
const rowCount =
|
|
57
|
+
const rowCount = !('shape' in data) ? data.numRows : data.features.length;
|
|
60
58
|
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
61
59
|
let position;
|
|
62
60
|
if (pointBounds) {
|
|
@@ -79,9 +77,9 @@ export class ClusterSource extends DataSource {
|
|
|
79
77
|
if (['cluster', 'clusterId', 'pointCount', 'rowIndex', 'geometry'].includes(name)) {
|
|
80
78
|
throw new Error(`Reserved cluster property: ${name}`);
|
|
81
79
|
}
|
|
82
|
-
const column =
|
|
80
|
+
const column = !('shape' in data) ? data.getChild(aggregation.column) : null;
|
|
83
81
|
const values = rowIndices.map(rowIndex => {
|
|
84
|
-
const value =
|
|
82
|
+
const value = !('shape' in data)
|
|
85
83
|
? column?.get(rowIndex)
|
|
86
84
|
: data.features[rowIndex].properties?.[aggregation.column];
|
|
87
85
|
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
@@ -157,29 +155,26 @@ export class ClusterSource extends DataSource {
|
|
|
157
155
|
const table = builder.finishTable();
|
|
158
156
|
const preference = parameters.geoarrow?.encodingPreference;
|
|
159
157
|
if (preference && preference !== 'geoarrow.wkb') {
|
|
160
|
-
return
|
|
161
|
-
shape: 'arrow-table',
|
|
162
|
-
data: convertGeoArrowGeometry(table.data, preference === 'optimized' ? 'geoarrow.point' : 'geoarrow.geometry')
|
|
163
|
-
};
|
|
158
|
+
return convertGeoArrowGeometry(table, preference === 'optimized' ? 'geoarrow.point' : 'geoarrow.geometry');
|
|
164
159
|
}
|
|
165
160
|
return table;
|
|
166
161
|
}
|
|
167
162
|
/** Retrieves a member's original geometry and properties; Arrow rows are materialized on demand. */
|
|
168
163
|
getFeature(rowIndex) {
|
|
169
|
-
const rowCount = this.data
|
|
164
|
+
const rowCount = !('shape' in this.data) ? this.data.numRows : this.data.features.length;
|
|
170
165
|
if (!Number.isInteger(rowIndex) || rowIndex < 0 || rowIndex >= rowCount)
|
|
171
166
|
throw new Error('Invalid cluster source row');
|
|
172
|
-
if (this.data
|
|
167
|
+
if ('shape' in this.data)
|
|
173
168
|
return this.data.features[rowIndex];
|
|
174
|
-
const properties = { ...this.data.
|
|
169
|
+
const properties = { ...this.data.get(rowIndex).toJSON() };
|
|
175
170
|
delete properties[this.geometryColumn];
|
|
176
171
|
return { type: 'Feature', geometry: this.getGeometry(rowIndex), properties };
|
|
177
172
|
}
|
|
178
173
|
/** Decodes one geometry only when extraction or member retrieval needs it. */
|
|
179
174
|
getGeometry(rowIndex) {
|
|
180
|
-
return this.data
|
|
175
|
+
return 'shape' in this.data
|
|
181
176
|
? this.data.features[rowIndex].geometry
|
|
182
|
-
: convertGeoArrowVectorCellToGeoJSON(this.data.
|
|
177
|
+
: convertGeoArrowVectorCellToGeoJSON(this.data.getChild(this.geometryColumn), rowIndex, this.geometryEncoding);
|
|
183
178
|
}
|
|
184
179
|
}
|
|
185
180
|
/** Converts an index node into a marker without copying original feature properties. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-source.js","sourceRoot":"","sources":["../../../src/geoarrow/clustering/cluster-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"cluster-source.js","sourceRoot":"","sources":["../../../src/geoarrow/clustering/cluster-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAczD,OAAO,EAAC,oBAAoB,EAAC,MAAM,iDAAiD,CAAC;AACrF,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAC,uCAAuC,EAAC,MAAM,+CAA+C,CAAC;AACtG,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAC,4BAA4B,EAAC,yCAAsC;AAC3E,OAAO,EACL,kCAAkC,EAClC,uBAAuB,EACxB,2DAAwD;AACzD,OAAO,EAAC,oBAAoB,EAAC,8BAA2B;AACxD,OAAO,EACL,YAAY,EAIb,2BAAwB;AACzB,OAAO,EAAC,sBAAsB,EAAmC,sCAAmC;AAoCpG;;;;;;;;;GASG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAiC;IAClE,8EAA8E;IACrE,KAAK,CAAe;IAC7B,8FAA8F;IACrF,eAAe,CAAS;IACjC,kEAAkE;IACjD,cAAc,CAAU;IACzC,wCAAwC;IACvB,gBAAgB,CAAoB;IACrD,wEAAwE;IACvD,cAAc,CAAS;IAExC,2FAA2F;IAC3F,YAAY,IAAuB,EAAE,UAAgC,EAAE;QACrE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAChB,MAAM,SAAS,GAAa,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAa,EAAE,CAAC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AAE,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAC,CAAC;IAC7E,CAAC;IAED,8EAA8E;IACtE,WAAW,CAAC,QAAgB;QAClC,OAAO,OAAO,IAAI,IAAI,CAAC,IAAI;YACzB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ;YACvC,CAAC,CAAC,kCAAkC,CAChC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAe,CAAE,EACzC,QAAQ,EACR,IAAI,CAAC,gBAAiB,CACvB,CAAC;IACR,CAAC;CACF;AAED,wFAAwF;AACxF,SAAS,oBAAoB,CAAC,IAAiB;IAC7C,OAAO;QACL,IAAI,EAAE,SAAS;QACf,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,QAAQ,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,EAAC;QACrD,UAAU,EAAE;YACV,GAAG,IAAI,CAAC,UAAU;YAClB,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,SAAS,EAAE,IAAI,CAAC,EAAE;YAClB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -30,16 +30,15 @@ var import_schema_utils = require("@loaders.gl/core/schema-utils");
|
|
|
30
30
|
var import_convert_geoarrow_geometry = require("./geoarrow-converter/convert-geoarrow-geometry.cjs");
|
|
31
31
|
function convertTableToGeoArrow(table, options) {
|
|
32
32
|
const encoding = resolveGeoArrowEncoding(options);
|
|
33
|
+
if (!("shape" in table)) return convertArrowTableToGeoArrow(table, encoding, options);
|
|
33
34
|
switch (table.shape) {
|
|
34
|
-
case "arrow-table":
|
|
35
|
-
return convertArrowTableToGeoArrow(table.data, encoding, options);
|
|
36
35
|
case "geojson-table":
|
|
37
|
-
return convertFeatureCollectionToGeoArrowTable(table, options)
|
|
36
|
+
return convertFeatureCollectionToGeoArrowTable(table, options);
|
|
38
37
|
default:
|
|
39
38
|
if (encoding) {
|
|
40
39
|
const featureTable = convertGenericGeometryTable(table, options);
|
|
41
40
|
if (featureTable) {
|
|
42
|
-
return featureTable
|
|
41
|
+
return featureTable;
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
return convertArrowTableToGeoArrow((0, import_schema_utils.convertTableToArrow)(table, options), encoding, options);
|
|
@@ -51,10 +50,7 @@ function convertFeatureCollectionToGeoArrowTable(table, options) {
|
|
|
51
50
|
encoding: getGeoJSONStagingEncoding(encoding),
|
|
52
51
|
geometryColumnName: options?.geoarrow?.geometryColumnName
|
|
53
52
|
});
|
|
54
|
-
return
|
|
55
|
-
shape: "arrow-table",
|
|
56
|
-
data: convertGeoJSONArrowTableToTarget(arrowTable.data, encoding, options)
|
|
57
|
-
};
|
|
53
|
+
return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);
|
|
58
54
|
}
|
|
59
55
|
function convertFeaturesToGeoArrowTable(features, options) {
|
|
60
56
|
const encoding = resolveGeoArrowEncoding(options);
|
|
@@ -62,10 +58,7 @@ function convertFeaturesToGeoArrowTable(features, options) {
|
|
|
62
58
|
encoding: getGeoJSONStagingEncoding(encoding),
|
|
63
59
|
geometryColumnName: options?.geoarrow?.geometryColumnName
|
|
64
60
|
});
|
|
65
|
-
return
|
|
66
|
-
shape: "arrow-table",
|
|
67
|
-
data: convertGeoJSONArrowTableToTarget(arrowTable.data, encoding, options)
|
|
68
|
-
};
|
|
61
|
+
return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);
|
|
69
62
|
}
|
|
70
63
|
function convertGenericGeometryTable(table, options) {
|
|
71
64
|
const geometryColumn = options?.geoarrow?.geometryColumn || "geometry";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/geoarrow/convert-table-to-geoarrow.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n convertFeatureCollectionToGeoArrowTable as convertGISFeatureCollectionToGeoArrowTable,\n convertFeaturesToGeoArrowTable as convertGISFeaturesToGeoArrowTable\n} from '@loaders.gl/core/arrow-geometry/feature-table';\nimport type {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,2BAGO;
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {\n convertFeatureCollectionToGeoArrowTable as convertGISFeatureCollectionToGeoArrowTable,\n convertFeaturesToGeoArrowTable as convertGISFeaturesToGeoArrowTable\n} from '@loaders.gl/core/arrow-geometry/feature-table';\nimport type {\n Feature,\n Geometry,\n GeoArrowEncodingPreference,\n GeoJSONTable,\n Table\n} from '@loaders.gl/core/schema';\nimport {convertTableToArrow} from '@loaders.gl/core/schema-utils';\nimport type * as arrow from 'apache-arrow';\nimport {convertGeoArrowGeometry} from './geoarrow-converter/convert-geoarrow-geometry';\nimport type {GeoArrowGeometryConvertOptions} from './geoarrow-converter/convert-geoarrow-geometry';\nimport type {GeoArrowEncoding} from './metadata/geoarrow-metadata';\n\n/** Encodings accepted when converting feature geometry columns to GeoArrow output. */\nexport type GeoArrowConvertFromEncoding = 'wkb' | 'wkt' | 'geometry' | 'native' | GeoArrowEncoding;\n\n/** Options for converting loaders.gl tables to GeoArrow-compatible Arrow tables. */\nexport type GeoArrowConvertFromOptions = {\n /** Optional batch size forwarded to generic table-to-Arrow conversion. */\n batchSize?: number;\n /** GeoArrow-specific conversion options. */\n geoarrow?: GeoArrowGeometryConvertOptions & {\n /** Geometry encoding to write for GeoJSON feature inputs. */\n encoding?: GeoArrowConvertFromEncoding;\n /** Preferred loader-facing output policy; mutually exclusive with `encoding`. */\n encodingPreference?: GeoArrowEncodingPreference;\n /** Geometry field name to preserve when adapting generic row or column tables. */\n geometryColumnName?: string;\n };\n};\n\n/**\n * Converts a loaders.gl table to an Apache Arrow table with GeoArrow-compatible geometry metadata when possible.\n *\n * Today this performs a geometry-aware conversion for `geojson-table` inputs and otherwise falls back to\n * generic Arrow conversion, preserving any existing schema metadata on the source table.\n */\nexport function convertTableToGeoArrow(\n table: Table | arrow.Table,\n options?: GeoArrowConvertFromOptions\n): arrow.Table {\n const encoding = resolveGeoArrowEncoding(options);\n\n if (!('shape' in table)) return convertArrowTableToGeoArrow(table, encoding, options);\n\n switch (table.shape) {\n case 'geojson-table':\n return convertFeatureCollectionToGeoArrowTable(table, options);\n\n default:\n if (encoding) {\n const featureTable = convertGenericGeometryTable(table, options);\n if (featureTable) {\n return featureTable;\n }\n }\n return convertArrowTableToGeoArrow(convertTableToArrow(table, options), encoding, options);\n }\n}\n\n/**\n * Converts a GeoJSON feature collection table to an Apache Arrow table with GeoArrow geometry metadata.\n */\nexport function convertFeatureCollectionToGeoArrowTable(\n table: GeoJSONTable,\n options?: GeoArrowConvertFromOptions\n): arrow.Table {\n const encoding = resolveGeoArrowEncoding(options);\n const arrowTable = convertGISFeatureCollectionToGeoArrowTable(table, {\n encoding: getGeoJSONStagingEncoding(encoding),\n geometryColumnName: options?.geoarrow?.geometryColumnName\n });\n return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);\n}\n\n/**\n * Converts GeoJSON features into an Apache Arrow table with GeoArrow geometry metadata.\n */\nexport function convertFeaturesToGeoArrowTable(\n features: Feature[],\n options?: GeoArrowConvertFromOptions\n): arrow.Table {\n const encoding = resolveGeoArrowEncoding(options);\n const arrowTable = convertGISFeaturesToGeoArrowTable(features, {\n encoding: getGeoJSONStagingEncoding(encoding),\n geometryColumnName: options?.geoarrow?.geometryColumnName\n });\n return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);\n}\n\n/** Converts generic row and column tables when they contain GeoJSON geometry values. */\nfunction convertGenericGeometryTable(\n table: Exclude<Table, GeoJSONTable>,\n options?: GeoArrowConvertFromOptions\n): arrow.Table | null {\n const geometryColumn = options?.geoarrow?.geometryColumn || 'geometry';\n const rows = getGenericTableRows(table);\n if (!rows.some(row => isGeoJSONGeometry(row[geometryColumn]))) {\n return null;\n }\n\n const features: Feature[] = rows.map(row => {\n const geometry = row[geometryColumn];\n const properties = {...row};\n delete properties[geometryColumn];\n return {\n type: 'Feature',\n properties,\n // The GIS encoder accepts null geometry rows even though the GeoJSON Feature type is non-null.\n geometry: (isGeoJSONGeometry(geometry) ? geometry : null) as unknown as Geometry\n };\n });\n return convertFeaturesToGeoArrowTable(features, {\n ...options,\n geoarrow: {\n ...options?.geoarrow,\n geometryColumnName: options?.geoarrow?.geometryColumnName || geometryColumn\n }\n });\n}\n\n/** Materializes generic table rows for the opt-in geometry adaptation path. */\nfunction getGenericTableRows(table: Exclude<Table, GeoJSONTable>): Record<string, unknown>[] {\n switch (table.shape) {\n case 'object-row-table':\n return table.data as Record<string, unknown>[];\n case 'array-row-table': {\n const fieldNames = table.schema?.fields.map(field => field.name) || [];\n return table.data.map(row =>\n Object.fromEntries(fieldNames.map((fieldName, fieldIndex) => [fieldName, row[fieldIndex]]))\n );\n }\n case 'columnar-table': {\n const columnNames = Object.keys(table.data);\n const rowCount = columnNames.length > 0 ? table.data[columnNames[0]].length : 0;\n return Array.from({length: rowCount}, (_value, rowIndex) =>\n Object.fromEntries(\n columnNames.map(columnName => [columnName, table.data[columnName][rowIndex]])\n )\n );\n }\n default:\n return [];\n }\n}\n\n/** Returns true for a GeoJSON geometry object, excluding Feature wrappers. */\nfunction isGeoJSONGeometry(value: unknown): value is Geometry {\n if (!value || typeof value !== 'object') return false;\n const geometryType = (value as {type?: unknown}).type;\n return (\n geometryType === 'Point' ||\n geometryType === 'MultiPoint' ||\n geometryType === 'LineString' ||\n geometryType === 'MultiLineString' ||\n geometryType === 'Polygon' ||\n geometryType === 'MultiPolygon' ||\n geometryType === 'GeometryCollection'\n );\n}\n\n/** Preserves the GIS WKB/WKT staging table when it already matches the requested output. */\nfunction convertGeoJSONArrowTableToTarget(\n table: arrow.Table,\n encoding: GeoArrowGeometryTarget | undefined,\n options?: GeoArrowConvertFromOptions\n): arrow.Table {\n if (!encoding || encoding === 'geoarrow.wkb' || encoding === 'geoarrow.wkt') {\n return table;\n }\n return convertArrowTableToGeoArrow(table, encoding, options);\n}\n\n/** Converts a generic Arrow table into the requested GeoArrow encoding. */\nfunction convertArrowTableToGeoArrow(\n table: arrow.Table,\n encoding: GeoArrowGeometryTarget | undefined,\n options?: GeoArrowConvertFromOptions\n): arrow.Table {\n if (!encoding) {\n return table;\n }\n return convertGeoArrowGeometry(table, encoding, options?.geoarrow);\n}\n\n/** Uses WKB as the compact staging encoding for GeoJSON geometry values. */\nfunction getGeoJSONStagingEncoding(encoding: GeoArrowGeometryTarget | undefined): 'wkb' | 'wkt' {\n return encoding === 'geoarrow.wkt' ? 'wkt' : 'wkb';\n}\n\n/** Normalizes public GeoArrow encoding names to canonical GeoArrow encodings. */\nfunction normalizeGeoArrowEncoding(\n encoding: GeoArrowConvertFromEncoding | undefined\n): GeoArrowGeometryTarget | undefined {\n switch (encoding) {\n case undefined:\n return undefined;\n case 'wkb':\n case 'geoarrow.wkb':\n return 'geoarrow.wkb';\n case 'wkt':\n case 'geoarrow.wkt':\n return 'geoarrow.wkt';\n case 'native':\n return 'native';\n case 'geometry':\n return 'geoarrow.geometry';\n case 'geoarrow.point':\n case 'geoarrow.linestring':\n case 'geoarrow.polygon':\n case 'geoarrow.multipoint':\n case 'geoarrow.multilinestring':\n case 'geoarrow.multipolygon':\n case 'geoarrow.geometry':\n case 'geoarrow.geometrycollection':\n case 'geoarrow.box':\n return encoding;\n default:\n throw new Error(`Unknown GeoArrow encoding \"${encoding}\"`);\n }\n}\n\n/** Resolves an exact converter target or a loader-facing encoding preference. */\nfunction resolveGeoArrowEncoding(\n options?: GeoArrowConvertFromOptions\n): GeoArrowGeometryTarget | undefined {\n const exactEncoding = options?.geoarrow?.encoding;\n const encodingPreference = options?.geoarrow?.encodingPreference;\n if (exactEncoding !== undefined && encodingPreference !== undefined) {\n throw new Error('GeoArrow conversion cannot specify both encoding and encodingPreference.');\n }\n if (encodingPreference === 'geoarrow.wkb') return 'geoarrow.wkb';\n if (encodingPreference === 'geoarrow.geometry') return 'geoarrow.geometry';\n if (encodingPreference === 'optimized') return 'native';\n return normalizeGeoArrowEncoding(exactEncoding);\n}\n\ntype GeoArrowGeometryTarget = GeoArrowEncoding | 'native';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,2BAGO;AAQP,0BAAkC;AAElC,uCAAsC;AA4B/B,SAAS,uBACd,OACA,SACa;AACb,QAAM,WAAW,wBAAwB,OAAO;AAEhD,MAAI,EAAE,WAAW,OAAQ,QAAO,4BAA4B,OAAO,UAAU,OAAO;AAEpF,UAAQ,MAAM,OAAO;AAAA,IACnB,KAAK;AACH,aAAO,wCAAwC,OAAO,OAAO;AAAA,IAE/D;AACE,UAAI,UAAU;AACZ,cAAM,eAAe,4BAA4B,OAAO,OAAO;AAC/D,YAAI,cAAc;AAChB,iBAAO;AAAA,QACT;AAAA,MACF;AACA,aAAO,gCAA4B,yCAAoB,OAAO,OAAO,GAAG,UAAU,OAAO;AAAA,EAC7F;AACF;AAKO,SAAS,wCACd,OACA,SACa;AACb,QAAM,WAAW,wBAAwB,OAAO;AAChD,QAAM,iBAAa,qBAAAA,yCAA2C,OAAO;AAAA,IACnE,UAAU,0BAA0B,QAAQ;AAAA,IAC5C,oBAAoB,SAAS,UAAU;AAAA,EACzC,CAAC;AACD,SAAO,iCAAiC,YAAY,UAAU,OAAO;AACvE;AAKO,SAAS,+BACd,UACA,SACa;AACb,QAAM,WAAW,wBAAwB,OAAO;AAChD,QAAM,iBAAa,qBAAAC,gCAAkC,UAAU;AAAA,IAC7D,UAA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GAAG;AAAA,EAC7D;AACF;AAGA,SAAS,wBACP,SACoC;AACpC,QAAM,gBAAgB,SAAS,UAAU;AACzC,QAAM,qBAAqB,SAAS,UAAU;AAC9C,MAAI,kBAAkB,UAAa,uBAAuB,QAAW;AACnE,UAAM,IAAI,MAAM,0EAA0E;AAAA,EAC5F;AACA,MAAI,uBAAuB,eAAgB,QAAO;AAClD,MAAI,uBAAuB,oBAAqB,QAAO;AACvD,MAAI,uBAAuB,YAAa,QAAO;AAC/C,SAAO,0BAA0B,aAAa;AAChD;",
|
|
6
6
|
"names": ["convertGISFeatureCollectionToGeoArrowTable", "convertGISFeaturesToGeoArrowTable"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Feature, GeoArrowEncodingPreference, GeoJSONTable, Table } from '@loaders.gl/core/schema';
|
|
2
2
|
import type * as arrow from 'apache-arrow';
|
|
3
3
|
import type { GeoArrowGeometryConvertOptions } from "./geoarrow-converter/convert-geoarrow-geometry.js";
|
|
4
4
|
import type { GeoArrowEncoding } from "./metadata/geoarrow-metadata.js";
|
|
@@ -24,13 +24,13 @@ export type GeoArrowConvertFromOptions = {
|
|
|
24
24
|
* Today this performs a geometry-aware conversion for `geojson-table` inputs and otherwise falls back to
|
|
25
25
|
* generic Arrow conversion, preserving any existing schema metadata on the source table.
|
|
26
26
|
*/
|
|
27
|
-
export declare function convertTableToGeoArrow(table: Table, options?: GeoArrowConvertFromOptions): arrow.Table;
|
|
27
|
+
export declare function convertTableToGeoArrow(table: Table | arrow.Table, options?: GeoArrowConvertFromOptions): arrow.Table;
|
|
28
28
|
/**
|
|
29
|
-
* Converts a GeoJSON feature collection table to
|
|
29
|
+
* Converts a GeoJSON feature collection table to an Apache Arrow table with GeoArrow geometry metadata.
|
|
30
30
|
*/
|
|
31
|
-
export declare function convertFeatureCollectionToGeoArrowTable(table: GeoJSONTable, options?: GeoArrowConvertFromOptions):
|
|
31
|
+
export declare function convertFeatureCollectionToGeoArrowTable(table: GeoJSONTable, options?: GeoArrowConvertFromOptions): arrow.Table;
|
|
32
32
|
/**
|
|
33
|
-
* Converts GeoJSON features into
|
|
33
|
+
* Converts GeoJSON features into an Apache Arrow table with GeoArrow geometry metadata.
|
|
34
34
|
*/
|
|
35
|
-
export declare function convertFeaturesToGeoArrowTable(features: Feature[], options?: GeoArrowConvertFromOptions):
|
|
35
|
+
export declare function convertFeaturesToGeoArrowTable(features: Feature[], options?: GeoArrowConvertFromOptions): arrow.Table;
|
|
36
36
|
//# sourceMappingURL=convert-table-to-geoarrow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-table-to-geoarrow.d.ts","sourceRoot":"","sources":["../../src/geoarrow/convert-table-to-geoarrow.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"convert-table-to-geoarrow.d.ts","sourceRoot":"","sources":["../../src/geoarrow/convert-table-to-geoarrow.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,OAAO,EAEP,0BAA0B,EAC1B,YAAY,EACZ,KAAK,EACN,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAC,8BAA8B,EAAC,0DAAuD;AACnG,OAAO,KAAK,EAAC,gBAAgB,EAAC,wCAAqC;AAEnE,sFAAsF;AACtF,MAAM,MAAM,2BAA2B,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,gBAAgB,CAAC;AAEnG,oFAAoF;AACpF,MAAM,MAAM,0BAA0B,GAAG;IACvC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,8BAA8B,GAAG;QAC1C,6DAA6D;QAC7D,QAAQ,CAAC,EAAE,2BAA2B,CAAC;QACvC,iFAAiF;QACjF,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;QAChD,kFAAkF;QAClF,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAC1B,OAAO,CAAC,EAAE,0BAA0B,GACnC,KAAK,CAAC,KAAK,CAkBb;AAED;;GAEG;AACH,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,0BAA0B,GACnC,KAAK,CAAC,KAAK,CAOb;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,CAAC,EAAE,0BAA0B,GACnC,KAAK,CAAC,KAAK,CAOb"}
|
|
@@ -12,23 +12,23 @@ import { convertGeoArrowGeometry } from "./geoarrow-converter/convert-geoarrow-g
|
|
|
12
12
|
*/
|
|
13
13
|
export function convertTableToGeoArrow(table, options) {
|
|
14
14
|
const encoding = resolveGeoArrowEncoding(options);
|
|
15
|
+
if (!('shape' in table))
|
|
16
|
+
return convertArrowTableToGeoArrow(table, encoding, options);
|
|
15
17
|
switch (table.shape) {
|
|
16
|
-
case 'arrow-table':
|
|
17
|
-
return convertArrowTableToGeoArrow(table.data, encoding, options);
|
|
18
18
|
case 'geojson-table':
|
|
19
|
-
return convertFeatureCollectionToGeoArrowTable(table, options)
|
|
19
|
+
return convertFeatureCollectionToGeoArrowTable(table, options);
|
|
20
20
|
default:
|
|
21
21
|
if (encoding) {
|
|
22
22
|
const featureTable = convertGenericGeometryTable(table, options);
|
|
23
23
|
if (featureTable) {
|
|
24
|
-
return featureTable
|
|
24
|
+
return featureTable;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
return convertArrowTableToGeoArrow(convertTableToArrow(table, options), encoding, options);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Converts a GeoJSON feature collection table to
|
|
31
|
+
* Converts a GeoJSON feature collection table to an Apache Arrow table with GeoArrow geometry metadata.
|
|
32
32
|
*/
|
|
33
33
|
export function convertFeatureCollectionToGeoArrowTable(table, options) {
|
|
34
34
|
const encoding = resolveGeoArrowEncoding(options);
|
|
@@ -36,13 +36,10 @@ export function convertFeatureCollectionToGeoArrowTable(table, options) {
|
|
|
36
36
|
encoding: getGeoJSONStagingEncoding(encoding),
|
|
37
37
|
geometryColumnName: options?.geoarrow?.geometryColumnName
|
|
38
38
|
});
|
|
39
|
-
return
|
|
40
|
-
shape: 'arrow-table',
|
|
41
|
-
data: convertGeoJSONArrowTableToTarget(arrowTable.data, encoding, options)
|
|
42
|
-
};
|
|
39
|
+
return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);
|
|
43
40
|
}
|
|
44
41
|
/**
|
|
45
|
-
* Converts GeoJSON features into
|
|
42
|
+
* Converts GeoJSON features into an Apache Arrow table with GeoArrow geometry metadata.
|
|
46
43
|
*/
|
|
47
44
|
export function convertFeaturesToGeoArrowTable(features, options) {
|
|
48
45
|
const encoding = resolveGeoArrowEncoding(options);
|
|
@@ -50,10 +47,7 @@ export function convertFeaturesToGeoArrowTable(features, options) {
|
|
|
50
47
|
encoding: getGeoJSONStagingEncoding(encoding),
|
|
51
48
|
geometryColumnName: options?.geoarrow?.geometryColumnName
|
|
52
49
|
});
|
|
53
|
-
return
|
|
54
|
-
shape: 'arrow-table',
|
|
55
|
-
data: convertGeoJSONArrowTableToTarget(arrowTable.data, encoding, options)
|
|
56
|
-
};
|
|
50
|
+
return convertGeoJSONArrowTableToTarget(arrowTable, encoding, options);
|
|
57
51
|
}
|
|
58
52
|
/** Converts generic row and column tables when they contain GeoJSON geometry values. */
|
|
59
53
|
function convertGenericGeometryTable(table, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-table-to-geoarrow.js","sourceRoot":"","sources":["../../src/geoarrow/convert-table-to-geoarrow.ts"],"names":[],"mappings":"AAAA,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F,CAAC;IACD,IAAI,kBAAkB,KAAK,cAAc;QAAE,OAAO,cAAc,CAAC;IACjE,IAAI,kBAAkB,KAAK,mBAAmB;QAAE,OAAO,mBAAmB,CAAC;IAC3E,IAAI,kBAAkB,KAAK,WAAW;QAAE,OAAO,QAAQ,CAAC;IACxD,OAAO,yBAAyB,CAAC,aAAa,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/geoarrow/geo-column/geo-column.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// GIS\nimport type {TypedArray} from '@math.gl/core';\n\n// BINARY FORMAT GEOMETRY\n\nexport type GeoColumnType = 'Point' | 'LineString' | 'Polygon';\n\n/** A geometry column can be built from list of geometry column data chunks */\nexport type GeoColumn<MetadataT = Record<string, unknown>> = {\n shape: 'geo-column';\n metadata?: MetadataT;\n data: GeoColumnData[];\n};\n\nexport type GeoColumnData = GeoColumnPointData | GeoColumnLineData | GeoColumnPolygonData;\n\n/**\n * Describes a single contiguous chunk of geometries in binary columnar format\n * Extracts the nested position and offset arrays from a GeoArrow column\n * @note Designed to be a cheap operation: does not create any new arrays, just holds extracted references the existing arrays\n */\nexport type GeoColumnCommonData = {\n shape: 'geo-column-data';\n\n /** Number of rows geometries (can be less than pointCount if representing multipoints) */\n numRows: number;\n /** Offset to the end of the next geometry (length = rowCount) */\n rowOffsets: Uint32Array;\n\n /** Number of positions */\n numPositions: number;\n /** Data for coordinates, either interleaved or separate arrays */\n positions: GeoColumnPositions;\n\n /** Stores the data for the respective geometry types */\n // points?: GeoColumnPointData;\n // lines?: GeoColumnLineData;\n // polygons?: GeoColumnPolygonData;\n};\n\n/** Columnar point geometry: an array of positions */\nexport type GeoColumnPointData = GeoColumnCommonData & {\n type: 'Point';\n};\n\n/** Columnar line geometry, array of positions and indices to the start of each line */\nexport type GeoColumnLineData = GeoColumnCommonData & {\n type: 'LineString';\n\n /** Offset to the next path within the multi feature */\n pathOffsets: Uint32Array;\n};\n\n/** Columnar polygon geometry, an array of positions to each primitite polygon and polygon */\nexport type GeoColumnPolygonData = GeoColumnCommonData & {\n type: 'Polygon';\n /** Offset to next polygon */\n polygonOffsets: Uint32Array;\n /** Offset to next primitive polygon */\n ringOffsets: Uint32Array;\n};\n\nexport type GeoColumnPositions = GeoColumnInterleavedPositions | GeoColumnSeparatePositions;\n\n/** Positions are in a single coordinate array */\nexport type GeoColumnInterleavedPositions = {\n layout: 'interleaved';\n /** Dimension, i.e. number of coordinates per position: 2, 3 or 4 */\n stride: 2 | 3 | 4;\n /** Flat array of position coordinates (length = positionCount * positionStride */\n coordinates: TypedArray;\n};\n\n/** Positions are in separate coordinate arrays */\nexport type GeoColumnSeparatePositions = {\n layout: 'separate';\n /** Dimension, i.e. number of coordinates per position: 2, 3 or 4 */\n stride: 2 | 3 | 4;\n /** Flat array of position coordinates (length = positionCount * positionStride */\n coordinates: TypedArray[];\n};\n"],
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// GIS\nimport type {TypedArray} from '@math.gl/core/types';\n\n// BINARY FORMAT GEOMETRY\n\nexport type GeoColumnType = 'Point' | 'LineString' | 'Polygon';\n\n/** A geometry column can be built from list of geometry column data chunks */\nexport type GeoColumn<MetadataT = Record<string, unknown>> = {\n shape: 'geo-column';\n metadata?: MetadataT;\n data: GeoColumnData[];\n};\n\nexport type GeoColumnData = GeoColumnPointData | GeoColumnLineData | GeoColumnPolygonData;\n\n/**\n * Describes a single contiguous chunk of geometries in binary columnar format\n * Extracts the nested position and offset arrays from a GeoArrow column\n * @note Designed to be a cheap operation: does not create any new arrays, just holds extracted references the existing arrays\n */\nexport type GeoColumnCommonData = {\n shape: 'geo-column-data';\n\n /** Number of rows geometries (can be less than pointCount if representing multipoints) */\n numRows: number;\n /** Offset to the end of the next geometry (length = rowCount) */\n rowOffsets: Uint32Array;\n\n /** Number of positions */\n numPositions: number;\n /** Data for coordinates, either interleaved or separate arrays */\n positions: GeoColumnPositions;\n\n /** Stores the data for the respective geometry types */\n // points?: GeoColumnPointData;\n // lines?: GeoColumnLineData;\n // polygons?: GeoColumnPolygonData;\n};\n\n/** Columnar point geometry: an array of positions */\nexport type GeoColumnPointData = GeoColumnCommonData & {\n type: 'Point';\n};\n\n/** Columnar line geometry, array of positions and indices to the start of each line */\nexport type GeoColumnLineData = GeoColumnCommonData & {\n type: 'LineString';\n\n /** Offset to the next path within the multi feature */\n pathOffsets: Uint32Array;\n};\n\n/** Columnar polygon geometry, an array of positions to each primitite polygon and polygon */\nexport type GeoColumnPolygonData = GeoColumnCommonData & {\n type: 'Polygon';\n /** Offset to next polygon */\n polygonOffsets: Uint32Array;\n /** Offset to next primitive polygon */\n ringOffsets: Uint32Array;\n};\n\nexport type GeoColumnPositions = GeoColumnInterleavedPositions | GeoColumnSeparatePositions;\n\n/** Positions are in a single coordinate array */\nexport type GeoColumnInterleavedPositions = {\n layout: 'interleaved';\n /** Dimension, i.e. number of coordinates per position: 2, 3 or 4 */\n stride: 2 | 3 | 4;\n /** Flat array of position coordinates (length = positionCount * positionStride */\n coordinates: TypedArray;\n};\n\n/** Positions are in separate coordinate arrays */\nexport type GeoColumnSeparatePositions = {\n layout: 'separate';\n /** Dimension, i.e. number of coordinates per position: 2, 3 or 4 */\n stride: 2 | 3 | 4;\n /** Flat array of position coordinates (length = positionCount * positionStride */\n coordinates: TypedArray[];\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedArray } from '@math.gl/core';
|
|
1
|
+
import type { TypedArray } from '@math.gl/core/types';
|
|
2
2
|
export type GeoColumnType = 'Point' | 'LineString' | 'Polygon';
|
|
3
3
|
/** A geometry column can be built from list of geometry column data chunks */
|
|
4
4
|
export type GeoColumn<MetadataT = Record<string, unknown>> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-column.d.ts","sourceRoot":"","sources":["../../../src/geoarrow/geo-column/geo-column.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"geo-column.d.ts","sourceRoot":"","sources":["../../../src/geoarrow/geo-column/geo-column.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAIpD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,YAAY,GAAG,SAAS,CAAC;AAE/D,8EAA8E;AAC9E,MAAM,MAAM,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IAC3D,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAE1F;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,iBAAiB,CAAC;IAEzB,0FAA0F;IAC1F,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,UAAU,EAAE,WAAW,CAAC;IAExB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,SAAS,EAAE,kBAAkB,CAAC;CAM/B,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACrD,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,uFAAuF;AACvF,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD,IAAI,EAAE,YAAY,CAAC;IAEnB,uDAAuD;IACvD,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,6FAA6F;AAC7F,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,6BAA6B;IAC7B,cAAc,EAAE,WAAW,CAAC;IAC5B,uCAAuC;IACvC,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,6BAA6B,GAAG,0BAA0B,CAAC;AAE5F,iDAAiD;AACjD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,oEAAoE;IACpE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClB,kFAAkF;IAClF,WAAW,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,kDAAkD;AAClD,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,EAAE,UAAU,CAAC;IACnB,oEAAoE;IACpE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAClB,kFAAkF;IAClF,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,CAAC"}
|
|
@@ -24,16 +24,16 @@ __export(geoarrow_bounds_exports, {
|
|
|
24
24
|
getGeoArrowRowBounds: () => getGeoArrowRowBounds
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(geoarrow_bounds_exports);
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
27
|
+
var import_arrow = require("@math.gl/core/arrow");
|
|
28
|
+
var import_arrow2 = require("@math.gl/core/arrow");
|
|
29
|
+
var import_arrow3 = require("@math.gl/core/arrow");
|
|
30
30
|
var import_binary_polygon_to_geoarrow = require("./binary-polygon-to-geoarrow.cjs");
|
|
31
31
|
function getGeoArrowRowBounds(column, encodingOrOptions) {
|
|
32
32
|
if ("polygonIndices" in column) {
|
|
33
33
|
if (typeof encodingOrOptions === "string") {
|
|
34
34
|
throw new Error("Binary polygon bounds require an explicit dimension option.");
|
|
35
35
|
}
|
|
36
|
-
return (0,
|
|
36
|
+
return (0, import_arrow3.getGeoArrowRowBounds)((0, import_binary_polygon_to_geoarrow.makeGeoArrowColumnFromBinaryPolygon)(column, encodingOrOptions));
|
|
37
37
|
}
|
|
38
38
|
if (typeof encodingOrOptions !== "string") {
|
|
39
39
|
throw new Error("Arrow vector bounds require a GeoArrow encoding.");
|
|
@@ -42,8 +42,8 @@ function getGeoArrowRowBounds(column, encodingOrOptions) {
|
|
|
42
42
|
if (encoding !== "geoarrow.wkb" && encoding !== "geoarrow.wkt") {
|
|
43
43
|
const names = encoding === "geoarrow.box" ? column.type.children.map((field) => field.name) : [];
|
|
44
44
|
const dimension = encoding === "geoarrow.box" ? names.includes("zmin") ? names.includes("mmin") ? "xyzm" : "xyz" : names.includes("mmin") ? "xym" : "xy" : void 0;
|
|
45
|
-
return (0,
|
|
46
|
-
(0,
|
|
45
|
+
return (0, import_arrow3.getGeoArrowRowBounds)(
|
|
46
|
+
(0, import_arrow2.makeGeoArrowColumnFromArrowVector)(column, { encoding, dimension })
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
const bounds = [];
|
|
@@ -56,7 +56,7 @@ function getGeoArrowBounds(value, encoding) {
|
|
|
56
56
|
if (value == null) return null;
|
|
57
57
|
if (encoding === "geoarrow.wkb") {
|
|
58
58
|
const bytes = value;
|
|
59
|
-
const statistics = (0,
|
|
59
|
+
const statistics = (0, import_arrow.scanWKB)(bytes);
|
|
60
60
|
return statistics.bounds ? [
|
|
61
61
|
statistics.bounds.xmin,
|
|
62
62
|
statistics.bounds.ymin,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/geoarrow/geoarrow-bounds.ts"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as arrow from 'apache-arrow';\nimport {scanWKB} from '@math.gl/arrow
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,
|
|
6
|
-
"names": ["getMathGeoArrowRowBounds"]
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport * as arrow from 'apache-arrow';\nimport {scanWKB} from '@math.gl/core/arrow';\nimport {makeGeoArrowColumnFromArrowVector} from '@math.gl/core/arrow';\nimport type {BinaryPolygonGeometry, GeoArrowEncoding} from '@loaders.gl/core/schema';\nimport {getGeoArrowRowBounds as getMathGeoArrowRowBounds} from '@math.gl/core/arrow';\nimport {makeGeoArrowColumnFromBinaryPolygon} from './binary-polygon-to-geoarrow';\nimport type {BinaryPolygonToGeoArrowOptions} from './binary-polygon-to-geoarrow';\n\n/** Axis-aligned XY bounds in minX, minY, maxX, maxY order. */\nexport type GeoArrowBounds = readonly [number, number, number, number];\n\n/**\n * Computes exact per-row XY bounds without creating GeoJSON geometry objects.\n *\n * @param column GeoArrow geometry vector.\n * @param encoding GeoArrow encoding declared for the vector.\n * @returns One bound or `null` per geometry row.\n */\nexport function getGeoArrowRowBounds(\n column: arrow.Vector,\n encoding: GeoArrowEncoding\n): readonly (GeoArrowBounds | null)[];\n/** Computes one XY bound per binary polygon through math.gl, preserving empty rows as null. */\nexport function getGeoArrowRowBounds(\n column: BinaryPolygonGeometry,\n options: BinaryPolygonToGeoArrowOptions\n): readonly (GeoArrowBounds | null)[];\n/** Dispatches Arrow vectors and legacy binary polygons to their buffer-based bounds paths. */\nexport function getGeoArrowRowBounds(\n column: arrow.Vector | BinaryPolygonGeometry,\n encodingOrOptions: GeoArrowEncoding | BinaryPolygonToGeoArrowOptions\n): readonly (GeoArrowBounds | null)[] {\n if ('polygonIndices' in column) {\n if (typeof encodingOrOptions === 'string') {\n throw new Error('Binary polygon bounds require an explicit dimension option.');\n }\n return getMathGeoArrowRowBounds(makeGeoArrowColumnFromBinaryPolygon(column, encodingOrOptions));\n }\n if (typeof encodingOrOptions !== 'string') {\n throw new Error('Arrow vector bounds require a GeoArrow encoding.');\n }\n const encoding = encodingOrOptions;\n if (encoding !== 'geoarrow.wkb' && encoding !== 'geoarrow.wkt') {\n // Box structs have xmin/ymin fields rather than coordinate x/y fields, so their\n // dimensionality must be supplied explicitly to the shared adapter.\n const names = encoding === 'geoarrow.box' ? column.type.children.map(field => field.name) : [];\n const dimension =\n encoding === 'geoarrow.box'\n ? names.includes('zmin')\n ? names.includes('mmin')\n ? 'xyzm'\n : 'xyz'\n : names.includes('mmin')\n ? 'xym'\n : 'xy'\n : undefined;\n return getMathGeoArrowRowBounds(\n makeGeoArrowColumnFromArrowVector(column, {encoding, dimension})\n );\n }\n const bounds: (GeoArrowBounds | null)[] = [];\n for (let rowIndex = 0; rowIndex < column.length; rowIndex++) {\n bounds.push(getGeoArrowBounds(column.get(rowIndex), encoding));\n }\n return bounds;\n}\n\n/**\n * Computes exact XY bounds for one GeoArrow geometry cell.\n *\n * WKB uses the existing binary parser; native encodings walk Arrow vectors and coordinate\n * buffers directly. The function is deliberately tolerant of null and empty geometries.\n *\n * @param value GeoArrow cell value.\n * @param encoding GeoArrow encoding declared for the cell.\n * @returns Bounds or `null` when the cell has no finite XY coordinate.\n */\nexport function getGeoArrowBounds(\n value: unknown,\n encoding: GeoArrowEncoding\n): GeoArrowBounds | null {\n if (value == null) return null;\n if (encoding === 'geoarrow.wkb') {\n const bytes = value as Uint8Array;\n const statistics = scanWKB(bytes);\n return statistics.bounds\n ? [\n statistics.bounds.xmin,\n statistics.bounds.ymin,\n statistics.bounds.xmax,\n statistics.bounds.ymax\n ]\n : null;\n }\n if (encoding === 'geoarrow.box' && isBoxValue(value)) {\n return [value.xmin, value.ymin, value.xmax, value.ymax];\n }\n const accumulator: [number, number, number, number] = [\n Number.POSITIVE_INFINITY,\n Number.POSITIVE_INFINITY,\n Number.NEGATIVE_INFINITY,\n Number.NEGATIVE_INFINITY\n ];\n visitCoordinates(value, accumulator);\n return Number.isFinite(accumulator[0]) ? accumulator : null;\n}\n\nfunction visitCoordinates(value: unknown, bounds: [number, number, number, number]): void {\n if (value == null) return;\n const coordinate = getCoordinate(value);\n if (coordinate) {\n updateBounds(bounds, coordinate[0], coordinate[1]);\n return;\n }\n if (isVectorLike(value)) {\n for (let index = 0; index < value.length; index++) visitCoordinates(value.get(index), bounds);\n return;\n }\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n for (const child of Array.from(value as ArrayLike<unknown>)) visitCoordinates(child, bounds);\n }\n}\n\nfunction getCoordinate(value: unknown): [number, number] | null {\n if (value && typeof value === 'object' && 'x' in value && 'y' in value) {\n const record = value as {x: unknown; y: unknown};\n return typeof record.x === 'number' && typeof record.y === 'number'\n ? [record.x, record.y]\n : null;\n }\n if (value && typeof (value as {toArray?: unknown}).toArray === 'function') {\n const coordinate = (value as {toArray(): ArrayLike<unknown>}).toArray();\n return getNumericCoordinate(coordinate);\n }\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n return getNumericCoordinate(value as ArrayLike<unknown>);\n }\n return null;\n}\n\nfunction isBoxValue(\n value: unknown\n): value is {xmin: number; ymin: number; xmax: number; ymax: number} {\n return Boolean(\n value &&\n typeof value === 'object' &&\n typeof (value as {xmin?: unknown}).xmin === 'number' &&\n typeof (value as {ymin?: unknown}).ymin === 'number' &&\n typeof (value as {xmax?: unknown}).xmax === 'number' &&\n typeof (value as {ymax?: unknown}).ymax === 'number'\n );\n}\n\nfunction getNumericCoordinate(value: ArrayLike<unknown>): [number, number] | null {\n return typeof value[0] === 'number' && typeof value[1] === 'number' ? [value[0], value[1]] : null;\n}\n\nfunction isVectorLike(value: unknown): value is {length: number; get(index: number): unknown} {\n return Boolean(\n value &&\n typeof (value as {length?: unknown}).length === 'number' &&\n typeof (value as {get?: unknown}).get === 'function'\n );\n}\n\nfunction updateBounds(bounds: [number, number, number, number], x: number, y: number): void {\n if (!Number.isFinite(x) || !Number.isFinite(y)) return;\n bounds[0] = Math.min(bounds[0], x);\n bounds[1] = Math.min(bounds[1], y);\n bounds[2] = Math.max(bounds[2], x);\n bounds[3] = Math.max(bounds[3], y);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,mBAAsB;AACtB,IAAAA,gBAAgD;AAEhD,IAAAA,gBAA+D;AAC/D,wCAAkD;AAuB3C,SAAS,qBACd,QACA,mBACoC;AACpC,MAAI,oBAAoB,QAAQ;AAC9B,QAAI,OAAO,sBAAsB,UAAU;AACzC,YAAM,IAAI,MAAM,6DAA6D;AAAA,IAC/E;AACA,eAAO,cAAAC,0BAAyB,uEAAoC,QAAQ,iBAAiB,CAAC;AAAA,EAChG;AACA,MAAI,OAAO,sBAAsB,UAAU;AACzC,UAAM,IAAI,MAAM,kDAAkD;AAAA,EACpE;AACA,QAAM,WAAW;AACjB,MAAI,aAAa,kBAAkB,aAAa,gBAAgB;AAG9D,UAAM,QAAQ,aAAa,iBAAiB,OAAO,KAAK,SAAS,IAAI,WAAS,MAAM,IAAI,IAAI,CAAC;AAC7F,UAAM,YACJ,aAAa,iBACT,MAAM,SAAS,MAAM,IACnB,MAAM,SAAS,MAAM,IACnB,SACA,QACF,MAAM,SAAS,MAAM,IACnB,QACA,OACJ;AACN,eAAO,cAAAA;AAAA,UACL,iDAAkC,QAAQ,EAAC,UAAU,UAAS,CAAC;AAAA,IACjE;AAAA,EACF;AACA,QAAM,SAAoC,CAAC;AAC3C,WAAS,WAAW,GAAG,WAAW,OAAO,QAAQ,YAAY;AAC3D,WAAO,KAAK,kBAAkB,OAAO,IAAI,QAAQ,GAAG,QAAQ,CAAC;AAAA,EAC/D;AACA,SAAO;AACT;AAYO,SAAS,kBACd,OACA,UACuB;AACvB,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,aAAa,gBAAgB;AAC/B,UAAM,QAAQ;AACd,UAAM,iBAAa,sBAAQ,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,EACxC;AACA,MAAI,MAAM,QAAQ,KAAK,KAAK,YAAY,OAAO,KAAK,GAAG;AACrD,WAAO,qBAAqB,KAA2B;AAAA,EACzD;AACA,SAAO;AACT;AAEA,SAAS,WACP,OACmE;AACnE,SAAO;AAAA,IACL,SACE,OAAO,UAAU,YACjB,OAAQ,MAA2B,SAAS,YAC5C,OAAQ,MAA2B,SAAS,YAC5C,OAAQ,MAA2B,SAAS,YAC5C,OAAQ,MAA2B,SAAS;AAAA,EAChD;AACF;AAEA,SAAS,qBAAqB,OAAoD;AAChF,SAAO,OAAO,MAAM,CAAC,MAAM,YAAY,OAAO,MAAM,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI;AAC/F;AAEA,SAAS,aAAa,OAAwE;AAC5F,SAAO;AAAA,IACL,SACE,OAAQ,MAA6B,WAAW,YAChD,OAAQ,MAA0B,QAAQ;AAAA,EAC9C;AACF;AAEA,SAAS,aAAa,QAA0C,GAAW,GAAiB;AAC1F,MAAI,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,EAAG;AAChD,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;AACjC,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;AACjC,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;AACjC,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;AACnC;",
|
|
6
|
+
"names": ["import_arrow", "getMathGeoArrowRowBounds"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
-
import { scanWKB } from '@math.gl/arrow
|
|
5
|
-
import { makeGeoArrowColumnFromArrowVector } from '@math.gl/arrow
|
|
6
|
-
import { getGeoArrowRowBounds as getMathGeoArrowRowBounds } from '@math.gl/arrow
|
|
4
|
+
import { scanWKB } from '@math.gl/core/arrow';
|
|
5
|
+
import { makeGeoArrowColumnFromArrowVector } from '@math.gl/core/arrow';
|
|
6
|
+
import { getGeoArrowRowBounds as getMathGeoArrowRowBounds } from '@math.gl/core/arrow';
|
|
7
7
|
import { makeGeoArrowColumnFromBinaryPolygon } from "./binary-polygon-to-geoarrow.js";
|
|
8
8
|
/** Dispatches Arrow vectors and legacy binary polygons to their buffer-based bounds paths. */
|
|
9
9
|
export function getGeoArrowRowBounds(column, encodingOrOptions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geoarrow-bounds.js","sourceRoot":"","sources":["../../src/geoarrow/geoarrow-bounds.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"geoarrow-bounds.js","sourceRoot":"","sources":["../../src/geoarrow/geoarrow-bounds.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,iCAAiC,EAAC,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EAAC,oBAAoB,IAAI,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAC,mCAAmC,EAAC,wCAAqC;AAsBjF,8FAA8F;AAC9F,MAAM,UAAU,oBAAoB,CAClC,MAA4C,EAC5C,iBAAoE;IAEpE,IAAI,gBAAgB,IAAI,MAAM,EAAE,CAAC;QAC/B,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,wBAAwB,CAAC,mCAAmC,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CA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,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -39,7 +39,7 @@ module.exports = __toCommonJS(geoarrow_capabilities_exports);
|
|
|
39
39
|
var arrow = __toESM(require("apache-arrow"), 1);
|
|
40
40
|
var import_geoarrow_metadata = require("./metadata/geoarrow-metadata.cjs");
|
|
41
41
|
var import_get_geoarrow_geometry_info = require("./get-geoarrow-geometry-info.cjs");
|
|
42
|
-
var
|
|
42
|
+
var import_arrow = require("@math.gl/core/arrow");
|
|
43
43
|
var import_geometry_codecs = require("@loaders.gl/core/arrow-geometry/geometry-codecs");
|
|
44
44
|
var import_geoarrow_layout = require("./geoarrow-layout.cjs");
|
|
45
45
|
function getGeoArrowFieldInfo(field) {
|
|
@@ -315,7 +315,7 @@ function validateSerializedVector(column, encoding, issues) {
|
|
|
315
315
|
if (!(value instanceof Uint8Array)) {
|
|
316
316
|
throw new Error("value is not a Uint8Array");
|
|
317
317
|
}
|
|
318
|
-
(0,
|
|
318
|
+
(0, import_arrow.scanWKB)(value);
|
|
319
319
|
} else if (typeof value !== "string" || !(0, import_geometry_codecs.convertWKTToGeometry)(value)) {
|
|
320
320
|
throw new Error("value is not valid WKT");
|
|
321
321
|
}
|