@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
package/dist/cluster-source.cjs
CHANGED
|
@@ -39,15 +39,45 @@ var import_log = require("probe.gl/log");
|
|
|
39
39
|
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
40
40
|
var version = VERSION[0] >= "0" && VERSION[0] <= "9" ? `v${VERSION}` : "";
|
|
41
41
|
function createLog() {
|
|
42
|
-
const
|
|
42
|
+
const log3 = new import_log.Log({ id: "loaders.gl" });
|
|
43
43
|
globalThis.loaders ||= {};
|
|
44
|
-
globalThis.loaders.log =
|
|
44
|
+
globalThis.loaders.log = log3;
|
|
45
45
|
globalThis.loaders.version = version;
|
|
46
46
|
globalThis.probe ||= {};
|
|
47
|
-
globalThis.probe.loaders =
|
|
48
|
-
return
|
|
47
|
+
globalThis.probe.loaders = log3;
|
|
48
|
+
return log3;
|
|
49
49
|
}
|
|
50
50
|
var log = createLog();
|
|
51
|
+
var NullLog = class {
|
|
52
|
+
/** Discards debug messages. */
|
|
53
|
+
log() {
|
|
54
|
+
return ignoreMessage;
|
|
55
|
+
}
|
|
56
|
+
/** Discards informational messages. */
|
|
57
|
+
info() {
|
|
58
|
+
return ignoreMessage;
|
|
59
|
+
}
|
|
60
|
+
/** Discards messages marked to be emitted once. */
|
|
61
|
+
once() {
|
|
62
|
+
return ignoreMessage;
|
|
63
|
+
}
|
|
64
|
+
/** Discards warnings. */
|
|
65
|
+
warn() {
|
|
66
|
+
return ignoreMessage;
|
|
67
|
+
}
|
|
68
|
+
/** Discards errors. */
|
|
69
|
+
error() {
|
|
70
|
+
return ignoreMessage;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function ignoreMessage() {
|
|
74
|
+
}
|
|
75
|
+
var nullLog = new NullLog();
|
|
76
|
+
function getLoaderLog(options) {
|
|
77
|
+
var _a;
|
|
78
|
+
const logger = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.log;
|
|
79
|
+
return logger === null ? nullLog : logger || log;
|
|
80
|
+
}
|
|
51
81
|
|
|
52
82
|
// src/loader-utils/lib/javascript-utils/is-type.ts
|
|
53
83
|
var isObject = (value) => value !== null && typeof value === "object";
|
|
@@ -205,7 +235,7 @@ function createAuthenticatedFetch(options) {
|
|
|
205
235
|
}
|
|
206
236
|
function getAuthenticatedFetch(options = {}) {
|
|
207
237
|
var _a, _b, _c;
|
|
208
|
-
const fetchOption =
|
|
238
|
+
const fetchOption = (_a = options.core) == null ? void 0 : _a.fetch;
|
|
209
239
|
let fetchFunction;
|
|
210
240
|
if (typeof fetchOption === "function") {
|
|
211
241
|
fetchFunction = fetchOption;
|
|
@@ -441,7 +471,7 @@ var DataSource = class _DataSource {
|
|
|
441
471
|
if (callback) {
|
|
442
472
|
callback(normalizedError, this);
|
|
443
473
|
} else {
|
|
444
|
-
|
|
474
|
+
getLoaderLog(this.options).warn(`${this.constructor.name}: ${normalizedError.message}`)();
|
|
445
475
|
}
|
|
446
476
|
return normalizedError;
|
|
447
477
|
}
|
|
@@ -467,16 +497,6 @@ function getSourceLoaderOptions(options) {
|
|
|
467
497
|
delete loadOptions.core;
|
|
468
498
|
}
|
|
469
499
|
}
|
|
470
|
-
const topLevelBaseUri = typeof loadOptions.baseUri === "string" ? loadOptions.baseUri : void 0;
|
|
471
|
-
const topLevelBaseUrl = typeof loadOptions.baseUrl === "string" ? loadOptions.baseUrl : void 0;
|
|
472
|
-
if (topLevelBaseUri !== void 0 || topLevelBaseUrl !== void 0) {
|
|
473
|
-
loadOptions.core ||= {};
|
|
474
|
-
if (loadOptions.core.baseUrl === void 0) {
|
|
475
|
-
loadOptions.core.baseUrl = topLevelBaseUrl ?? topLevelBaseUri;
|
|
476
|
-
}
|
|
477
|
-
delete loadOptions.baseUri;
|
|
478
|
-
delete loadOptions.baseUrl;
|
|
479
|
-
}
|
|
480
500
|
return loadOptions;
|
|
481
501
|
}
|
|
482
502
|
function normalizeError(error, message) {
|
|
@@ -491,7 +511,7 @@ function normalizeError(error, message) {
|
|
|
491
511
|
function unavailableCoreApiMethod(methodName) {
|
|
492
512
|
return () => {
|
|
493
513
|
throw new Error(
|
|
494
|
-
`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.
|
|
514
|
+
`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.createDataSourceSync().`
|
|
495
515
|
);
|
|
496
516
|
};
|
|
497
517
|
}
|
|
@@ -535,7 +555,7 @@ function removeFileExtension(name) {
|
|
|
535
555
|
}
|
|
536
556
|
|
|
537
557
|
// src/arrow-geometry/geometry-codecs.ts
|
|
538
|
-
var
|
|
558
|
+
var import_arrow2 = require("@math.gl/core/arrow");
|
|
539
559
|
|
|
540
560
|
// src/arrow-geometry/geometry-utils.ts
|
|
541
561
|
function normalizeEmptyPoints(geometry) {
|
|
@@ -556,14 +576,14 @@ function normalizeEmptyPoints(geometry) {
|
|
|
556
576
|
}
|
|
557
577
|
|
|
558
578
|
// src/arrow-geometry/geometry-to-wkt.ts
|
|
559
|
-
var
|
|
579
|
+
var import_arrow = require("@math.gl/core/arrow");
|
|
560
580
|
function convertGeometryToWKT(geometry, options) {
|
|
561
581
|
const dimension = getWKTDimension(geometry, options);
|
|
562
582
|
if (geometry.type === "GeometryCollection" && !(options == null ? void 0 : options.dimension) && !(options == null ? void 0 : options.hasZ) && !(options == null ? void 0 : options.hasM) && (hasMixedChildDimensions(geometry) || hasDeclaredChildDimensions(geometry))) {
|
|
563
583
|
if (geometry.geometries.length === 0) return "GEOMETRYCOLLECTION EMPTY";
|
|
564
584
|
return `GEOMETRYCOLLECTION (${geometry.geometries.map((child) => convertGeometryToWKT(child)).join(", ")})`;
|
|
565
585
|
}
|
|
566
|
-
return (0,
|
|
586
|
+
return (0, import_arrow.formatWKT)(normalizeGeometryDimension(geometry, dimension), dimension);
|
|
567
587
|
}
|
|
568
588
|
function normalizeGeometryDimension(geometry, dimension) {
|
|
569
589
|
if (geometry.type === "GeometryCollection") {
|
|
@@ -626,7 +646,7 @@ function getDimensionSize(dimension) {
|
|
|
626
646
|
// src/arrow-geometry/geometry-codecs.ts
|
|
627
647
|
function convertWKBToGeometry(input) {
|
|
628
648
|
const bytes = ArrayBuffer.isView(input) ? new Uint8Array(input.buffer, input.byteOffset, input.byteLength) : new Uint8Array(input);
|
|
629
|
-
return normalizeEmptyPoints((0,
|
|
649
|
+
return normalizeEmptyPoints((0, import_arrow2.parseWKB)(bytes).geometry);
|
|
630
650
|
}
|
|
631
651
|
function convertGeometryToWKB(input, options = {}) {
|
|
632
652
|
const geometry = input.type === "Feature" ? input.geometry : input;
|
|
@@ -637,7 +657,7 @@ function convertGeometryToWKB(input, options = {}) {
|
|
|
637
657
|
}
|
|
638
658
|
function encodeGeometry(geometry, dimension) {
|
|
639
659
|
if (geometry.type !== "GeometryCollection") {
|
|
640
|
-
return (0,
|
|
660
|
+
return (0, import_arrow2.writeWKB)(geometry, dimension);
|
|
641
661
|
}
|
|
642
662
|
const children = geometry.geometries.map(
|
|
643
663
|
(child) => encodeGeometry(
|
|
@@ -645,13 +665,13 @@ function encodeGeometry(geometry, dimension) {
|
|
|
645
665
|
child.__geoarrowDimension ?? dimension
|
|
646
666
|
)
|
|
647
667
|
);
|
|
648
|
-
const headerBuilder = new
|
|
668
|
+
const headerBuilder = new import_arrow2.WKBBuilder({ mode: "measure", dimension });
|
|
649
669
|
headerBuilder.beginGeometry("GeometryCollection", children.length);
|
|
650
670
|
const headerLength = headerBuilder.finishGeometry();
|
|
651
671
|
const bytes = new Uint8Array(
|
|
652
672
|
headerLength + children.reduce((total, child) => total + child.length, 0)
|
|
653
673
|
);
|
|
654
|
-
const writer = new
|
|
674
|
+
const writer = new import_arrow2.WKBBuilder({ mode: "write", target: bytes, dimension });
|
|
655
675
|
writer.beginGeometry("GeometryCollection", children.length);
|
|
656
676
|
let byteOffset = writer.finishGeometry();
|
|
657
677
|
for (const child of children) {
|
|
@@ -677,7 +697,7 @@ function convertWKTToGeometry(input, options) {
|
|
|
677
697
|
}
|
|
678
698
|
const collectionHeader = text.match(/^(\s*GEOMETRYCOLLECTION)\s+(?:ZM|Z|M)(?=\s|\()/i);
|
|
679
699
|
const parseText = collectionHeader && dimension !== "xym" ? text.replace(collectionHeader[0], collectionHeader[1]) : text;
|
|
680
|
-
const parsed = (0,
|
|
700
|
+
const parsed = (0, import_arrow2.parseWKTWithMetadata)(parseText, { inferDimensions: true });
|
|
681
701
|
const geometry = toGeometryWithDimensionMetadata(
|
|
682
702
|
parsed,
|
|
683
703
|
collectionHeader ? dimension : void 0
|
|
@@ -1190,7 +1210,9 @@ function triangulatePolygon(polygons, areas, indices, {
|
|
|
1190
1210
|
const polygonPositions = polygons.positions.subarray(start, end);
|
|
1191
1211
|
const offset = indices[0];
|
|
1192
1212
|
const holes = indices.slice(1).map((n) => (n - offset) / coordLength);
|
|
1193
|
-
const triangles = (0, import_geometry2.earcut)(polygonPositions, holes, coordLength, areas
|
|
1213
|
+
const triangles = (0, import_geometry2.earcut)(polygonPositions, holes, coordLength, areas, "xy", {
|
|
1214
|
+
triangulation: "balanced"
|
|
1215
|
+
});
|
|
1194
1216
|
for (let t = 0, tl = triangles.length; t < tl; ++t) {
|
|
1195
1217
|
polygons.triangles.push(startPosition + triangles[t]);
|
|
1196
1218
|
}
|
|
@@ -1519,13 +1541,13 @@ function deserializeArrowType(dataType, options) {
|
|
|
1519
1541
|
}
|
|
1520
1542
|
case "large-list": {
|
|
1521
1543
|
const field = deserializeArrowField(dataType.children[0], options);
|
|
1522
|
-
const
|
|
1523
|
-
if (!
|
|
1544
|
+
const LargeList8 = getOptionalArrowConstructor("LargeList");
|
|
1545
|
+
if (!LargeList8) {
|
|
1524
1546
|
throw new Error(
|
|
1525
1547
|
"LargeList requires an Apache Arrow runtime that exports the LargeList constructor"
|
|
1526
1548
|
);
|
|
1527
1549
|
}
|
|
1528
|
-
return new
|
|
1550
|
+
return new LargeList8(field);
|
|
1529
1551
|
}
|
|
1530
1552
|
case "fixed-size-list": {
|
|
1531
1553
|
const child = deserializeArrowField(dataType.children[0], options);
|
|
@@ -1709,8 +1731,14 @@ function deserializeArrowDictionaryKeyType(keyType) {
|
|
|
1709
1731
|
}
|
|
1710
1732
|
}
|
|
1711
1733
|
|
|
1712
|
-
// src/schema-utils/lib/
|
|
1734
|
+
// src/schema-utils/lib/arrow/arrow-metadata.ts
|
|
1713
1735
|
var arrow2 = __toESM(require("apache-arrow"), 1);
|
|
1736
|
+
function snapshotArrowSchema(schema) {
|
|
1737
|
+
return deserializeArrowSchema(serializeArrowSchema(schema));
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
// src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts
|
|
1741
|
+
var arrow3 = __toESM(require("apache-arrow"), 1);
|
|
1714
1742
|
var ArrowTableBuilder = class {
|
|
1715
1743
|
schema;
|
|
1716
1744
|
arrowSchema;
|
|
@@ -1720,7 +1748,7 @@ var ArrowTableBuilder = class {
|
|
|
1720
1748
|
this.arrowSchema = convertSchemaToArrow(schema, options);
|
|
1721
1749
|
this.schema = (options == null ? void 0 : options.viewTypes) && options.viewTypes !== "never" ? convertArrowToSchema(this.arrowSchema) : schema;
|
|
1722
1750
|
this.arrowBuilders = this.arrowSchema.fields.map(
|
|
1723
|
-
(field) =>
|
|
1751
|
+
(field) => arrow3.makeBuilder({ type: field.type, nullValues: [null, void 0] })
|
|
1724
1752
|
);
|
|
1725
1753
|
this.length = 0;
|
|
1726
1754
|
}
|
|
@@ -1738,58 +1766,25 @@ var ArrowTableBuilder = class {
|
|
|
1738
1766
|
}
|
|
1739
1767
|
this.length++;
|
|
1740
1768
|
}
|
|
1741
|
-
/**
|
|
1769
|
+
/** Emits the declared schema before any rows are buffered. */
|
|
1742
1770
|
firstBatch() {
|
|
1743
|
-
|
|
1744
|
-
if (arrowRecordBatch.numCols !== 0) {
|
|
1745
|
-
return null;
|
|
1746
|
-
}
|
|
1747
|
-
return {
|
|
1748
|
-
shape: "arrow-table",
|
|
1749
|
-
batchType: "data",
|
|
1750
|
-
length: arrowRecordBatch.numRows,
|
|
1751
|
-
schema: this.schema,
|
|
1752
|
-
data: new arrow2.Table(arrowRecordBatch)
|
|
1753
|
-
};
|
|
1771
|
+
return this.length === 0 ? this._getArrowRecordBatch() : null;
|
|
1754
1772
|
}
|
|
1755
|
-
/**
|
|
1773
|
+
/** Flushes the buffered rows as a native record batch. */
|
|
1756
1774
|
flushBatch() {
|
|
1757
|
-
|
|
1758
|
-
if (arrowRecordBatch.numCols === 0) {
|
|
1759
|
-
return null;
|
|
1760
|
-
}
|
|
1761
|
-
return {
|
|
1762
|
-
shape: "arrow-table",
|
|
1763
|
-
batchType: "data",
|
|
1764
|
-
length: arrowRecordBatch.numRows,
|
|
1765
|
-
schema: this.schema,
|
|
1766
|
-
data: new arrow2.Table(arrowRecordBatch)
|
|
1767
|
-
};
|
|
1775
|
+
return this.length === 0 ? null : this._getArrowRecordBatch();
|
|
1768
1776
|
}
|
|
1769
|
-
/**
|
|
1777
|
+
/** Finishes the builders and returns the final native batch when it has rows or fields. */
|
|
1770
1778
|
finishBatch() {
|
|
1771
|
-
const
|
|
1779
|
+
const batch = this._getArrowRecordBatch();
|
|
1772
1780
|
this.arrowBuilders.forEach((builder) => builder.finish());
|
|
1773
|
-
|
|
1774
|
-
return null;
|
|
1775
|
-
}
|
|
1776
|
-
return {
|
|
1777
|
-
shape: "arrow-table",
|
|
1778
|
-
batchType: "data",
|
|
1779
|
-
length: arrowRecordBatch.numRows,
|
|
1780
|
-
schema: this.schema,
|
|
1781
|
-
data: new arrow2.Table(arrowRecordBatch)
|
|
1782
|
-
};
|
|
1781
|
+
return batch.numCols || batch.numRows ? batch : null;
|
|
1783
1782
|
}
|
|
1784
|
-
/**
|
|
1783
|
+
/** Finishes the builders and returns a native Arrow table. */
|
|
1785
1784
|
finishTable() {
|
|
1786
|
-
const
|
|
1785
|
+
const batch = this._getArrowRecordBatch();
|
|
1787
1786
|
this.arrowBuilders.forEach((builder) => builder.finish());
|
|
1788
|
-
return
|
|
1789
|
-
shape: "arrow-table",
|
|
1790
|
-
schema: this.schema,
|
|
1791
|
-
data: new arrow2.Table(arrowRecordBatch)
|
|
1792
|
-
};
|
|
1787
|
+
return new arrow3.Table(batch);
|
|
1793
1788
|
}
|
|
1794
1789
|
/** Extract a record batch flushing the currently accumulated data in the builders */
|
|
1795
1790
|
_getArrowRecordBatch() {
|
|
@@ -1798,13 +1793,56 @@ var ArrowTableBuilder = class {
|
|
|
1798
1793
|
const arrowDatas = arrowBuilders.map((builder) => builder.flush());
|
|
1799
1794
|
const length = ((_a = arrowDatas[0]) == null ? void 0 : _a.length) || this.length;
|
|
1800
1795
|
this.length = 0;
|
|
1801
|
-
const structField = new
|
|
1802
|
-
const arrowStructData = new
|
|
1803
|
-
const arrowRecordBatch = new
|
|
1796
|
+
const structField = new arrow3.Struct(arrowSchema.fields);
|
|
1797
|
+
const arrowStructData = new arrow3.Data(structField, 0, length, 0, void 0, arrowDatas);
|
|
1798
|
+
const arrowRecordBatch = new arrow3.RecordBatch(
|
|
1799
|
+
snapshotArrowSchema(arrowSchema),
|
|
1800
|
+
arrowStructData
|
|
1801
|
+
);
|
|
1804
1802
|
return arrowRecordBatch;
|
|
1805
1803
|
}
|
|
1806
1804
|
};
|
|
1807
1805
|
|
|
1806
|
+
// dist/loader-utils/lib/log-utils/log.js
|
|
1807
|
+
var import_log3 = require("probe.gl/log");
|
|
1808
|
+
var VERSION2 = true ? "5.0.0-rc.1" : "latest";
|
|
1809
|
+
var version2 = VERSION2[0] >= "0" && VERSION2[0] <= "9" ? `v${VERSION2}` : "";
|
|
1810
|
+
function createLog2() {
|
|
1811
|
+
const log3 = new import_log3.Log({ id: "loaders.gl" });
|
|
1812
|
+
globalThis.loaders ||= {};
|
|
1813
|
+
globalThis.loaders.log = log3;
|
|
1814
|
+
globalThis.loaders.version = version2;
|
|
1815
|
+
globalThis.probe ||= {};
|
|
1816
|
+
globalThis.probe.loaders = log3;
|
|
1817
|
+
return log3;
|
|
1818
|
+
}
|
|
1819
|
+
var log2 = createLog2();
|
|
1820
|
+
var NullLog2 = class {
|
|
1821
|
+
/** Discards debug messages. */
|
|
1822
|
+
log() {
|
|
1823
|
+
return ignoreMessage2;
|
|
1824
|
+
}
|
|
1825
|
+
/** Discards informational messages. */
|
|
1826
|
+
info() {
|
|
1827
|
+
return ignoreMessage2;
|
|
1828
|
+
}
|
|
1829
|
+
/** Discards messages marked to be emitted once. */
|
|
1830
|
+
once() {
|
|
1831
|
+
return ignoreMessage2;
|
|
1832
|
+
}
|
|
1833
|
+
/** Discards warnings. */
|
|
1834
|
+
warn() {
|
|
1835
|
+
return ignoreMessage2;
|
|
1836
|
+
}
|
|
1837
|
+
/** Discards errors. */
|
|
1838
|
+
error() {
|
|
1839
|
+
return ignoreMessage2;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
function ignoreMessage2() {
|
|
1843
|
+
}
|
|
1844
|
+
var nullLog2 = new NullLog2();
|
|
1845
|
+
|
|
1808
1846
|
// src/schema/geospatial-metadata-zod-schema.ts
|
|
1809
1847
|
var import_zod = require("zod");
|
|
1810
1848
|
var GeoParquetGeometryTypeSchema = import_zod.z.enum([
|
|
@@ -1966,7 +2004,7 @@ function getGeometryMetadataForField(fieldMetadata) {
|
|
|
1966
2004
|
geoEncoding = "geoarrow.wkt";
|
|
1967
2005
|
}
|
|
1968
2006
|
if (!GEOARROW_ENCODINGS.includes(geoEncoding)) {
|
|
1969
|
-
|
|
2007
|
+
log2.warn(`Invalid GeoArrow encoding: ${geoEncoding}`)();
|
|
1970
2008
|
} else {
|
|
1971
2009
|
metadata ||= {};
|
|
1972
2010
|
metadata.encoding = geoEncoding;
|
|
@@ -1981,7 +2019,7 @@ function getGeometryMetadataForField(fieldMetadata) {
|
|
|
1981
2019
|
...parsedMetadata
|
|
1982
2020
|
};
|
|
1983
2021
|
} catch (error) {
|
|
1984
|
-
|
|
2022
|
+
log2.warn("Failed to parse GeoArrow metadata", error)();
|
|
1985
2023
|
}
|
|
1986
2024
|
}
|
|
1987
2025
|
return metadata || null;
|
|
@@ -2002,8 +2040,8 @@ function parseGeoArrowMetadata(value) {
|
|
|
2002
2040
|
}
|
|
2003
2041
|
|
|
2004
2042
|
// dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js
|
|
2005
|
-
var
|
|
2006
|
-
var
|
|
2043
|
+
var arrow13 = __toESM(require("apache-arrow"), 1);
|
|
2044
|
+
var import_arrow7 = require("@math.gl/core/arrow");
|
|
2007
2045
|
|
|
2008
2046
|
// dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.js
|
|
2009
2047
|
function convertGeoArrowGeometryToGeoJSON(arrowCellValue, encoding) {
|
|
@@ -2136,7 +2174,7 @@ function isEmptyArrowCoordinate(arrowCoordinate) {
|
|
|
2136
2174
|
var arrow5 = __toESM(require("apache-arrow"), 1);
|
|
2137
2175
|
|
|
2138
2176
|
// dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js
|
|
2139
|
-
var
|
|
2177
|
+
var import_arrow3 = require("@math.gl/core/arrow");
|
|
2140
2178
|
|
|
2141
2179
|
// dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.js
|
|
2142
2180
|
var WKBGeometryType;
|
|
@@ -2176,25 +2214,30 @@ function getWKTGeometryType(input) {
|
|
|
2176
2214
|
}
|
|
2177
2215
|
|
|
2178
2216
|
// dist/geoarrow/geoarrow-inspection.js
|
|
2179
|
-
var
|
|
2217
|
+
var import_arrow4 = require("@math.gl/core/arrow");
|
|
2180
2218
|
|
|
2181
2219
|
// dist/geoarrow/lib/kernels/geoarrow-union.js
|
|
2182
2220
|
var arrow4 = __toESM(require("apache-arrow"), 1);
|
|
2183
2221
|
|
|
2184
|
-
//
|
|
2185
|
-
var arrow3 = __toESM(require("apache-arrow"), 1);
|
|
2186
|
-
|
|
2187
|
-
// src/arrow-geometry/geoarrow-union-kind.ts
|
|
2222
|
+
// dist/arrow-geometry/geoarrow-union-kind.js
|
|
2188
2223
|
function getGeoArrowUnionGeometryKind(fieldName, typeId) {
|
|
2189
2224
|
const normalizedName = (fieldName || "").toLowerCase().replace(/[^a-z]/g, "");
|
|
2190
|
-
if (normalizedName.includes("geometrycollection"))
|
|
2191
|
-
|
|
2192
|
-
if (normalizedName.includes("
|
|
2193
|
-
|
|
2194
|
-
if (normalizedName.includes("
|
|
2195
|
-
|
|
2196
|
-
if (normalizedName.includes("
|
|
2197
|
-
|
|
2225
|
+
if (normalizedName.includes("geometrycollection"))
|
|
2226
|
+
return "GeometryCollection";
|
|
2227
|
+
if (normalizedName.includes("multipolygon"))
|
|
2228
|
+
return "MultiPolygon";
|
|
2229
|
+
if (normalizedName.includes("multilinestring"))
|
|
2230
|
+
return "MultiLineString";
|
|
2231
|
+
if (normalizedName.includes("multipoint"))
|
|
2232
|
+
return "MultiPoint";
|
|
2233
|
+
if (normalizedName.includes("polygon"))
|
|
2234
|
+
return "Polygon";
|
|
2235
|
+
if (normalizedName.includes("linestring"))
|
|
2236
|
+
return "LineString";
|
|
2237
|
+
if (normalizedName.includes("line"))
|
|
2238
|
+
return "LineString";
|
|
2239
|
+
if (normalizedName.includes("point"))
|
|
2240
|
+
return "Point";
|
|
2198
2241
|
switch (typeId % 10) {
|
|
2199
2242
|
case 1:
|
|
2200
2243
|
return "Point";
|
|
@@ -2320,7 +2363,7 @@ function inspectGeoArrowVector(column, encoding) {
|
|
|
2320
2363
|
if (encoding === "geoarrow.wkb") {
|
|
2321
2364
|
const bytes = value;
|
|
2322
2365
|
try {
|
|
2323
|
-
const header = (0,
|
|
2366
|
+
const header = (0, import_arrow4.inspectWKBHeader)(bytes);
|
|
2324
2367
|
dimensions.add(header.dimension);
|
|
2325
2368
|
geometryTypes.add(getGeometryTypeName(header.geometryType, header.dimension));
|
|
2326
2369
|
} catch {
|
|
@@ -2953,13 +2996,13 @@ function makeListData(child, offsets, fieldName, offsetType) {
|
|
|
2953
2996
|
});
|
|
2954
2997
|
}
|
|
2955
2998
|
function makeLargeListType(field) {
|
|
2956
|
-
const
|
|
2957
|
-
if (!
|
|
2999
|
+
const LargeList8 = getOptionalArrowConstructor2("LargeList");
|
|
3000
|
+
if (!LargeList8) {
|
|
2958
3001
|
throw new Error(
|
|
2959
3002
|
"64-bit GeoArrow offsets require an Apache Arrow runtime that exports LargeList"
|
|
2960
3003
|
);
|
|
2961
3004
|
}
|
|
2962
|
-
return new
|
|
3005
|
+
return new LargeList8(field);
|
|
2963
3006
|
}
|
|
2964
3007
|
function getOptionalArrowConstructor2(typeName) {
|
|
2965
3008
|
return arrow6[typeName];
|
|
@@ -3602,7 +3645,7 @@ function isCoordinate(value) {
|
|
|
3602
3645
|
|
|
3603
3646
|
// dist/geoarrow/lib/kernels/encode-geoarrow-box.js
|
|
3604
3647
|
var arrow8 = __toESM(require("apache-arrow"), 1);
|
|
3605
|
-
var
|
|
3648
|
+
var import_arrow5 = require("@math.gl/core/arrow");
|
|
3606
3649
|
function encodeGeoArrowBoxVector(column, sourceEncoding, dimension) {
|
|
3607
3650
|
const coordinateSize = dimension ? getDimensionSize2(dimension) : inferDimension2(column, sourceEncoding);
|
|
3608
3651
|
const effectiveDimension = dimension || getDimensionName(coordinateSize);
|
|
@@ -3639,7 +3682,7 @@ function getRowBounds(value, sourceEncoding, dimension) {
|
|
|
3639
3682
|
return null;
|
|
3640
3683
|
if (sourceEncoding === "geoarrow.wkb") {
|
|
3641
3684
|
const bytes = value;
|
|
3642
|
-
const statistics = (0,
|
|
3685
|
+
const statistics = (0, import_arrow5.scanWKB)(bytes);
|
|
3643
3686
|
return statistics.bounds ? boundsFromRecord(statistics.bounds, dimension) : null;
|
|
3644
3687
|
}
|
|
3645
3688
|
if (sourceEncoding === "geoarrow.wkt") {
|
|
@@ -3762,7 +3805,7 @@ function inferDimension2(column, sourceEncoding) {
|
|
|
3762
3805
|
if (value == null)
|
|
3763
3806
|
continue;
|
|
3764
3807
|
const bytes = value;
|
|
3765
|
-
const statistics = (0,
|
|
3808
|
+
const statistics = (0, import_arrow5.scanWKB)(bytes);
|
|
3766
3809
|
const hasZ = ((_a = statistics.bounds) == null ? void 0 : _a.zmin) !== void 0;
|
|
3767
3810
|
const hasM = ((_b = statistics.bounds) == null ? void 0 : _b.mmin) !== void 0;
|
|
3768
3811
|
coordinateSize = Math.max(coordinateSize, hasZ && hasM ? 4 : hasZ || hasM ? 3 : 2);
|
|
@@ -3820,283 +3863,12 @@ function getBoxFieldNames2(dimension) {
|
|
|
3820
3863
|
return [...minimumNames, ...maximumNames];
|
|
3821
3864
|
}
|
|
3822
3865
|
|
|
3823
|
-
// dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js
|
|
3824
|
-
var arrow9 = __toESM(require("apache-arrow"), 1);
|
|
3825
|
-
function encodeGeoArrowWKTVector(column, sourceEncoding, dimension) {
|
|
3826
|
-
if (!isNativeGeometryEncoding(sourceEncoding))
|
|
3827
|
-
return null;
|
|
3828
|
-
const values = [];
|
|
3829
|
-
for (let rowIndex = 0; rowIndex < column.length; rowIndex++) {
|
|
3830
|
-
const value = column.get(rowIndex);
|
|
3831
|
-
if (value == null) {
|
|
3832
|
-
values.push(null);
|
|
3833
|
-
continue;
|
|
3834
|
-
}
|
|
3835
|
-
const geometryKind = getRowGeometryKind(column, rowIndex, sourceEncoding);
|
|
3836
|
-
const rowDimension = dimension || (sourceEncoding === "geoarrow.geometrycollection" ? inferCollectionDimension(value) : inferDimensionFromTypeId(column, rowIndex, sourceEncoding));
|
|
3837
|
-
const wkt = encodeNativeValue(value, geometryKind, rowDimension, !dimension);
|
|
3838
|
-
if (wkt === null)
|
|
3839
|
-
return null;
|
|
3840
|
-
values.push(wkt);
|
|
3841
|
-
}
|
|
3842
|
-
return arrow9.vectorFromArray(values, new arrow9.Utf8());
|
|
3843
|
-
}
|
|
3844
|
-
function isNativeGeometryEncoding(encoding) {
|
|
3845
|
-
return encoding === "geoarrow.point" || encoding === "geoarrow.linestring" || encoding === "geoarrow.polygon" || encoding === "geoarrow.multipoint" || encoding === "geoarrow.multilinestring" || encoding === "geoarrow.multipolygon" || encoding === "geoarrow.geometry" || encoding === "geoarrow.geometrycollection";
|
|
3846
|
-
}
|
|
3847
|
-
function encodeNativeValue(value, geometryKind, dimension, preserveMemberDimensions = false) {
|
|
3848
|
-
switch (geometryKind) {
|
|
3849
|
-
case "Point":
|
|
3850
|
-
return encodePoint(value, dimension);
|
|
3851
|
-
case "LineString":
|
|
3852
|
-
return encodeLineString(value, dimension);
|
|
3853
|
-
case "Polygon":
|
|
3854
|
-
return encodePolygon(value, dimension);
|
|
3855
|
-
case "MultiPoint":
|
|
3856
|
-
return encodeMultiPoint(value, dimension);
|
|
3857
|
-
case "MultiLineString":
|
|
3858
|
-
return encodeMultiLineString(value, dimension);
|
|
3859
|
-
case "MultiPolygon":
|
|
3860
|
-
return encodeMultiPolygon(value, dimension);
|
|
3861
|
-
case "GeometryCollection":
|
|
3862
|
-
return encodeGeometryCollection(value, dimension, preserveMemberDimensions);
|
|
3863
|
-
default:
|
|
3864
|
-
return null;
|
|
3865
|
-
}
|
|
3866
|
-
}
|
|
3867
|
-
function encodePoint(value, dimension) {
|
|
3868
|
-
const coordinate = readCoordinate(value);
|
|
3869
|
-
return coordinate ? `POINT${getDimensionSuffix(dimension)} (${encodeCoordinate(coordinate)})` : "POINT EMPTY";
|
|
3870
|
-
}
|
|
3871
|
-
function encodeLineString(value, dimension) {
|
|
3872
|
-
const coordinates = readChildren(value);
|
|
3873
|
-
if (!coordinates)
|
|
3874
|
-
return null;
|
|
3875
|
-
const encodedCoordinates = encodeCoordinateSequence(coordinates);
|
|
3876
|
-
if (encodedCoordinates === null)
|
|
3877
|
-
return null;
|
|
3878
|
-
return coordinates.length === 0 ? `LINESTRING${getDimensionSuffix(dimension)} EMPTY` : `LINESTRING${getDimensionSuffix(dimension)} (${encodedCoordinates})`;
|
|
3879
|
-
}
|
|
3880
|
-
function encodePolygon(value, dimension) {
|
|
3881
|
-
const rings = readChildren(value);
|
|
3882
|
-
if (!rings)
|
|
3883
|
-
return null;
|
|
3884
|
-
if (rings.length === 0)
|
|
3885
|
-
return `POLYGON${getDimensionSuffix(dimension)} EMPTY`;
|
|
3886
|
-
const encodedRings = rings.map((ring) => encodeCoordinateSequenceValue(ring));
|
|
3887
|
-
if (encodedRings.some((encodedRing) => encodedRing === null))
|
|
3888
|
-
return null;
|
|
3889
|
-
return `POLYGON${getDimensionSuffix(dimension)} (${encodedRings.join(", ")})`;
|
|
3890
|
-
}
|
|
3891
|
-
function encodeMultiPoint(value, dimension) {
|
|
3892
|
-
const points = readChildren(value);
|
|
3893
|
-
if (!points)
|
|
3894
|
-
return null;
|
|
3895
|
-
if (points.length === 0)
|
|
3896
|
-
return `MULTIPOINT${getDimensionSuffix(dimension)} EMPTY`;
|
|
3897
|
-
const encodedPoints = points.map((point) => {
|
|
3898
|
-
const coordinate = readCoordinate(point);
|
|
3899
|
-
return coordinate ? `(${encodeCoordinate(coordinate)})` : null;
|
|
3900
|
-
});
|
|
3901
|
-
if (encodedPoints.some((encodedPoint) => encodedPoint === null))
|
|
3902
|
-
return null;
|
|
3903
|
-
return `MULTIPOINT${getDimensionSuffix(dimension)} (${encodedPoints.join(", ")})`;
|
|
3904
|
-
}
|
|
3905
|
-
function encodeMultiLineString(value, dimension) {
|
|
3906
|
-
const lines = readChildren(value);
|
|
3907
|
-
if (!lines)
|
|
3908
|
-
return null;
|
|
3909
|
-
if (lines.length === 0)
|
|
3910
|
-
return `MULTILINESTRING${getDimensionSuffix(dimension)} EMPTY`;
|
|
3911
|
-
const encodedLines = lines.map((line) => encodeCoordinateSequenceValue(line));
|
|
3912
|
-
if (encodedLines.some((encodedLine) => encodedLine === null))
|
|
3913
|
-
return null;
|
|
3914
|
-
return `MULTILINESTRING${getDimensionSuffix(dimension)} (${encodedLines.join(", ")})`;
|
|
3915
|
-
}
|
|
3916
|
-
function encodeMultiPolygon(value, dimension) {
|
|
3917
|
-
const polygons = readChildren(value);
|
|
3918
|
-
if (!polygons)
|
|
3919
|
-
return null;
|
|
3920
|
-
if (polygons.length === 0)
|
|
3921
|
-
return `MULTIPOLYGON${getDimensionSuffix(dimension)} EMPTY`;
|
|
3922
|
-
const encodedPolygons = polygons.map((polygon) => {
|
|
3923
|
-
const rings = readChildren(polygon);
|
|
3924
|
-
if (!rings)
|
|
3925
|
-
return null;
|
|
3926
|
-
const encodedRings = rings.map((ring) => encodeCoordinateSequenceValue(ring));
|
|
3927
|
-
return encodedRings.some((encodedRing) => encodedRing === null) ? null : `(${encodedRings.join(", ")})`;
|
|
3928
|
-
});
|
|
3929
|
-
if (encodedPolygons.some((encodedPolygon) => encodedPolygon === null))
|
|
3930
|
-
return null;
|
|
3931
|
-
return `MULTIPOLYGON${getDimensionSuffix(dimension)} (${encodedPolygons.join(", ")})`;
|
|
3932
|
-
}
|
|
3933
|
-
function encodeGeometryCollection(value, dimension, preserveMemberDimensions) {
|
|
3934
|
-
if (!isVectorLike3(value))
|
|
3935
|
-
return null;
|
|
3936
|
-
const geometries = [];
|
|
3937
|
-
for (let rowIndex = 0; rowIndex < value.length; rowIndex++) {
|
|
3938
|
-
const unionVector = value;
|
|
3939
|
-
const typeId = getUnionTypeId2(unionVector, rowIndex);
|
|
3940
|
-
const childField = getUnionField(unionVector, rowIndex);
|
|
3941
|
-
const geometryKind = getGeoArrowUnionGeometryKind(childField == null ? void 0 : childField.name, typeId);
|
|
3942
|
-
const childDimension = getGeoArrowUnionDimension(childField == null ? void 0 : childField.name, childField == null ? void 0 : childField.type, typeId);
|
|
3943
|
-
if (!geometryKind || !childDimension)
|
|
3944
|
-
return null;
|
|
3945
|
-
const geometry = encodeNativeValue(unionVector.get(rowIndex), geometryKind, preserveMemberDimensions ? childDimension : dimension, preserveMemberDimensions);
|
|
3946
|
-
if (geometry === null)
|
|
3947
|
-
return null;
|
|
3948
|
-
geometries.push(geometry);
|
|
3949
|
-
}
|
|
3950
|
-
return geometries.length === 0 ? "GEOMETRYCOLLECTION EMPTY" : `GEOMETRYCOLLECTION (${geometries.join(", ")})`;
|
|
3951
|
-
}
|
|
3952
|
-
function encodeCoordinateSequenceValue(value) {
|
|
3953
|
-
const coordinates = readChildren(value);
|
|
3954
|
-
if (!coordinates)
|
|
3955
|
-
return null;
|
|
3956
|
-
const encodedCoordinates = encodeCoordinateSequence(coordinates);
|
|
3957
|
-
return encodedCoordinates === null ? null : `(${encodedCoordinates})`;
|
|
3958
|
-
}
|
|
3959
|
-
function encodeCoordinateSequence(values) {
|
|
3960
|
-
const coordinates = values.map((value) => {
|
|
3961
|
-
const coordinate = readCoordinate(value);
|
|
3962
|
-
return coordinate ? encodeCoordinate(coordinate) : null;
|
|
3963
|
-
});
|
|
3964
|
-
return coordinates.every((coordinate) => coordinate !== null) ? coordinates.join(", ") : null;
|
|
3965
|
-
}
|
|
3966
|
-
function encodeCoordinate(coordinate) {
|
|
3967
|
-
return coordinate.map((value) => String(value)).join(" ");
|
|
3968
|
-
}
|
|
3969
|
-
function readCoordinate(value) {
|
|
3970
|
-
if (value && typeof value === "object" && "x" in value && "y" in value) {
|
|
3971
|
-
const record = value;
|
|
3972
|
-
const coordinate = [Number(record.x), Number(record.y)];
|
|
3973
|
-
if (typeof record.z === "number")
|
|
3974
|
-
coordinate.push(record.z);
|
|
3975
|
-
if (typeof record.m === "number")
|
|
3976
|
-
coordinate.push(record.m);
|
|
3977
|
-
return coordinate.every(Number.isFinite) ? coordinate : null;
|
|
3978
|
-
}
|
|
3979
|
-
if (value && typeof value.toArray === "function") {
|
|
3980
|
-
return readCoordinate(value.toArray());
|
|
3981
|
-
}
|
|
3982
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
3983
|
-
const coordinate = Array.from(value, Number);
|
|
3984
|
-
return coordinate.length >= 2 && coordinate.every(Number.isFinite) ? coordinate : null;
|
|
3985
|
-
}
|
|
3986
|
-
return null;
|
|
3987
|
-
}
|
|
3988
|
-
function readChildren(value) {
|
|
3989
|
-
if (isVectorLike3(value)) {
|
|
3990
|
-
const children = [];
|
|
3991
|
-
for (let index = 0; index < value.length; index++)
|
|
3992
|
-
children.push(value.get(index));
|
|
3993
|
-
return children;
|
|
3994
|
-
}
|
|
3995
|
-
if (Array.isArray(value) || ArrayBuffer.isView(value)) {
|
|
3996
|
-
return Array.from(value);
|
|
3997
|
-
}
|
|
3998
|
-
return null;
|
|
3999
|
-
}
|
|
4000
|
-
function getUnionTypeId2(vector, rowIndex) {
|
|
4001
|
-
let remainingRowIndex = rowIndex;
|
|
4002
|
-
for (const data of vector.data) {
|
|
4003
|
-
if (remainingRowIndex >= data.length) {
|
|
4004
|
-
remainingRowIndex -= data.length;
|
|
4005
|
-
continue;
|
|
4006
|
-
}
|
|
4007
|
-
const typeIdIndex = data.typeIds.length <= data.length ? remainingRowIndex : data.offset + remainingRowIndex;
|
|
4008
|
-
return data.typeIds[typeIdIndex];
|
|
4009
|
-
}
|
|
4010
|
-
throw new Error(`Dense union row ${rowIndex} is out of bounds.`);
|
|
4011
|
-
}
|
|
4012
|
-
function getUnionField(vector, rowIndex) {
|
|
4013
|
-
const unionType = vector.type;
|
|
4014
|
-
if (!(unionType instanceof arrow9.DenseUnion))
|
|
4015
|
-
return void 0;
|
|
4016
|
-
const typeId = getUnionTypeId2(vector, rowIndex);
|
|
4017
|
-
const childIndex = unionType.typeIds.indexOf(typeId);
|
|
4018
|
-
return childIndex >= 0 ? unionType.children[childIndex] : void 0;
|
|
4019
|
-
}
|
|
4020
|
-
function inferDimensionFromTypeId(column, rowIndex, sourceEncoding) {
|
|
4021
|
-
if (sourceEncoding === "geoarrow.geometry") {
|
|
4022
|
-
const typeId = getUnionTypeId2(column, rowIndex);
|
|
4023
|
-
const field = getUnionField(column, rowIndex);
|
|
4024
|
-
return getGeoArrowUnionDimension(field == null ? void 0 : field.name, field == null ? void 0 : field.type, typeId) || "xy";
|
|
4025
|
-
}
|
|
4026
|
-
let type = column.type;
|
|
4027
|
-
while (type instanceof arrow9.List || type instanceof arrow9.LargeList) {
|
|
4028
|
-
type = type.children[0].type;
|
|
4029
|
-
}
|
|
4030
|
-
if (type instanceof arrow9.Struct) {
|
|
4031
|
-
const names = new Set(type.children.map((field) => field.name));
|
|
4032
|
-
if (names.has("z") && names.has("m"))
|
|
4033
|
-
return "xyzm";
|
|
4034
|
-
if (names.has("m"))
|
|
4035
|
-
return "xym";
|
|
4036
|
-
if (names.has("z"))
|
|
4037
|
-
return "xyz";
|
|
4038
|
-
}
|
|
4039
|
-
if (type instanceof arrow9.FixedSizeList) {
|
|
4040
|
-
return type.listSize === 4 ? "xyzm" : type.listSize === 3 ? "xyz" : "xy";
|
|
4041
|
-
}
|
|
4042
|
-
return "xy";
|
|
4043
|
-
}
|
|
4044
|
-
function getRowGeometryKind(column, rowIndex, sourceEncoding) {
|
|
4045
|
-
if (sourceEncoding === "geoarrow.geometry") {
|
|
4046
|
-
const typeId = getUnionTypeId2(column, rowIndex);
|
|
4047
|
-
const field = getUnionField(column, rowIndex);
|
|
4048
|
-
return getGeoArrowUnionGeometryKind(field == null ? void 0 : field.name, typeId) || "GeometryCollection";
|
|
4049
|
-
}
|
|
4050
|
-
if (sourceEncoding === "geoarrow.geometrycollection")
|
|
4051
|
-
return "GeometryCollection";
|
|
4052
|
-
return getGeometryKind2(sourceEncoding);
|
|
4053
|
-
}
|
|
4054
|
-
function inferCollectionDimension(value) {
|
|
4055
|
-
if (!isVectorLike3(value))
|
|
4056
|
-
return "xy";
|
|
4057
|
-
const vector = value;
|
|
4058
|
-
if (vector.length > 0) {
|
|
4059
|
-
const typeId = getUnionTypeId2(vector, 0);
|
|
4060
|
-
const field = getUnionField(vector, 0);
|
|
4061
|
-
return getGeoArrowUnionDimension(field == null ? void 0 : field.name, field == null ? void 0 : field.type, typeId) || "xy";
|
|
4062
|
-
}
|
|
4063
|
-
return "xy";
|
|
4064
|
-
}
|
|
4065
|
-
function getGeometryKind2(encoding) {
|
|
4066
|
-
switch (encoding) {
|
|
4067
|
-
case "geoarrow.point":
|
|
4068
|
-
return "Point";
|
|
4069
|
-
case "geoarrow.linestring":
|
|
4070
|
-
return "LineString";
|
|
4071
|
-
case "geoarrow.polygon":
|
|
4072
|
-
return "Polygon";
|
|
4073
|
-
case "geoarrow.multipoint":
|
|
4074
|
-
return "MultiPoint";
|
|
4075
|
-
case "geoarrow.multilinestring":
|
|
4076
|
-
return "MultiLineString";
|
|
4077
|
-
case "geoarrow.multipolygon":
|
|
4078
|
-
return "MultiPolygon";
|
|
4079
|
-
case "geoarrow.geometry":
|
|
4080
|
-
return "GeometryCollection";
|
|
4081
|
-
case "geoarrow.geometrycollection":
|
|
4082
|
-
return "GeometryCollection";
|
|
4083
|
-
default:
|
|
4084
|
-
throw new Error(`Unsupported native WKT encoding "${encoding}".`);
|
|
4085
|
-
}
|
|
4086
|
-
}
|
|
4087
|
-
function getDimensionSuffix(dimension) {
|
|
4088
|
-
return dimension === "xy" ? "" : dimension === "xyzm" ? " ZM" : ` ${dimension.slice(2).toUpperCase()}`;
|
|
4089
|
-
}
|
|
4090
|
-
function isVectorLike3(value) {
|
|
4091
|
-
return Boolean(value && typeof value.length === "number" && typeof value.get === "function");
|
|
4092
|
-
}
|
|
4093
|
-
|
|
4094
3866
|
// dist/geoarrow/get-geoarrow-vertex-count.js
|
|
4095
|
-
var
|
|
4096
|
-
var
|
|
3867
|
+
var arrow12 = __toESM(require("apache-arrow"), 1);
|
|
3868
|
+
var import_arrow6 = require("@math.gl/core/arrow");
|
|
4097
3869
|
|
|
4098
3870
|
// dist/geoarrow/geoarrow-functions.js
|
|
4099
|
-
var
|
|
3871
|
+
var arrow9 = __toESM(require("apache-arrow"), 1);
|
|
4100
3872
|
var import_type = require("apache-arrow/type");
|
|
4101
3873
|
function isGeoArrowBox(type) {
|
|
4102
3874
|
if (!import_type.DataType.isStruct(type))
|
|
@@ -4178,18 +3950,18 @@ function isGeoArrowMultiPolygon(type) {
|
|
|
4178
3950
|
return true;
|
|
4179
3951
|
}
|
|
4180
3952
|
function isGeoArrowList(type) {
|
|
4181
|
-
const
|
|
4182
|
-
return type instanceof import_type.List || Boolean(
|
|
3953
|
+
const LargeList8 = getOptionalArrowListConstructor("LargeList");
|
|
3954
|
+
return type instanceof import_type.List || Boolean(LargeList8 && type instanceof LargeList8);
|
|
4183
3955
|
}
|
|
4184
3956
|
function getOptionalArrowListConstructor(typeName) {
|
|
4185
|
-
return
|
|
3957
|
+
return arrow9[typeName];
|
|
4186
3958
|
}
|
|
4187
3959
|
|
|
4188
3960
|
// dist/geoarrow/get-geoarrow-geometry-info.js
|
|
4189
|
-
var
|
|
3961
|
+
var arrow11 = __toESM(require("apache-arrow"), 1);
|
|
4190
3962
|
|
|
4191
3963
|
// dist/geoarrow/geoarrow-layout.js
|
|
4192
|
-
var
|
|
3964
|
+
var arrow10 = __toESM(require("apache-arrow"), 1);
|
|
4193
3965
|
var NATIVE_LAYOUTS = {
|
|
4194
3966
|
point: { depth: 0, encoding: "geoarrow.point" },
|
|
4195
3967
|
linestring: { depth: 1, encoding: "geoarrow.linestring" },
|
|
@@ -4253,11 +4025,11 @@ function inspectGeoArrowLayout(field) {
|
|
|
4253
4025
|
function visitType(type, path, state) {
|
|
4254
4026
|
const storage = getStorageKind(type);
|
|
4255
4027
|
state.storageKinds.push(storage);
|
|
4256
|
-
if (type instanceof
|
|
4257
|
-
state.offsetTypes.push(type instanceof
|
|
4258
|
-
} else if (type instanceof
|
|
4259
|
-
state.offsetTypes.push(type instanceof
|
|
4260
|
-
} else if (type instanceof
|
|
4028
|
+
if (type instanceof arrow10.List || type instanceof arrow10.LargeList) {
|
|
4029
|
+
state.offsetTypes.push(type instanceof arrow10.LargeList ? "int64" : "int32");
|
|
4030
|
+
} else if (type instanceof arrow10.Binary || type instanceof arrow10.LargeBinary) {
|
|
4031
|
+
state.offsetTypes.push(type instanceof arrow10.LargeBinary ? "int64" : "int32");
|
|
4032
|
+
} else if (type instanceof arrow10.DenseUnion) {
|
|
4261
4033
|
state.unionTypeIds.push(...Array.from(type.typeIds));
|
|
4262
4034
|
for (let childIndex = 0; childIndex < type.children.length; childIndex++) {
|
|
4263
4035
|
const child = type.children[childIndex];
|
|
@@ -4293,10 +4065,10 @@ function visitType(type, path, state) {
|
|
|
4293
4065
|
}
|
|
4294
4066
|
function classifyField(type, encoding, path, state, issues) {
|
|
4295
4067
|
var _a;
|
|
4296
|
-
if (type instanceof
|
|
4068
|
+
if (type instanceof arrow10.Binary || type instanceof arrow10.LargeBinary || type instanceof arrow10.BinaryView) {
|
|
4297
4069
|
return "wkb";
|
|
4298
4070
|
}
|
|
4299
|
-
if (type instanceof
|
|
4071
|
+
if (type instanceof arrow10.Utf8 || type instanceof arrow10.LargeUtf8 || type instanceof arrow10.Utf8View) {
|
|
4300
4072
|
return "wkt";
|
|
4301
4073
|
}
|
|
4302
4074
|
if (isBoxType(type)) {
|
|
@@ -4305,7 +4077,7 @@ function classifyField(type, encoding, path, state, issues) {
|
|
|
4305
4077
|
recordCoordinateSemantics(type, state, "separated");
|
|
4306
4078
|
return "box";
|
|
4307
4079
|
}
|
|
4308
|
-
if (type instanceof
|
|
4080
|
+
if (type instanceof arrow10.DenseUnion) {
|
|
4309
4081
|
validateUnionType(type, path, state, issues);
|
|
4310
4082
|
if (encoding === "geoarrow.geometrycollection") {
|
|
4311
4083
|
issues.push({
|
|
@@ -4317,7 +4089,7 @@ function classifyField(type, encoding, path, state, issues) {
|
|
|
4317
4089
|
validateUnionChildren(type, path, issues, true);
|
|
4318
4090
|
return "geometry-union";
|
|
4319
4091
|
}
|
|
4320
|
-
if ((type instanceof
|
|
4092
|
+
if ((type instanceof arrow10.List || type instanceof arrow10.LargeList) && ((_a = type.children[0]) == null ? void 0 : _a.type) instanceof arrow10.DenseUnion) {
|
|
4321
4093
|
validateUnionType(type.children[0].type, `${path}.child[0]`, state, issues);
|
|
4322
4094
|
validateUnionChildren(type.children[0].type, `${path}.child[0]`, issues, false);
|
|
4323
4095
|
return "geometrycollection";
|
|
@@ -4376,8 +4148,8 @@ function validateDeclaredEncoding(type, encoding, path, state, issues) {
|
|
|
4376
4148
|
});
|
|
4377
4149
|
}
|
|
4378
4150
|
}
|
|
4379
|
-
if (encoding === "geoarrow.geometrycollection" && type instanceof
|
|
4380
|
-
if (!(((_a = type.children[0]) == null ? void 0 : _a.type) instanceof
|
|
4151
|
+
if (encoding === "geoarrow.geometrycollection" && type instanceof arrow10.List) {
|
|
4152
|
+
if (!(((_a = type.children[0]) == null ? void 0 : _a.type) instanceof arrow10.DenseUnion)) {
|
|
4381
4153
|
addWrongPhysicalType(path, encoding, issues);
|
|
4382
4154
|
}
|
|
4383
4155
|
}
|
|
@@ -4385,7 +4157,7 @@ function validateDeclaredEncoding(type, encoding, path, state, issues) {
|
|
|
4385
4157
|
function validateNativeType(type, expectedDepth, path, state, issues) {
|
|
4386
4158
|
let current = type;
|
|
4387
4159
|
for (let depth = 0; depth < expectedDepth; depth++) {
|
|
4388
|
-
if (!(current instanceof
|
|
4160
|
+
if (!(current instanceof arrow10.List || current instanceof arrow10.LargeList)) {
|
|
4389
4161
|
issues.push({
|
|
4390
4162
|
code: "wrong-child-count",
|
|
4391
4163
|
path,
|
|
@@ -4406,7 +4178,7 @@ function validateNativeType(type, expectedDepth, path, state, issues) {
|
|
|
4406
4178
|
validateCoordinateType(current, path, state, issues);
|
|
4407
4179
|
}
|
|
4408
4180
|
function validateCoordinateType(type, path, state, issues) {
|
|
4409
|
-
if (type instanceof
|
|
4181
|
+
if (type instanceof arrow10.FixedSizeList) {
|
|
4410
4182
|
if (type.children.length !== 1 || !type.children[0]) {
|
|
4411
4183
|
issues.push({
|
|
4412
4184
|
code: "wrong-child-count",
|
|
@@ -4428,7 +4200,7 @@ function validateCoordinateType(type, path, state, issues) {
|
|
|
4428
4200
|
recordFloatPrecision(type.children[0].type, `${path}.child[0]`, state, issues);
|
|
4429
4201
|
return;
|
|
4430
4202
|
}
|
|
4431
|
-
if (type instanceof
|
|
4203
|
+
if (type instanceof arrow10.Struct) {
|
|
4432
4204
|
const names = type.children.map((child) => child.name);
|
|
4433
4205
|
const dimension = getSeparatedDimension(names);
|
|
4434
4206
|
if (!dimension) {
|
|
@@ -4460,7 +4232,7 @@ function validateCoordinateType(type, path, state, issues) {
|
|
|
4460
4232
|
});
|
|
4461
4233
|
}
|
|
4462
4234
|
function recordFloatPrecision(type, path, state, issues) {
|
|
4463
|
-
if (!(type instanceof
|
|
4235
|
+
if (!(type instanceof arrow10.Float)) {
|
|
4464
4236
|
issues.push({
|
|
4465
4237
|
code: "wrong-coordinate-precision",
|
|
4466
4238
|
path,
|
|
@@ -4468,7 +4240,7 @@ function recordFloatPrecision(type, path, state, issues) {
|
|
|
4468
4240
|
});
|
|
4469
4241
|
return;
|
|
4470
4242
|
}
|
|
4471
|
-
const precision = type.precision ===
|
|
4243
|
+
const precision = type.precision === arrow10.Precision.HALF ? "float16" : type.precision === arrow10.Precision.SINGLE ? "float32" : "float64";
|
|
4472
4244
|
state.precisions.push(precision);
|
|
4473
4245
|
if (precision === "float16") {
|
|
4474
4246
|
issues.push({
|
|
@@ -4479,7 +4251,7 @@ function recordFloatPrecision(type, path, state, issues) {
|
|
|
4479
4251
|
}
|
|
4480
4252
|
}
|
|
4481
4253
|
function validateBoxType(type, path, issues) {
|
|
4482
|
-
if (!(type instanceof
|
|
4254
|
+
if (!(type instanceof arrow10.Struct))
|
|
4483
4255
|
return;
|
|
4484
4256
|
const names = type.children.map((child) => child.name);
|
|
4485
4257
|
if (!getBoxDimension(names)) {
|
|
@@ -4490,7 +4262,7 @@ function validateBoxType(type, path, issues) {
|
|
|
4490
4262
|
});
|
|
4491
4263
|
}
|
|
4492
4264
|
for (let childIndex = 0; childIndex < type.children.length; childIndex++) {
|
|
4493
|
-
if (!(type.children[childIndex].type instanceof
|
|
4265
|
+
if (!(type.children[childIndex].type instanceof arrow10.Float)) {
|
|
4494
4266
|
issues.push({
|
|
4495
4267
|
code: "wrong-coordinate-precision",
|
|
4496
4268
|
path: `${path}.child[${childIndex}]`,
|
|
@@ -4545,7 +4317,7 @@ function validateUnionChildren(type, path, issues, allowGeometryCollection) {
|
|
|
4545
4317
|
});
|
|
4546
4318
|
continue;
|
|
4547
4319
|
}
|
|
4548
|
-
if (!(child.type instanceof
|
|
4320
|
+
if (!(child.type instanceof arrow10.List || child.type instanceof arrow10.LargeList) || !(((_a = child.type.children[0]) == null ? void 0 : _a.type) instanceof arrow10.DenseUnion)) {
|
|
4549
4321
|
issues.push({
|
|
4550
4322
|
code: "wrong-physical-type",
|
|
4551
4323
|
path: childPath,
|
|
@@ -4574,27 +4346,27 @@ function validateUnionChildren(type, path, issues, allowGeometryCollection) {
|
|
|
4574
4346
|
}
|
|
4575
4347
|
}
|
|
4576
4348
|
function recordCoordinateSemantics(type, state, coordinates) {
|
|
4577
|
-
if (!(type instanceof
|
|
4349
|
+
if (!(type instanceof arrow10.Struct))
|
|
4578
4350
|
return;
|
|
4579
4351
|
const dimension = getBoxDimension(type.children.map((child) => child.name));
|
|
4580
4352
|
if (dimension) {
|
|
4581
4353
|
state.dimensions.push(dimension);
|
|
4582
4354
|
state.coordinates.push(coordinates);
|
|
4583
4355
|
for (const child of type.children) {
|
|
4584
|
-
if (child.type instanceof
|
|
4585
|
-
state.precisions.push(child.type.precision ===
|
|
4356
|
+
if (child.type instanceof arrow10.Float) {
|
|
4357
|
+
state.precisions.push(child.type.precision === arrow10.Precision.SINGLE ? "float32" : "float64");
|
|
4586
4358
|
}
|
|
4587
4359
|
}
|
|
4588
4360
|
}
|
|
4589
4361
|
}
|
|
4590
4362
|
function isPotentialNativeType(type) {
|
|
4591
|
-
return type instanceof
|
|
4363
|
+
return type instanceof arrow10.FixedSizeList || type instanceof arrow10.Struct || type instanceof arrow10.List || type instanceof arrow10.LargeList;
|
|
4592
4364
|
}
|
|
4593
4365
|
function getListDepth(type) {
|
|
4594
4366
|
var _a;
|
|
4595
4367
|
let depth = 0;
|
|
4596
4368
|
let current = type;
|
|
4597
|
-
while (current instanceof
|
|
4369
|
+
while (current instanceof arrow10.List || current instanceof arrow10.LargeList) {
|
|
4598
4370
|
depth++;
|
|
4599
4371
|
current = (_a = current.children[0]) == null ? void 0 : _a.type;
|
|
4600
4372
|
if (!current)
|
|
@@ -4606,7 +4378,7 @@ function getNativeKind(type, encoding) {
|
|
|
4606
4378
|
const encodingKind = encoding ? encodingToKind(encoding) : null;
|
|
4607
4379
|
if (isNativeLayoutKind(encodingKind))
|
|
4608
4380
|
return encodingKind;
|
|
4609
|
-
if (type instanceof
|
|
4381
|
+
if (type instanceof arrow10.FixedSizeList || isCoordinateStruct(type))
|
|
4610
4382
|
return "point";
|
|
4611
4383
|
return null;
|
|
4612
4384
|
}
|
|
@@ -4651,34 +4423,34 @@ function addWrongPhysicalType(path, encoding, issues) {
|
|
|
4651
4423
|
});
|
|
4652
4424
|
}
|
|
4653
4425
|
function getStorageKind(type) {
|
|
4654
|
-
if (type instanceof
|
|
4426
|
+
if (type instanceof arrow10.FixedSizeList)
|
|
4655
4427
|
return "fixed-size-list";
|
|
4656
|
-
if (type instanceof
|
|
4428
|
+
if (type instanceof arrow10.List)
|
|
4657
4429
|
return "list";
|
|
4658
|
-
if (type instanceof
|
|
4430
|
+
if (type instanceof arrow10.LargeList)
|
|
4659
4431
|
return "large-list";
|
|
4660
|
-
if (type instanceof
|
|
4432
|
+
if (type instanceof arrow10.Struct)
|
|
4661
4433
|
return "struct";
|
|
4662
|
-
if (type instanceof
|
|
4434
|
+
if (type instanceof arrow10.DenseUnion)
|
|
4663
4435
|
return "dense-union";
|
|
4664
|
-
if (type instanceof
|
|
4436
|
+
if (type instanceof arrow10.Binary)
|
|
4665
4437
|
return "binary";
|
|
4666
|
-
if (type instanceof
|
|
4438
|
+
if (type instanceof arrow10.LargeBinary)
|
|
4667
4439
|
return "large-binary";
|
|
4668
|
-
if (type instanceof
|
|
4440
|
+
if (type instanceof arrow10.BinaryView)
|
|
4669
4441
|
return "binary-view";
|
|
4670
|
-
if (type instanceof
|
|
4442
|
+
if (type instanceof arrow10.Utf8)
|
|
4671
4443
|
return "utf8";
|
|
4672
|
-
if (type instanceof
|
|
4444
|
+
if (type instanceof arrow10.LargeUtf8)
|
|
4673
4445
|
return "large-utf8";
|
|
4674
|
-
if (type instanceof
|
|
4446
|
+
if (type instanceof arrow10.Utf8View)
|
|
4675
4447
|
return "utf8-view";
|
|
4676
|
-
if (type instanceof
|
|
4448
|
+
if (type instanceof arrow10.Float || type instanceof arrow10.Int)
|
|
4677
4449
|
return "scalar";
|
|
4678
4450
|
return "unknown";
|
|
4679
4451
|
}
|
|
4680
4452
|
function isCoordinateStruct(type) {
|
|
4681
|
-
return type instanceof
|
|
4453
|
+
return type instanceof arrow10.Struct && getSeparatedDimension(type.children.map((child) => child.name)) !== null;
|
|
4682
4454
|
}
|
|
4683
4455
|
function getSeparatedDimension(names) {
|
|
4684
4456
|
if (sameNames(names, ["x", "y"]))
|
|
@@ -4704,7 +4476,7 @@ function getBoxDimension(names) {
|
|
|
4704
4476
|
return null;
|
|
4705
4477
|
}
|
|
4706
4478
|
function isBoxType(type) {
|
|
4707
|
-
return type instanceof
|
|
4479
|
+
return type instanceof arrow10.Struct && getBoxDimension(type.children.map((child) => child.name)) !== null && type.children.every((child) => child.type instanceof arrow10.Float);
|
|
4708
4480
|
}
|
|
4709
4481
|
function getCommonValue(values) {
|
|
4710
4482
|
const firstValue = values[0];
|
|
@@ -4782,7 +4554,7 @@ function getNesting(kind, type) {
|
|
|
4782
4554
|
function getListDepth2(type) {
|
|
4783
4555
|
let depth = 0;
|
|
4784
4556
|
let currentType = type;
|
|
4785
|
-
while (currentType instanceof
|
|
4557
|
+
while (currentType instanceof arrow11.List || currentType instanceof arrow11.LargeList) {
|
|
4786
4558
|
depth++;
|
|
4787
4559
|
currentType = currentType.children[0].type;
|
|
4788
4560
|
}
|
|
@@ -4791,13 +4563,13 @@ function getListDepth2(type) {
|
|
|
4791
4563
|
|
|
4792
4564
|
// dist/geoarrow/get-geoarrow-vertex-count.js
|
|
4793
4565
|
function getGeoarrowVertexCount(input) {
|
|
4794
|
-
if (input instanceof
|
|
4566
|
+
if (input instanceof arrow12.Table) {
|
|
4795
4567
|
return getGeoarrowTableVertexCount(input);
|
|
4796
4568
|
}
|
|
4797
|
-
if (input instanceof
|
|
4569
|
+
if (input instanceof arrow12.Vector) {
|
|
4798
4570
|
return getGeoarrowVectorVertexCount(input);
|
|
4799
4571
|
}
|
|
4800
|
-
if (input instanceof
|
|
4572
|
+
if (input instanceof arrow12.Data) {
|
|
4801
4573
|
return getGeoarrowDataVertexCount(input);
|
|
4802
4574
|
}
|
|
4803
4575
|
throw new Error("Expected an Apache Arrow Table, Vector, or Data instance.");
|
|
@@ -4824,16 +4596,16 @@ function getGeoarrowVectorVertexCount(vector) {
|
|
|
4824
4596
|
}
|
|
4825
4597
|
function getGeoarrowDataVertexCount(data) {
|
|
4826
4598
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4827
|
-
if (data.type instanceof
|
|
4599
|
+
if (data.type instanceof arrow12.Binary || data.type instanceof arrow12.LargeBinary || data.type instanceof arrow12.BinaryView) {
|
|
4828
4600
|
return getWKBDataVertexCount(data);
|
|
4829
4601
|
}
|
|
4830
|
-
if (data.type instanceof
|
|
4602
|
+
if (data.type instanceof arrow12.Utf8 || data.type instanceof arrow12.LargeUtf8 || data.type instanceof arrow12.Utf8View) {
|
|
4831
4603
|
throw new Error("WKT vertex counting is not supported.");
|
|
4832
4604
|
}
|
|
4833
|
-
if (data.type instanceof
|
|
4605
|
+
if (data.type instanceof arrow12.DenseUnion) {
|
|
4834
4606
|
return data.children.reduce((vertexCount, child) => vertexCount + getGeoarrowDataVertexCount(child), 0);
|
|
4835
4607
|
}
|
|
4836
|
-
if ((data.type instanceof
|
|
4608
|
+
if ((data.type instanceof arrow12.List || data.type instanceof arrow12.LargeList) && ((_a = data.children[0]) == null ? void 0 : _a.type) instanceof arrow12.DenseUnion) {
|
|
4837
4609
|
return getGeoarrowDataVertexCount(data.children[0]);
|
|
4838
4610
|
}
|
|
4839
4611
|
if (isGeoArrowBox(data.type)) {
|
|
@@ -4854,16 +4626,16 @@ function getGeoarrowDataVertexCount(data) {
|
|
|
4854
4626
|
throw new Error(`Unsupported GeoArrow data type: ${data.type}`);
|
|
4855
4627
|
}
|
|
4856
4628
|
function getGeoarrowWKTVertexCount(input) {
|
|
4857
|
-
if (input instanceof
|
|
4629
|
+
if (input instanceof arrow12.Vector) {
|
|
4858
4630
|
return input.data.reduce((vertexCount, data) => vertexCount + getWKTDataVertexCount(data), 0);
|
|
4859
4631
|
}
|
|
4860
|
-
if (input instanceof
|
|
4632
|
+
if (input instanceof arrow12.Data) {
|
|
4861
4633
|
return getWKTDataVertexCount(input);
|
|
4862
4634
|
}
|
|
4863
4635
|
throw new Error("Expected an Apache Arrow Vector or Data instance.");
|
|
4864
4636
|
}
|
|
4865
4637
|
function getWKTDataVertexCount(data) {
|
|
4866
|
-
const vector = new
|
|
4638
|
+
const vector = new arrow12.Vector([data]);
|
|
4867
4639
|
let vertexCount = 0;
|
|
4868
4640
|
for (let rowIndex = 0; rowIndex < vector.length; rowIndex++) {
|
|
4869
4641
|
const value = vector.get(rowIndex);
|
|
@@ -4894,7 +4666,7 @@ function countGeometryVertices(geometry) {
|
|
|
4894
4666
|
}
|
|
4895
4667
|
}
|
|
4896
4668
|
function getWKBDataVertexCount(data) {
|
|
4897
|
-
const vector = new
|
|
4669
|
+
const vector = new arrow12.Vector([data]);
|
|
4898
4670
|
let vertexCount = 0;
|
|
4899
4671
|
for (let rowIndex = 0; rowIndex < vector.length; rowIndex++) {
|
|
4900
4672
|
const value = vector.get(rowIndex);
|
|
@@ -4906,7 +4678,7 @@ function getWKBDataVertexCount(data) {
|
|
|
4906
4678
|
}
|
|
4907
4679
|
function getWKBVertexCount(wkb) {
|
|
4908
4680
|
try {
|
|
4909
|
-
return (0,
|
|
4681
|
+
return (0, import_arrow6.scanWKB)(wkb).coordinateCount;
|
|
4910
4682
|
} catch (error) {
|
|
4911
4683
|
if (error instanceof Error && error.message.startsWith("Unsupported WKB geometry type")) {
|
|
4912
4684
|
throw new Error("Unsupported geometry type");
|
|
@@ -4963,7 +4735,7 @@ function getVariableLengthByteCount(column, sourceEncoding) {
|
|
|
4963
4735
|
}
|
|
4964
4736
|
|
|
4965
4737
|
// dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js
|
|
4966
|
-
var
|
|
4738
|
+
var import_arrow8 = require("@math.gl/core/arrow");
|
|
4967
4739
|
var DEFAULT_MAX_GEOMETRY_COLLECTION_DEPTH = 64;
|
|
4968
4740
|
function convertGeoArrowVector(column, sourceEncoding, targetEncoding, options) {
|
|
4969
4741
|
const maxGeometryCollectionDepth = getMaxGeometryCollectionDepth(options);
|
|
@@ -5048,7 +4820,7 @@ function convertGeoArrowGeometry(table, targetEncoding, options) {
|
|
|
5048
4820
|
const convertedVector = convertedColumns.get(field.name);
|
|
5049
4821
|
return convertedEncoding && convertedVector ? createConvertedField(field, convertedVector.type, convertedEncoding, (_a2 = conversionOptions.get(field.name)) == null ? void 0 : _a2.geometryTypes, conversionOptions.get(field.name), (_b2 = geoMetadata == null ? void 0 : geoMetadata.columns) == null ? void 0 : _b2[field.name]) : field;
|
|
5050
4822
|
});
|
|
5051
|
-
const nextSchema = new
|
|
4823
|
+
const nextSchema = new arrow13.Schema(nextFields, nextSchemaMetadata);
|
|
5052
4824
|
let rowOffset = 0;
|
|
5053
4825
|
const nextBatches = table.batches.map((batch) => {
|
|
5054
4826
|
const children = table.schema.fields.map((field) => {
|
|
@@ -5067,14 +4839,14 @@ function convertGeoArrowGeometry(table, targetEncoding, options) {
|
|
|
5067
4839
|
return batchVector.data[0];
|
|
5068
4840
|
});
|
|
5069
4841
|
rowOffset += batch.numRows;
|
|
5070
|
-
return new
|
|
5071
|
-
type: new
|
|
4842
|
+
return new arrow13.RecordBatch(nextSchema, arrow13.makeData({
|
|
4843
|
+
type: new arrow13.Struct(nextFields),
|
|
5072
4844
|
length: batch.numRows,
|
|
5073
4845
|
nullCount: 0,
|
|
5074
4846
|
children
|
|
5075
4847
|
}));
|
|
5076
4848
|
});
|
|
5077
|
-
return new
|
|
4849
|
+
return new arrow13.Table(nextSchema, nextBatches);
|
|
5078
4850
|
}
|
|
5079
4851
|
function inferGeometryTypes(table, geometryColumn, sourceEncoding) {
|
|
5080
4852
|
if (sourceEncoding !== "geoarrow.wkb" && sourceEncoding !== "geoarrow.wkt") {
|
|
@@ -5103,11 +4875,6 @@ function convertGeometryColumn(column, sourceEncoding, targetEncoding, geometryC
|
|
|
5103
4875
|
const mathGeoArrowVector = convertGeometryColumnWithMath(column, sourceEncoding, targetEncoding, options);
|
|
5104
4876
|
if (mathGeoArrowVector)
|
|
5105
4877
|
return mathGeoArrowVector;
|
|
5106
|
-
if (targetEncoding === "geoarrow.wkt") {
|
|
5107
|
-
const directWKTVector = encodeGeoArrowWKTVector(column, sourceEncoding, options == null ? void 0 : options.dimension);
|
|
5108
|
-
if (directWKTVector)
|
|
5109
|
-
return directWKTVector;
|
|
5110
|
-
}
|
|
5111
4878
|
if (sourceEncoding === "geoarrow.wkt" && isConcreteNativeEncoding(targetEncoding)) {
|
|
5112
4879
|
const directWKTVector = decodeWKTNativeVector(column, targetEncoding, options == null ? void 0 : options.dimension, options == null ? void 0 : options.coordinates, options == null ? void 0 : options.offsetType, options == null ? void 0 : options.maxGeometryCollectionDepth);
|
|
5113
4880
|
if (directWKTVector)
|
|
@@ -5141,29 +4908,29 @@ function convertGeometryColumn(column, sourceEncoding, targetEncoding, geometryC
|
|
|
5141
4908
|
}
|
|
5142
4909
|
const targetValues = geometries.map((geometry) => convertGeometryValue(geometry, targetEncoding, targetDimension, geometryColumn, options));
|
|
5143
4910
|
const nativeValues = (options == null ? void 0 : options.coordinates) === "separated" ? targetValues.map((value) => separateCoordinateValues(value, targetDimension, targetDimensionName)) : targetValues;
|
|
5144
|
-
return
|
|
4911
|
+
return arrow13.vectorFromArray(nativeValues, getTargetArrowType(targetEncoding, targetDimension, options, (options == null ? void 0 : options.dimension) || getDimensionFromGeometryTypes(options == null ? void 0 : options.geometryTypes)));
|
|
5145
4912
|
}
|
|
5146
4913
|
function convertGeometryColumnWithMath(column, sourceEncoding, targetEncoding, options) {
|
|
5147
4914
|
const sourceIsNative = isMathGeoArrowNativeEncoding(sourceEncoding);
|
|
5148
4915
|
const targetIsNative = isMathGeoArrowNativeEncoding(targetEncoding);
|
|
5149
|
-
const supportsConversion = sourceEncoding === "geoarrow.wkb" && targetIsNative || sourceIsNative && targetEncoding === "geoarrow.wkb" || sourceIsNative && targetIsNative;
|
|
4916
|
+
const supportsConversion = sourceEncoding === "geoarrow.wkb" && targetIsNative || sourceIsNative && (targetEncoding === "geoarrow.wkb" || targetEncoding === "geoarrow.wkt") || sourceIsNative && targetIsNative;
|
|
5150
4917
|
if (!supportsConversion)
|
|
5151
4918
|
return null;
|
|
5152
4919
|
const declaredDimension = getDimensionFromGeometryTypes(options == null ? void 0 : options.geometryTypes);
|
|
5153
|
-
const sourceColumn = (0,
|
|
4920
|
+
const sourceColumn = (0, import_arrow8.makeGeoArrowColumnFromArrowVector)(column, {
|
|
5154
4921
|
encoding: sourceEncoding,
|
|
5155
4922
|
dimension: sourceEncoding === "geoarrow.wkb" ? declaredDimension || "xy" : declaredDimension || (targetEncoding === "geoarrow.wkb" ? options == null ? void 0 : options.dimension : void 0)
|
|
5156
4923
|
});
|
|
5157
4924
|
if (sourceEncoding === "geoarrow.wkb") {
|
|
5158
4925
|
try {
|
|
5159
|
-
const decodedColumn = (0,
|
|
4926
|
+
const decodedColumn = (0, import_arrow7.decodeGeoArrowWKB)(sourceColumn, {
|
|
5160
4927
|
encoding: targetEncoding,
|
|
5161
4928
|
dimension: (options == null ? void 0 : options.dimension) || declaredDimension || "infer",
|
|
5162
4929
|
coordinateLayout: (options == null ? void 0 : options.coordinates) || "interleaved",
|
|
5163
4930
|
offsetType: (options == null ? void 0 : options.offsetType) || "int32",
|
|
5164
4931
|
traversal: { maximumDepth: options == null ? void 0 : options.maxGeometryCollectionDepth }
|
|
5165
4932
|
});
|
|
5166
|
-
return (0,
|
|
4933
|
+
return (0, import_arrow8.makeArrowVectorFromGeoArrowColumn)(decodedColumn);
|
|
5167
4934
|
} catch (error) {
|
|
5168
4935
|
if ((options == null ? void 0 : options.maxGeometryCollectionDepth) !== void 0 && error instanceof Error && error.message.includes("nesting exceeds maximumDepth")) {
|
|
5169
4936
|
throw new Error(`GeometryCollection nesting exceeds maxGeometryCollectionDepth (${options.maxGeometryCollectionDepth}).`);
|
|
@@ -5171,16 +4938,17 @@ function convertGeometryColumnWithMath(column, sourceEncoding, targetEncoding, o
|
|
|
5171
4938
|
throw error;
|
|
5172
4939
|
}
|
|
5173
4940
|
}
|
|
5174
|
-
if (targetEncoding === "geoarrow.wkb") {
|
|
5175
|
-
|
|
4941
|
+
if (targetEncoding === "geoarrow.wkb" || targetEncoding === "geoarrow.wkt") {
|
|
4942
|
+
const nativeColumn = targetEncoding === "geoarrow.wkt" && (options == null ? void 0 : options.dimension) ? (0, import_arrow7.convertGeoArrowColumn)(sourceColumn, { dimension: options.dimension }) : sourceColumn;
|
|
4943
|
+
return (0, import_arrow8.makeArrowVectorFromGeoArrowColumn)((0, import_arrow7.convertGeoArrowColumn)(nativeColumn, { encoding: targetEncoding }));
|
|
5176
4944
|
}
|
|
5177
|
-
const convertedColumn = (0,
|
|
4945
|
+
const convertedColumn = (0, import_arrow7.convertGeoArrowColumn)(sourceColumn, {
|
|
5178
4946
|
encoding: targetEncoding,
|
|
5179
4947
|
dimension: options == null ? void 0 : options.dimension,
|
|
5180
4948
|
coordinateLayout: (options == null ? void 0 : options.coordinates) || "preserve",
|
|
5181
4949
|
offsetType: (options == null ? void 0 : options.offsetType) || "preserve"
|
|
5182
4950
|
});
|
|
5183
|
-
return convertedColumn === sourceColumn ? column : (0,
|
|
4951
|
+
return convertedColumn === sourceColumn ? column : (0, import_arrow8.makeArrowVectorFromGeoArrowColumn)(convertedColumn);
|
|
5184
4952
|
}
|
|
5185
4953
|
function isMathGeoArrowNativeEncoding(encoding) {
|
|
5186
4954
|
return encoding === "geoarrow.point" || encoding === "geoarrow.linestring" || encoding === "geoarrow.polygon" || encoding === "geoarrow.multipoint" || encoding === "geoarrow.multilinestring" || encoding === "geoarrow.multipolygon" || encoding === "geoarrow.geometry" || encoding === "geoarrow.geometrycollection";
|
|
@@ -5310,17 +5078,17 @@ function createGeometryUnionVector(geometries, targetDimension, allowGeometryCol
|
|
|
5310
5078
|
usedKinds.add(childKind);
|
|
5311
5079
|
childValues[childKind] ||= [];
|
|
5312
5080
|
valueOffsets.push(childValues[childKind].length);
|
|
5313
|
-
typeIds.push(
|
|
5081
|
+
typeIds.push(getUnionTypeId2(childKind, targetDimension, targetDimensionName));
|
|
5314
5082
|
childValues[childKind].push(geometry ? convertGeometryToUnionChildValue(geometry, targetDimension, geometryColumn) : null);
|
|
5315
5083
|
}
|
|
5316
|
-
const orderedKinds = [...usedKinds].sort((leftKind, rightKind) =>
|
|
5317
|
-
const fields = orderedKinds.map((kind) => new
|
|
5084
|
+
const orderedKinds = [...usedKinds].sort((leftKind, rightKind) => getUnionTypeId2(leftKind, targetDimension, targetDimensionName) - getUnionTypeId2(rightKind, targetDimension, targetDimensionName));
|
|
5085
|
+
const fields = orderedKinds.map((kind) => new arrow13.Field(getUnionFieldName(kind, targetDimension, targetDimensionName), getUnionChildType(kind, targetDimension, options, geometryCollectionDepth, targetDimensionName), true));
|
|
5318
5086
|
const children = orderedKinds.map((kind) => {
|
|
5319
5087
|
const values = childValues[kind] || [];
|
|
5320
5088
|
return createUnionChildVector(kind, values, targetDimension, geometryColumn, options, geometryCollectionDepth, targetDimensionName).data[0];
|
|
5321
5089
|
});
|
|
5322
|
-
const unionType = new
|
|
5323
|
-
return
|
|
5090
|
+
const unionType = new arrow13.DenseUnion(orderedKinds.map((kind) => getUnionTypeId2(kind, targetDimension, targetDimensionName)), fields);
|
|
5091
|
+
return arrow13.makeVector(arrow13.makeData({
|
|
5324
5092
|
type: unionType,
|
|
5325
5093
|
length: geometries.length,
|
|
5326
5094
|
nullCount: 0,
|
|
@@ -5347,7 +5115,7 @@ function createGeometryCollectionVector(geometries, targetDimension, geometryCol
|
|
|
5347
5115
|
valueOffsets.push(flattenedGeometries.length);
|
|
5348
5116
|
}
|
|
5349
5117
|
const memberUnionVector = createGeometryUnionVector(flattenedGeometries, targetDimension, false, geometryColumn, options, 0, targetDimensionName);
|
|
5350
|
-
const listType = createListType(new
|
|
5118
|
+
const listType = createListType(new arrow13.Field("geometries", memberUnionVector.type, true), options == null ? void 0 : options.offsetType);
|
|
5351
5119
|
const listData = {
|
|
5352
5120
|
length: geometries.length,
|
|
5353
5121
|
nullCount: validity.filter((isValid) => !isValid).length,
|
|
@@ -5355,16 +5123,16 @@ function createGeometryCollectionVector(geometries, targetDimension, geometryCol
|
|
|
5355
5123
|
valueOffsets: createOffsetArray(valueOffsets, options == null ? void 0 : options.offsetType),
|
|
5356
5124
|
child: memberUnionVector.data[0]
|
|
5357
5125
|
};
|
|
5358
|
-
const listDataValue = listType instanceof
|
|
5126
|
+
const listDataValue = listType instanceof arrow13.LargeList ? arrow13.makeData({
|
|
5359
5127
|
type: listType,
|
|
5360
5128
|
...listData,
|
|
5361
5129
|
valueOffsets: BigInt64Array.from(valueOffsets, BigInt)
|
|
5362
|
-
}) :
|
|
5130
|
+
}) : arrow13.makeData({
|
|
5363
5131
|
type: listType,
|
|
5364
5132
|
...listData,
|
|
5365
5133
|
valueOffsets: Int32Array.from(valueOffsets)
|
|
5366
5134
|
});
|
|
5367
|
-
return
|
|
5135
|
+
return arrow13.makeVector(listDataValue);
|
|
5368
5136
|
}
|
|
5369
5137
|
function convertGeometryToUnionChildValue(geometry, targetDimension, geometryColumn) {
|
|
5370
5138
|
switch (geometry.type) {
|
|
@@ -5389,7 +5157,7 @@ function createUnionChildVector(geometryKind, values, targetDimension, geometryC
|
|
|
5389
5157
|
return createGeometryCollectionVector(values, targetDimension, geometryColumn, options, Math.max(geometryCollectionDepth - 1, 0), dimensionName);
|
|
5390
5158
|
}
|
|
5391
5159
|
const nativeValues = (options == null ? void 0 : options.coordinates) === "separated" ? values.map((value) => separateCoordinateValues(value, targetDimension, dimensionName)) : values;
|
|
5392
|
-
return
|
|
5160
|
+
return arrow13.vectorFromArray(nativeValues, getUnionChildType(geometryKind, targetDimension, options, geometryCollectionDepth, dimensionName));
|
|
5393
5161
|
}
|
|
5394
5162
|
function convertUnionValueToGeometry(value, geometryKind) {
|
|
5395
5163
|
if (value == null)
|
|
@@ -5446,7 +5214,7 @@ function getUnionBufferIndex(bufferLength, offset, rowIndex, useLogicalIndex) {
|
|
|
5446
5214
|
}
|
|
5447
5215
|
function getDenseUnionGeometryKind(vector, rowIndex) {
|
|
5448
5216
|
var _a;
|
|
5449
|
-
if (!(vector.type instanceof
|
|
5217
|
+
if (!(vector.type instanceof arrow13.DenseUnion)) {
|
|
5450
5218
|
throw new Error("GeoArrow geometry storage requires a DenseUnion vector.");
|
|
5451
5219
|
}
|
|
5452
5220
|
const { typeId } = getDenseUnionCellInfo(vector, rowIndex);
|
|
@@ -5494,7 +5262,7 @@ function getGeometryCollectionDepth(geometries) {
|
|
|
5494
5262
|
}
|
|
5495
5263
|
return maximumDepth;
|
|
5496
5264
|
}
|
|
5497
|
-
function
|
|
5265
|
+
function getUnionTypeId2(geometryKind, targetDimension, dimensionName = getDimensionName2(targetDimension)) {
|
|
5498
5266
|
const baseTypeId = getUnionBaseTypeId(geometryKind);
|
|
5499
5267
|
switch (dimensionName) {
|
|
5500
5268
|
case "xy":
|
|
@@ -5573,7 +5341,7 @@ function createConvertedField(field, type, targetEncoding, geometryTypes, option
|
|
|
5573
5341
|
extensionMetadata.geometry_types = [...effectiveGeometryTypes];
|
|
5574
5342
|
metadata.set("ARROW:extension:metadata", JSON.stringify(extensionMetadata));
|
|
5575
5343
|
}
|
|
5576
|
-
return new
|
|
5344
|
+
return new arrow13.Field(field.name, type, field.nullable, metadata);
|
|
5577
5345
|
}
|
|
5578
5346
|
function getPreservedFieldMetadata(sourceGeoColumnMetadata) {
|
|
5579
5347
|
if (!sourceGeoColumnMetadata)
|
|
@@ -5681,18 +5449,18 @@ function getTargetArrowType(targetEncoding, targetDimension, options, dimensionN
|
|
|
5681
5449
|
return coordinateType;
|
|
5682
5450
|
case "geoarrow.linestring":
|
|
5683
5451
|
case "geoarrow.multipoint":
|
|
5684
|
-
return createList(new
|
|
5452
|
+
return createList(new arrow13.Field("value", coordinateType, true));
|
|
5685
5453
|
case "geoarrow.polygon":
|
|
5686
5454
|
case "geoarrow.multilinestring":
|
|
5687
|
-
return createList(new
|
|
5455
|
+
return createList(new arrow13.Field("value", createList(new arrow13.Field("value", coordinateType, true)), true));
|
|
5688
5456
|
case "geoarrow.multipolygon":
|
|
5689
|
-
return createList(new
|
|
5457
|
+
return createList(new arrow13.Field("value", createList(new arrow13.Field("value", createList(new arrow13.Field("value", coordinateType, true)), true)), true));
|
|
5690
5458
|
case "geoarrow.box":
|
|
5691
|
-
return new
|
|
5459
|
+
return new arrow13.Struct(getBoxFieldNames3((options == null ? void 0 : options.dimension) || getDimensionName2(targetDimension)).map((name) => new arrow13.Field(name, new arrow13.Float64(), true)));
|
|
5692
5460
|
case "geoarrow.wkb":
|
|
5693
|
-
return new
|
|
5461
|
+
return new arrow13.Binary();
|
|
5694
5462
|
case "geoarrow.wkt":
|
|
5695
|
-
return new
|
|
5463
|
+
return new arrow13.Utf8();
|
|
5696
5464
|
default:
|
|
5697
5465
|
throw new Error(`Unsupported GeoArrow target encoding "${targetEncoding}".`);
|
|
5698
5466
|
}
|
|
@@ -5716,9 +5484,9 @@ function canReuseGeoArrowVector(column, encoding, options) {
|
|
|
5716
5484
|
return true;
|
|
5717
5485
|
}
|
|
5718
5486
|
function getCoordinateLayout(type) {
|
|
5719
|
-
if (type instanceof
|
|
5487
|
+
if (type instanceof arrow13.FixedSizeList)
|
|
5720
5488
|
return "interleaved";
|
|
5721
|
-
if (type instanceof
|
|
5489
|
+
if (type instanceof arrow13.Struct) {
|
|
5722
5490
|
const names = type.children.map((child) => child.name);
|
|
5723
5491
|
if (names[0] === "x" && names[1] === "y")
|
|
5724
5492
|
return "separated";
|
|
@@ -5729,10 +5497,10 @@ function getCoordinateLayout(type) {
|
|
|
5729
5497
|
}
|
|
5730
5498
|
return null;
|
|
5731
5499
|
}
|
|
5732
|
-
if (type instanceof
|
|
5500
|
+
if (type instanceof arrow13.List || type instanceof arrow13.LargeList) {
|
|
5733
5501
|
return getCoordinateLayout(type.children[0].type);
|
|
5734
5502
|
}
|
|
5735
|
-
if (type instanceof
|
|
5503
|
+
if (type instanceof arrow13.DenseUnion) {
|
|
5736
5504
|
for (const child of type.children) {
|
|
5737
5505
|
const layout = getCoordinateLayout(child.type);
|
|
5738
5506
|
if (layout)
|
|
@@ -5742,18 +5510,18 @@ function getCoordinateLayout(type) {
|
|
|
5742
5510
|
return null;
|
|
5743
5511
|
}
|
|
5744
5512
|
function getVectorOffsetType(type) {
|
|
5745
|
-
if (type instanceof
|
|
5513
|
+
if (type instanceof arrow13.List)
|
|
5746
5514
|
return "int32";
|
|
5747
|
-
if (type instanceof
|
|
5515
|
+
if (type instanceof arrow13.LargeList)
|
|
5748
5516
|
return "int64";
|
|
5749
|
-
if (type instanceof
|
|
5517
|
+
if (type instanceof arrow13.Struct) {
|
|
5750
5518
|
for (const child of type.children) {
|
|
5751
5519
|
const offsetType = getVectorOffsetType(child.type);
|
|
5752
5520
|
if (offsetType)
|
|
5753
5521
|
return offsetType;
|
|
5754
5522
|
}
|
|
5755
5523
|
}
|
|
5756
|
-
if (type instanceof
|
|
5524
|
+
if (type instanceof arrow13.DenseUnion) {
|
|
5757
5525
|
for (const child of type.children) {
|
|
5758
5526
|
const offsetType = getVectorOffsetType(child.type);
|
|
5759
5527
|
if (offsetType)
|
|
@@ -5837,10 +5605,10 @@ function buildGeometryUnionType(targetDimension, allowGeometryCollections, optio
|
|
|
5837
5605
|
if (allowGeometryCollections && geometryCollectionDepth > 0) {
|
|
5838
5606
|
geometryKinds.push("GeometryCollection");
|
|
5839
5607
|
}
|
|
5840
|
-
return new
|
|
5608
|
+
return new arrow13.DenseUnion(geometryKinds.map((geometryKind) => getUnionTypeId2(geometryKind, targetDimension, dimensionName)), geometryKinds.map((geometryKind) => new arrow13.Field(getUnionFieldName(geometryKind, targetDimension, dimensionName), getUnionChildType(geometryKind, targetDimension, options, geometryCollectionDepth, dimensionName), true)));
|
|
5841
5609
|
}
|
|
5842
5610
|
function buildGeometryCollectionType(targetDimension, options, geometryCollectionDepth = 0, dimensionName = getDimensionName2(targetDimension)) {
|
|
5843
|
-
return createListType(new
|
|
5611
|
+
return createListType(new arrow13.Field("geometries", buildGeometryUnionType(targetDimension, geometryCollectionDepth > 0, options, geometryCollectionDepth, dimensionName), true), options == null ? void 0 : options.offsetType);
|
|
5844
5612
|
}
|
|
5845
5613
|
function getUnionBaseTypeId(geometryKind) {
|
|
5846
5614
|
switch (geometryKind) {
|
|
@@ -5933,13 +5701,13 @@ function getBoxFieldNames3(dimension) {
|
|
|
5933
5701
|
}
|
|
5934
5702
|
function getCoordinateType(targetDimension, coordinates = "interleaved", dimensionName = getDimensionName2(targetDimension)) {
|
|
5935
5703
|
if (coordinates === "interleaved") {
|
|
5936
|
-
return new
|
|
5704
|
+
return new arrow13.FixedSizeList(targetDimension, new arrow13.Field("value", new arrow13.Float64(), true));
|
|
5937
5705
|
}
|
|
5938
5706
|
const coordinateNames = dimensionName === "xy" ? ["x", "y"] : dimensionName === "xyz" ? ["x", "y", "z"] : dimensionName === "xym" ? ["x", "y", "m"] : ["x", "y", "z", "m"];
|
|
5939
|
-
return new
|
|
5707
|
+
return new arrow13.Struct(coordinateNames.map((name) => new arrow13.Field(name, new arrow13.Float64(), true)));
|
|
5940
5708
|
}
|
|
5941
5709
|
function createListType(field, offsetType = "int32") {
|
|
5942
|
-
return offsetType === "int64" ? new
|
|
5710
|
+
return offsetType === "int64" ? new arrow13.LargeList(field) : new arrow13.List(field);
|
|
5943
5711
|
}
|
|
5944
5712
|
function createOffsetArray(offsets, offsetType = "int32") {
|
|
5945
5713
|
return offsetType === "int64" ? BigInt64Array.from(offsets, BigInt) : Int32Array.from(offsets);
|
|
@@ -6036,18 +5804,18 @@ function padPosition(position, targetDimension) {
|
|
|
6036
5804
|
}
|
|
6037
5805
|
|
|
6038
5806
|
// dist/geoarrow/geoarrow-bounds.js
|
|
6039
|
-
var
|
|
6040
|
-
var
|
|
6041
|
-
var
|
|
5807
|
+
var import_arrow10 = require("@math.gl/core/arrow");
|
|
5808
|
+
var import_arrow11 = require("@math.gl/core/arrow");
|
|
5809
|
+
var import_arrow12 = require("@math.gl/core/arrow");
|
|
6042
5810
|
|
|
6043
5811
|
// dist/geoarrow/binary-polygon-to-geoarrow.js
|
|
6044
|
-
var
|
|
5812
|
+
var import_arrow9 = require("@math.gl/core/arrow");
|
|
6045
5813
|
function makeGeoArrowColumnFromBinaryPolygon(geometry, options) {
|
|
6046
5814
|
const { dimension } = options;
|
|
6047
5815
|
if (!["xy", "xyz", "xym", "xyzm"].includes(dimension)) {
|
|
6048
5816
|
throw new Error("Binary polygon dimension must be xy, xyz, xym, or xyzm.");
|
|
6049
5817
|
}
|
|
6050
|
-
const coordinateSize = (0,
|
|
5818
|
+
const coordinateSize = (0, import_arrow9.getGeoArrowDimensionSize)(dimension);
|
|
6051
5819
|
const positions = geometry.positions.value;
|
|
6052
5820
|
if (!(positions instanceof Float32Array || positions instanceof Float64Array) || geometry.positions.size !== coordinateSize || positions.length % coordinateSize !== 0) {
|
|
6053
5821
|
throw new Error("Binary polygon positions must be floating-point tuples matching dimension.");
|
|
@@ -6116,7 +5884,7 @@ function getGeoArrowRowBounds(column, encodingOrOptions) {
|
|
|
6116
5884
|
if (typeof encodingOrOptions === "string") {
|
|
6117
5885
|
throw new Error("Binary polygon bounds require an explicit dimension option.");
|
|
6118
5886
|
}
|
|
6119
|
-
return (0,
|
|
5887
|
+
return (0, import_arrow12.getGeoArrowRowBounds)(makeGeoArrowColumnFromBinaryPolygon(column, encodingOrOptions));
|
|
6120
5888
|
}
|
|
6121
5889
|
if (typeof encodingOrOptions !== "string") {
|
|
6122
5890
|
throw new Error("Arrow vector bounds require a GeoArrow encoding.");
|
|
@@ -6125,7 +5893,7 @@ function getGeoArrowRowBounds(column, encodingOrOptions) {
|
|
|
6125
5893
|
if (encoding !== "geoarrow.wkb" && encoding !== "geoarrow.wkt") {
|
|
6126
5894
|
const names = encoding === "geoarrow.box" ? column.type.children.map((field) => field.name) : [];
|
|
6127
5895
|
const dimension = encoding === "geoarrow.box" ? names.includes("zmin") ? names.includes("mmin") ? "xyzm" : "xyz" : names.includes("mmin") ? "xym" : "xy" : void 0;
|
|
6128
|
-
return (0,
|
|
5896
|
+
return (0, import_arrow12.getGeoArrowRowBounds)((0, import_arrow11.makeGeoArrowColumnFromArrowVector)(column, { encoding, dimension }));
|
|
6129
5897
|
}
|
|
6130
5898
|
const bounds = [];
|
|
6131
5899
|
for (let rowIndex = 0; rowIndex < column.length; rowIndex++) {
|
|
@@ -6138,7 +5906,7 @@ function getGeoArrowBounds(value, encoding) {
|
|
|
6138
5906
|
return null;
|
|
6139
5907
|
if (encoding === "geoarrow.wkb") {
|
|
6140
5908
|
const bytes = value;
|
|
6141
|
-
const statistics = (0,
|
|
5909
|
+
const statistics = (0, import_arrow10.scanWKB)(bytes);
|
|
6142
5910
|
return statistics.bounds ? [
|
|
6143
5911
|
statistics.bounds.xmin,
|
|
6144
5912
|
statistics.bounds.ymin,
|
|
@@ -6166,7 +5934,7 @@ function visitCoordinates(value, bounds) {
|
|
|
6166
5934
|
updateBounds2(bounds, coordinate[0], coordinate[1]);
|
|
6167
5935
|
return;
|
|
6168
5936
|
}
|
|
6169
|
-
if (
|
|
5937
|
+
if (isVectorLike3(value)) {
|
|
6170
5938
|
for (let index = 0; index < value.length; index++)
|
|
6171
5939
|
visitCoordinates(value.get(index), bounds);
|
|
6172
5940
|
return;
|
|
@@ -6196,7 +5964,7 @@ function isBoxValue(value) {
|
|
|
6196
5964
|
function getNumericCoordinate(value) {
|
|
6197
5965
|
return typeof value[0] === "number" && typeof value[1] === "number" ? [value[0], value[1]] : null;
|
|
6198
5966
|
}
|
|
6199
|
-
function
|
|
5967
|
+
function isVectorLike3(value) {
|
|
6200
5968
|
return Boolean(value && typeof value.length === "number" && typeof value.get === "function");
|
|
6201
5969
|
}
|
|
6202
5970
|
function updateBounds2(bounds, x, y) {
|
|
@@ -6693,18 +6461,18 @@ var ClusterSource = class extends DataSource {
|
|
|
6693
6461
|
super(data, {});
|
|
6694
6462
|
const positions = [];
|
|
6695
6463
|
const rowIndices = [];
|
|
6696
|
-
if (
|
|
6697
|
-
const columns = getGeometryColumnsFromSchema(data.
|
|
6464
|
+
if (!("shape" in data)) {
|
|
6465
|
+
const columns = getGeometryColumnsFromSchema(data.schema);
|
|
6698
6466
|
const columnNames = Object.keys(columns);
|
|
6699
6467
|
this.geometryColumn = options.geometryColumn ?? (columnNames.length === 1 ? columnNames[0] : void 0);
|
|
6700
6468
|
this.geometryEncoding = this.geometryColumn ? (_a = columns[this.geometryColumn]) == null ? void 0 : _a.encoding : void 0;
|
|
6701
|
-
if (!this.geometryColumn || !this.geometryEncoding || !data.
|
|
6469
|
+
if (!this.geometryColumn || !this.geometryEncoding || !data.getChild(this.geometryColumn)) {
|
|
6702
6470
|
throw new Error("ClusterSource requires an explicitly identified GeoArrow geometry column");
|
|
6703
6471
|
}
|
|
6704
6472
|
}
|
|
6705
|
-
const geometryVector =
|
|
6473
|
+
const geometryVector = !("shape" in data) ? data.getChild(this.geometryColumn) : null;
|
|
6706
6474
|
const pointBounds = geometryVector && this.geometryEncoding === "geoarrow.point" && !options.getClusterPosition ? getGeoArrowRowBounds(geometryVector, this.geometryEncoding) : null;
|
|
6707
|
-
const rowCount =
|
|
6475
|
+
const rowCount = !("shape" in data) ? data.numRows : data.features.length;
|
|
6708
6476
|
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
6709
6477
|
let position;
|
|
6710
6478
|
if (pointBounds) {
|
|
@@ -6724,10 +6492,10 @@ var ClusterSource = class extends DataSource {
|
|
|
6724
6492
|
if (["cluster", "clusterId", "pointCount", "rowIndex", "geometry"].includes(name)) {
|
|
6725
6493
|
throw new Error(`Reserved cluster property: ${name}`);
|
|
6726
6494
|
}
|
|
6727
|
-
const column =
|
|
6495
|
+
const column = !("shape" in data) ? data.getChild(aggregation.column) : null;
|
|
6728
6496
|
const values = rowIndices.map((rowIndex) => {
|
|
6729
6497
|
var _a2;
|
|
6730
|
-
const value =
|
|
6498
|
+
const value = !("shape" in data) ? column == null ? void 0 : column.get(rowIndex) : (_a2 = data.features[rowIndex].properties) == null ? void 0 : _a2[aggregation.column];
|
|
6731
6499
|
if (typeof value !== "number" || !Number.isFinite(value))
|
|
6732
6500
|
throw new Error(`Cluster aggregation ${name} requires finite numeric values`);
|
|
6733
6501
|
return value;
|
|
@@ -6801,27 +6569,24 @@ var ClusterSource = class extends DataSource {
|
|
|
6801
6569
|
const table = builder.finishTable();
|
|
6802
6570
|
const preference = (_b = parameters.geoarrow) == null ? void 0 : _b.encodingPreference;
|
|
6803
6571
|
if (preference && preference !== "geoarrow.wkb") {
|
|
6804
|
-
return
|
|
6805
|
-
shape: "arrow-table",
|
|
6806
|
-
data: convertGeoArrowGeometry(table.data, preference === "optimized" ? "geoarrow.point" : "geoarrow.geometry")
|
|
6807
|
-
};
|
|
6572
|
+
return convertGeoArrowGeometry(table, preference === "optimized" ? "geoarrow.point" : "geoarrow.geometry");
|
|
6808
6573
|
}
|
|
6809
6574
|
return table;
|
|
6810
6575
|
}
|
|
6811
6576
|
/** Retrieves a member's original geometry and properties; Arrow rows are materialized on demand. */
|
|
6812
6577
|
getFeature(rowIndex) {
|
|
6813
|
-
const rowCount = this.data
|
|
6578
|
+
const rowCount = !("shape" in this.data) ? this.data.numRows : this.data.features.length;
|
|
6814
6579
|
if (!Number.isInteger(rowIndex) || rowIndex < 0 || rowIndex >= rowCount)
|
|
6815
6580
|
throw new Error("Invalid cluster source row");
|
|
6816
|
-
if (this.data
|
|
6581
|
+
if ("shape" in this.data)
|
|
6817
6582
|
return this.data.features[rowIndex];
|
|
6818
|
-
const properties = { ...this.data.
|
|
6583
|
+
const properties = { ...this.data.get(rowIndex).toJSON() };
|
|
6819
6584
|
delete properties[this.geometryColumn];
|
|
6820
6585
|
return { type: "Feature", geometry: this.getGeometry(rowIndex), properties };
|
|
6821
6586
|
}
|
|
6822
6587
|
/** Decodes one geometry only when extraction or member retrieval needs it. */
|
|
6823
6588
|
getGeometry(rowIndex) {
|
|
6824
|
-
return this.data
|
|
6589
|
+
return "shape" in this.data ? this.data.features[rowIndex].geometry : convertGeoArrowVectorCellToGeoJSON(this.data.getChild(this.geometryColumn), rowIndex, this.geometryEncoding);
|
|
6825
6590
|
}
|
|
6826
6591
|
};
|
|
6827
6592
|
function createClusterFeature(node) {
|