@loaders.gl/core 5.0.0-alpha.9 → 5.0.0-beta.2
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 +97 -0
- package/LICENSE +2 -30
- package/README.md +8 -1
- package/SCAN-README.md +224 -0
- package/SCHEMA-README.md +9 -0
- package/SCHEMA-UTILS-README.md +11 -0
- package/THIRD-PARTY-NOTICES.md +39 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs +477 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs.map +7 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts +29 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts.map +1 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js +434 -0
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js.map +1 -0
- package/dist/arrow-geometry/binary-features.cjs +318 -0
- package/dist/arrow-geometry/binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/binary-features.d.ts +44 -0
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/binary-features.js +300 -0
- package/dist/arrow-geometry/binary-features.js.map +1 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +199 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +7 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.d.ts +28 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.d.ts.map +1 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +170 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs +134 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +7 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +23 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.js +124 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -0
- package/dist/arrow-geometry/feature-table.cjs +698 -0
- package/dist/arrow-geometry/feature-table.cjs.map +7 -0
- package/dist/arrow-geometry/feature-table.d.ts +51 -0
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -0
- package/dist/arrow-geometry/feature-table.js +688 -0
- package/dist/arrow-geometry/feature-table.js.map +1 -0
- package/dist/arrow-geometry/geoarrow-builder.cjs +575 -0
- package/dist/arrow-geometry/geoarrow-builder.cjs.map +7 -0
- package/dist/arrow-geometry/geoarrow-builder.d.ts +179 -0
- package/dist/arrow-geometry/geoarrow-builder.d.ts.map +1 -0
- package/dist/arrow-geometry/geoarrow-builder.js +545 -0
- package/dist/arrow-geometry/geoarrow-builder.js.map +1 -0
- package/dist/arrow-geometry/geoarrow-union-kind.cjs +59 -0
- package/dist/arrow-geometry/geoarrow-union-kind.cjs.map +7 -0
- package/dist/arrow-geometry/geoarrow-union-kind.d.ts +5 -0
- package/dist/arrow-geometry/geoarrow-union-kind.d.ts.map +1 -0
- package/dist/arrow-geometry/geoarrow-union-kind.js +42 -0
- package/dist/arrow-geometry/geoarrow-union-kind.js.map +1 -0
- package/dist/arrow-geometry/geojson-table.cjs +135 -0
- package/dist/arrow-geometry/geojson-table.cjs.map +7 -0
- package/dist/arrow-geometry/geojson-table.d.ts +11 -0
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -0
- package/dist/arrow-geometry/geojson-table.js +122 -0
- package/dist/arrow-geometry/geojson-table.js.map +1 -0
- package/dist/arrow-geometry/geometry-codecs.cjs +139 -0
- package/dist/arrow-geometry/geometry-codecs.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-codecs.d.ts +31 -0
- package/dist/arrow-geometry/geometry-codecs.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-codecs.js +130 -0
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -0
- package/dist/arrow-geometry/geometry-field.cjs +229 -0
- package/dist/arrow-geometry/geometry-field.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-field.d.ts +116 -0
- package/dist/arrow-geometry/geometry-field.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-field.js +251 -0
- package/dist/arrow-geometry/geometry-field.js.map +1 -0
- package/dist/arrow-geometry/geometry-to-wkt.cjs +96 -0
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-to-wkt.d.ts +13 -0
- package/dist/arrow-geometry/geometry-to-wkt.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-to-wkt.js +102 -0
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -0
- package/dist/arrow-geometry/geometry-utils.cjs +46 -0
- package/dist/arrow-geometry/geometry-utils.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-utils.d.ts +4 -0
- package/dist/arrow-geometry/geometry-utils.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-utils.js +25 -0
- package/dist/arrow-geometry/geometry-utils.js.map +1 -0
- package/dist/arrow-geometry/index.cjs +48 -0
- package/dist/arrow-geometry/index.cjs.map +7 -0
- package/dist/arrow-geometry/index.d.ts +5 -0
- package/dist/arrow-geometry/index.d.ts.map +1 -0
- package/dist/arrow-geometry/index.js +8 -0
- package/dist/arrow-geometry/index.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +319 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.d.ts +38 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +382 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.cjs +44 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.d.ts +23 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.js +25 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs +112 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.d.ts +19 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js +128 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.cjs +19 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.d.ts +58 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.js +5 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.cjs +113 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.d.ts +31 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.js +96 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.cjs +69 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.d.ts +18 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.js +57 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary.cjs +47 -0
- package/dist/arrow-geometry/legacy-binary.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary.d.ts +11 -0
- package/dist/arrow-geometry/legacy-binary.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary.js +14 -0
- package/dist/arrow-geometry/legacy-binary.js.map +1 -0
- package/dist/arrow-geometry/native-geometry.cjs +215 -0
- package/dist/arrow-geometry/native-geometry.cjs.map +7 -0
- package/dist/arrow-geometry/native-geometry.d.ts +41 -0
- package/dist/arrow-geometry/native-geometry.d.ts.map +1 -0
- package/dist/arrow-geometry/native-geometry.js +224 -0
- package/dist/arrow-geometry/native-geometry.js.map +1 -0
- package/dist/arrow-geometry/sampled-bounds.cjs +52 -0
- package/dist/arrow-geometry/sampled-bounds.cjs.map +7 -0
- package/dist/arrow-geometry/sampled-bounds.d.ts +11 -0
- package/dist/arrow-geometry/sampled-bounds.d.ts.map +1 -0
- package/dist/arrow-geometry/sampled-bounds.js +35 -0
- package/dist/arrow-geometry/sampled-bounds.js.map +1 -0
- package/dist/arrow-geometry/triangulate-wkb.cjs +722 -0
- package/dist/arrow-geometry/triangulate-wkb.cjs.map +7 -0
- package/dist/arrow-geometry/triangulate-wkb.d.ts +7 -0
- package/dist/arrow-geometry/triangulate-wkb.d.ts.map +1 -0
- package/dist/arrow-geometry/triangulate-wkb.js +938 -0
- package/dist/arrow-geometry/triangulate-wkb.js.map +1 -0
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +142 -0
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +63 -0
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-arrow-utils.js +129 -0
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -0
- package/dist/arrow-geometry/wkb-builder.cjs +167 -0
- package/dist/arrow-geometry/wkb-builder.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-builder.d.ts +81 -0
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-builder.js +156 -0
- package/dist/arrow-geometry/wkb-builder.js.map +1 -0
- package/dist/arrow-geometry/wkb-statistics.cjs +52 -0
- package/dist/arrow-geometry/wkb-statistics.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-statistics.d.ts +34 -0
- package/dist/arrow-geometry/wkb-statistics.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-statistics.js +33 -0
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -0
- package/dist/arrow-geometry/wkb-table.cjs +65 -0
- package/dist/arrow-geometry/wkb-table.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-table.d.ts +6 -0
- package/dist/arrow-geometry/wkb-table.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-table.js +44 -0
- package/dist/arrow-geometry/wkb-table.js.map +1 -0
- package/dist/arrow-geometry/wkb-types.cjs +49 -0
- package/dist/arrow-geometry/wkb-types.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-types.d.ts +17 -0
- package/dist/arrow-geometry/wkb-types.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-types.js +21 -0
- package/dist/arrow-geometry/wkb-types.js.map +1 -0
- package/dist/cluster-source.cjs +7228 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/constants/index.cjs +39 -0
- package/dist/constants/index.cjs.map +6 -0
- package/dist/constants/index.d.ts +17 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +20 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/dist.dev.js +1382 -451
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2677 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +97 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +22 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +94 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -0
- package/dist/geoarrow/clustering/cluster-index.cjs +365 -0
- package/dist/geoarrow/clustering/cluster-index.cjs.map +7 -0
- package/dist/geoarrow/clustering/cluster-index.d.ts +96 -0
- package/dist/geoarrow/clustering/cluster-index.d.ts.map +1 -0
- package/dist/geoarrow/clustering/cluster-index.js +374 -0
- package/dist/geoarrow/clustering/cluster-index.js.map +1 -0
- package/dist/geoarrow/clustering/cluster-source.cjs +206 -0
- package/dist/geoarrow/clustering/cluster-source.cjs.map +7 -0
- package/dist/geoarrow/clustering/cluster-source.d.ts +64 -0
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -0
- package/dist/geoarrow/clustering/cluster-source.js +200 -0
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -0
- package/dist/geoarrow/clustering/get-representative-point.cjs +176 -0
- package/dist/geoarrow/clustering/get-representative-point.cjs.map +7 -0
- package/dist/geoarrow/clustering/get-representative-point.d.ts +14 -0
- package/dist/geoarrow/clustering/get-representative-point.d.ts.map +1 -0
- package/dist/geoarrow/clustering/get-representative-point.js +172 -0
- package/dist/geoarrow/clustering/get-representative-point.js.map +1 -0
- package/dist/geoarrow/compatibility.cjs +94 -0
- package/dist/geoarrow/compatibility.cjs.map +7 -0
- package/dist/geoarrow/compatibility.d.ts +19 -0
- package/dist/geoarrow/compatibility.d.ts.map +1 -0
- package/dist/geoarrow/compatibility.js +17 -0
- package/dist/geoarrow/compatibility.js.map +1 -0
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +184 -0
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +36 -0
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/convert-table-to-geoarrow.js +177 -0
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -0
- package/dist/geoarrow/deprecated.cjs +68 -0
- package/dist/geoarrow/deprecated.cjs.map +7 -0
- package/dist/geoarrow/deprecated.d.ts +34 -0
- package/dist/geoarrow/deprecated.d.ts.map +1 -0
- package/dist/geoarrow/deprecated.js +37 -0
- package/dist/geoarrow/deprecated.js.map +1 -0
- package/dist/geoarrow/geo-column/geo-column-info.cjs +19 -0
- package/dist/geoarrow/geo-column/geo-column-info.cjs.map +7 -0
- package/dist/geoarrow/geo-column/geo-column-info.d.ts +20 -0
- package/dist/geoarrow/geo-column/geo-column-info.d.ts.map +1 -0
- package/dist/geoarrow/geo-column/geo-column-info.js +75 -0
- package/dist/geoarrow/geo-column/geo-column-info.js.map +1 -0
- package/dist/geoarrow/geo-column/geo-column.cjs +19 -0
- package/dist/geoarrow/geo-column/geo-column.cjs.map +7 -0
- package/dist/geoarrow/geo-column/geo-column.d.ts +61 -0
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -0
- package/dist/geoarrow/geo-column/geo-column.js +5 -0
- package/dist/geoarrow/geo-column/geo-column.js.map +1 -0
- package/dist/geoarrow/geoarrow-bounds.cjs +133 -0
- package/dist/geoarrow/geoarrow-bounds.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-bounds.d.ts +27 -0
- package/dist/geoarrow/geoarrow-bounds.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-bounds.js +136 -0
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -0
- package/dist/geoarrow/geoarrow-builder.cjs +31 -0
- package/dist/geoarrow/geoarrow-builder.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-builder.d.ts +3 -0
- package/dist/geoarrow/geoarrow-builder.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-builder.js +5 -0
- package/dist/geoarrow/geoarrow-builder.js.map +1 -0
- package/dist/geoarrow/geoarrow-capabilities.cjs +443 -0
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-capabilities.d.ts +62 -0
- package/dist/geoarrow/geoarrow-capabilities.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-capabilities.js +444 -0
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -0
- package/dist/geoarrow/geoarrow-conformance.cjs +151 -0
- package/dist/geoarrow/geoarrow-conformance.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-conformance.d.ts +49 -0
- package/dist/geoarrow/geoarrow-conformance.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-conformance.js +129 -0
- package/dist/geoarrow/geoarrow-conformance.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +1364 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts +66 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +1481 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +56 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +17 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +38 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +93 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +24 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +68 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.cjs +71 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.d.ts +20 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.js +47 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.js.map +1 -0
- package/dist/geoarrow/geoarrow-functions.cjs +148 -0
- package/dist/geoarrow/geoarrow-functions.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-functions.d.ts +127 -0
- package/dist/geoarrow/geoarrow-functions.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-functions.js +240 -0
- package/dist/geoarrow/geoarrow-functions.js.map +1 -0
- package/dist/geoarrow/geoarrow-inspection.cjs +238 -0
- package/dist/geoarrow/geoarrow-inspection.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-inspection.d.ts +28 -0
- package/dist/geoarrow/geoarrow-inspection.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-inspection.js +249 -0
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -0
- package/dist/geoarrow/geoarrow-layout.cjs +558 -0
- package/dist/geoarrow/geoarrow-layout.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-layout.d.ts +95 -0
- package/dist/geoarrow/geoarrow-layout.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-layout.js +605 -0
- package/dist/geoarrow/geoarrow-layout.js.map +1 -0
- package/dist/geoarrow/geoarrow-resource-limits.cjs +78 -0
- package/dist/geoarrow/geoarrow-resource-limits.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-resource-limits.d.ts +23 -0
- package/dist/geoarrow/geoarrow-resource-limits.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-resource-limits.js +70 -0
- package/dist/geoarrow/geoarrow-resource-limits.js.map +1 -0
- package/dist/geoarrow/geoarrow-spatial-index.cjs +199 -0
- package/dist/geoarrow/geoarrow-spatial-index.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-spatial-index.d.ts +51 -0
- package/dist/geoarrow/geoarrow-spatial-index.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-spatial-index.js +194 -0
- package/dist/geoarrow/geoarrow-spatial-index.js.map +1 -0
- package/dist/geoarrow/geoarrow-stream.cjs +274 -0
- package/dist/geoarrow/geoarrow-stream.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-stream.d.ts +22 -0
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-stream.js +259 -0
- package/dist/geoarrow/geoarrow-stream.js.map +1 -0
- package/dist/geoarrow/geoarrow-types.cjs +19 -0
- package/dist/geoarrow/geoarrow-types.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-types.d.ts +50 -0
- package/dist/geoarrow/geoarrow-types.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-types.js +5 -0
- package/dist/geoarrow/geoarrow-types.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.cjs +110 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.d.ts +37 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.js +114 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs +31 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +2 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.js +5 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +177 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.d.ts +18 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.js +181 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -0
- package/dist/geoarrow/index.cjs +252 -0
- package/dist/geoarrow/index.cjs.map +7 -0
- package/dist/geoarrow/index.d.ts +58 -0
- package/dist/geoarrow/index.d.ts.map +1 -0
- package/dist/geoarrow/index.js +40 -0
- package/dist/geoarrow/index.js.map +1 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs +39 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs.map +7 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts +2 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts.map +1 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js +5 -0
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js.map +1 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.cjs +67 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.cjs.map +7 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.d.ts +21 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.d.ts.map +1 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.js +49 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs +450 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.d.ts +21 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +405 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.cjs +117 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.d.ts +16 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.js +116 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +1127 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts +86 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +882 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.cjs +156 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.d.ts +26 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.js +119 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.cjs +74 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.d.ts +32 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.js +53 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.js.map +1 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +31 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +7 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +2 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +2 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.cjs +115 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.d.ts +4 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.js +102 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.cjs +158 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.d.ts +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.js +139 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.cjs +126 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.d.ts +10 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.js +123 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +94 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.d.ts +8 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +82 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +109 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.d.ts +37 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +103 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.cjs +67 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.d.ts +64 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.js +47 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.js.map +1 -0
- package/dist/geoarrow/lib/geometry-predicates.cjs +133 -0
- package/dist/geoarrow/lib/geometry-predicates.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-predicates.d.ts +7 -0
- package/dist/geoarrow/lib/geometry-predicates.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-predicates.js +138 -0
- package/dist/geoarrow/lib/geometry-predicates.js.map +1 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs +589 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts +48 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js +618 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +255 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.d.ts +12 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +257 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +290 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +16 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +334 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +1 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +102 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +8 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +90 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +98 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +7 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +9 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +76 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.cjs +34 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.d.ts +6 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.js +11 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.js.map +1 -0
- package/dist/geoarrow/map-geoarrow-coordinates.cjs +228 -0
- package/dist/geoarrow/map-geoarrow-coordinates.cjs.map +7 -0
- package/dist/geoarrow/map-geoarrow-coordinates.d.ts +16 -0
- package/dist/geoarrow/map-geoarrow-coordinates.d.ts.map +1 -0
- package/dist/geoarrow/map-geoarrow-coordinates.js +182 -0
- package/dist/geoarrow/map-geoarrow-coordinates.js.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +87 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +40 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs +73 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.js +32 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.cjs +49 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.d.ts +5 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.js +32 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.js.map +1 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs +74 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +13 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.js +49 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.js.map +1 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs +47 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +8 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.js +19 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.js.map +1 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +93 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts +15 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.js +82 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.cjs +90 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.d.ts +79 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.js +70 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.js.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.cjs +39 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.d.ts +3 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.js +5 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.cjs +244 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.d.ts +63 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.js +243 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/metadata-utils.cjs +33 -0
- package/dist/geoarrow/metadata/metadata-utils.cjs.map +7 -0
- package/dist/geoarrow/metadata/metadata-utils.d.ts +3 -0
- package/dist/geoarrow/metadata/metadata-utils.d.ts.map +1 -0
- package/dist/geoarrow/metadata/metadata-utils.js +5 -0
- package/dist/geoarrow/metadata/metadata-utils.js.map +1 -0
- package/dist/geoarrow/rewind-geoarrow.cjs +219 -0
- package/dist/geoarrow/rewind-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/rewind-geoarrow.d.ts +23 -0
- package/dist/geoarrow/rewind-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/rewind-geoarrow.js +204 -0
- package/dist/geoarrow/rewind-geoarrow.js.map +1 -0
- package/dist/index.cjs +339 -1091
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/iterators/make-iterator/make-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js.map +1 -1
- package/dist/lib/api/core-api.d.ts +1 -1
- package/dist/lib/api/core-api.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +1 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +1 -1
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode-table.d.ts +2 -2
- package/dist/lib/api/encode-table.d.ts.map +1 -1
- package/dist/lib/api/encode-table.js +1 -1
- package/dist/lib/api/encode-table.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 +2 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +1 -1
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -1
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +112 -0
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +1 -1
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +4 -2
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +44 -7
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +1 -1
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +7 -5
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/preload.d.ts +6 -3
- package/dist/lib/api/preload.d.ts.map +1 -1
- package/dist/lib/api/preload.js +4 -5
- package/dist/lib/api/preload.js.map +1 -1
- package/dist/lib/api/register-loaders.d.ts +1 -1
- package/dist/lib/api/register-loaders.d.ts.map +1 -1
- package/dist/lib/api/select-loader.d.ts +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +1 -1
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.d.ts.map +1 -1
- package/dist/lib/fetch/fetch-file.js +2 -2
- package/dist/lib/fetch/fetch-file.js.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.js +1 -1
- package/dist/lib/filesystems/browser-filesystem.js.map +1 -1
- package/dist/lib/init.js +2 -2
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-data.d.ts +1 -1
- package/dist/lib/loader-utils/get-data.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-data.js +1 -1
- package/dist/lib/loader-utils/get-data.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +4 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts.map +1 -1
- package/dist/lib/loader-utils/loader-context.js +7 -1
- package/dist/lib/loader-utils/loader-context.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +1 -1
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +1 -1
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.js +1 -1
- package/dist/lib/loader-utils/normalize-loader.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +3 -1
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +2 -2
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/lib/utils/resource-utils.js +1 -1
- package/dist/lib/utils/resource-utils.js.map +1 -1
- package/dist/lib/utils/response-utils.js +1 -1
- package/dist/lib/utils/response-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +32 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -0
- package/dist/loader-utils/format-types.js +5 -0
- package/dist/loader-utils/format-types.js.map +1 -0
- package/dist/loader-utils/index.cjs +11476 -0
- package/dist/loader-utils/index.cjs.map +6 -0
- package/dist/loader-utils/index.d.ts +124 -0
- package/dist/loader-utils/index.d.ts.map +1 -0
- package/dist/loader-utils/index.js +92 -0
- package/dist/loader-utils/index.js.map +1 -0
- package/dist/loader-utils/json-loader.d.ts +27 -0
- package/dist/loader-utils/json-loader.d.ts.map +1 -0
- package/dist/loader-utils/json-loader.js +32 -0
- package/dist/loader-utils/json-loader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts +32 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js +88 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts +67 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js +245 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts +43 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js +92 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts +3 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js +15 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts +17 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js +43 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts +15 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js +51 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts +20 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js +82 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts +25 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js +59 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts +31 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js +20 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts +6 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.js +13 -0
- package/dist/loader-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts +15 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.js +28 -0
- package/dist/loader-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +40 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js +68 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +54 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +102 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +45 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +13 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +57 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js +114 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts +21 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js +36 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts +19 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.js +39 -0
- package/dist/loader-utils/lib/files/blob-file.js.map +1 -0
- package/dist/loader-utils/lib/files/file.d.ts +33 -0
- package/dist/loader-utils/lib/files/file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/file.js +5 -0
- package/dist/loader-utils/lib/files/file.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +37 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.js +290 -0
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts +49 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.js +5 -0
- package/dist/loader-utils/lib/files/http-file-types.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file.d.ts +55 -0
- package/dist/loader-utils/lib/files/http-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file.js +213 -0
- package/dist/loader-utils/lib/files/http-file.js.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts +22 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.js +45 -0
- package/dist/loader-utils/lib/files/node-file-facade.js.map +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/sources.js +155 -0
- package/dist/loader-utils/lib/files/sources.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts +33 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js +5 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts +23 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js +48 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts +20 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js +102 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts +19 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js +60 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts +59 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js +68 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts +118 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js +427 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts +204 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js +4226 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts +40 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js +1518 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +4 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.js +21 -0
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts +10 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js +44 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts +18 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js +40 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.js +20 -0
- package/dist/loader-utils/lib/node/buffer.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.js +35 -0
- package/dist/loader-utils/lib/node/buffer.js.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.js +5 -0
- package/dist/loader-utils/lib/node/fs.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/promisify.d.ts +13 -0
- package/dist/loader-utils/lib/node/promisify.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/promisify.js +19 -0
- package/dist/loader-utils/lib/node/promisify.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.js +5 -0
- package/dist/loader-utils/lib/node/stream.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.d.ts +6 -0
- package/dist/loader-utils/lib/node/stream.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.js +8 -0
- package/dist/loader-utils/lib/node/stream.js.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts +12 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js +34 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts +5 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js +16 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts +35 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js +64 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts +17 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js +44 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts +3 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js +12 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts +24 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.js +173 -0
- package/dist/loader-utils/lib/path-utils/path.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts +5 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js +59 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts +56 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.js +67 -0
- package/dist/loader-utils/lib/request-utils/authentication.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts +7 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js +20 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts +70 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js +203 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts +201 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js +636 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts +62 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js +236 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts +139 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +373 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts +71 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js +174 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js +261 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts +42 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js +5 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js +86 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts +36 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js +49 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts +75 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js +107 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts +20 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js +183 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts +23 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js +5 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +272 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +97 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts +39 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js +35 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +77 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js +56 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +30 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +161 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts +36 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.js +5 -0
- package/dist/loader-utils/lib/sources/catalog-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts +136 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js +376 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts +79 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.js +145 -0
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts +55 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts +12 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts +17 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js +62 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts +4 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.js +22 -0
- package/dist/loader-utils/lib/sources/raster-region.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts +35 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js +152 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts +302 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.js +20 -0
- package/dist/loader-utils/lib/sources/raster-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts +36 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js +5 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +89 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.js +306 -0
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts +24 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js +105 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts +6 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js +13 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts +192 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts +10 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js +5 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts +13 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +26 -0
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts +76 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +15 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.d.ts +20 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.js +65 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts +9 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js +67 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts +25 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js +156 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts +8 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +23 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts +47 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +271 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
- package/dist/loader-utils/loader-types.d.ts +332 -0
- package/dist/loader-utils/loader-types.d.ts.map +1 -0
- package/dist/loader-utils/loader-types.js +33 -0
- package/dist/loader-utils/loader-types.js.map +1 -0
- package/dist/loader-utils/source-types.d.ts +42 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -0
- package/dist/loader-utils/source-types.js +8 -0
- package/dist/loader-utils/source-types.js.map +1 -0
- package/dist/loader-utils/tile-grid.cjs +328 -0
- package/dist/loader-utils/tile-grid.cjs.map +6 -0
- package/dist/loader-utils/tile-grid.d.ts +5 -0
- package/dist/loader-utils/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/tile-grid.js +7 -0
- package/dist/loader-utils/tile-grid.js.map +1 -0
- package/dist/loader-utils/types.d.ts +24 -0
- package/dist/loader-utils/types.d.ts.map +1 -0
- package/dist/loader-utils/types.js +6 -0
- package/dist/loader-utils/types.js.map +1 -0
- package/dist/loader-utils/workers/json-worker.d.ts +2 -0
- package/dist/loader-utils/workers/json-worker.d.ts.map +1 -0
- package/dist/loader-utils/workers/json-worker.js +7 -0
- package/dist/loader-utils/workers/json-worker.js.map +1 -0
- package/dist/loader-utils/writer-types.d.ts +74 -0
- package/dist/loader-utils/writer-types.d.ts.map +1 -0
- package/dist/loader-utils/writer-types.js +5 -0
- package/dist/loader-utils/writer-types.js.map +1 -0
- package/dist/null-loader.d.ts +2 -2
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -1
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +229 -100
- package/dist/null-worker.js +225 -64
- package/dist/polyfills/buffer/btoa.node.d.ts +3 -0
- package/dist/polyfills/buffer/btoa.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/btoa.node.js +13 -0
- package/dist/polyfills/buffer/btoa.node.js.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts +2 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js +12 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js.map +1 -0
- package/dist/polyfills/crypto/node-hash.d.ts +29 -0
- package/dist/polyfills/crypto/node-hash.d.ts.map +1 -0
- package/dist/polyfills/crypto/node-hash.js +63 -0
- package/dist/polyfills/crypto/node-hash.js.map +1 -0
- package/dist/polyfills/file/file-reader.d.ts +24 -0
- package/dist/polyfills/file/file-reader.d.ts.map +1 -0
- package/dist/polyfills/file/file-reader.js +51 -0
- package/dist/polyfills/file/file-reader.js.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts +2 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.js +12 -0
- package/dist/polyfills/file/install-file-polyfills.js.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts +8 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.js +88 -0
- package/dist/polyfills/filesystems/fetch-node.js.map +1 -0
- package/dist/polyfills/filesystems/node-file.d.ts +15 -0
- package/dist/polyfills/filesystems/node-file.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-file.js +138 -0
- package/dist/polyfills/filesystems/node-file.js.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts +19 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.js +44 -0
- package/dist/polyfills/filesystems/node-filesystem.js.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts +18 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.js +67 -0
- package/dist/polyfills/filesystems/stream-utils.node.js.map +1 -0
- package/dist/polyfills/images/encode-image-node.d.ts +23 -0
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/encode-image-node.js +23 -0
- package/dist/polyfills/images/encode-image-node.js.map +1 -0
- package/dist/polyfills/images/image-codecs-node.d.ts +4 -0
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -0
- package/dist/polyfills/images/image-codecs-node.js +5 -0
- package/dist/polyfills/images/image-codecs-node.js.map +1 -0
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +38 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.js +64 -0
- package/dist/polyfills/images/node-image-bitmap.js.map +1 -0
- package/dist/polyfills/images/node-image-formats.d.ts +3 -0
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-formats.js +12 -0
- package/dist/polyfills/images/node-image-formats.js.map +1 -0
- package/dist/polyfills/images/parse-image-node.d.ts +19 -0
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/parse-image-node.js +24 -0
- package/dist/polyfills/images/parse-image-node.js.map +1 -0
- package/dist/polyfills/index.browser.d.ts +8 -0
- package/dist/polyfills/index.browser.d.ts.map +1 -0
- package/dist/polyfills/index.browser.js +18 -0
- package/dist/polyfills/index.browser.js.map +1 -0
- package/dist/polyfills/index.cjs +2219 -0
- package/dist/polyfills/index.cjs.map +6 -0
- package/dist/polyfills/index.d.ts +16 -0
- package/dist/polyfills/index.d.ts.map +1 -0
- package/dist/polyfills/index.js +92 -0
- package/dist/polyfills/index.js.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts +10 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js +14 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts +19 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.js +88 -0
- package/dist/polyfills/load-library/require-utils.node.js.map +1 -0
- package/dist/polyfills/streams/make-node-stream.d.ts +6 -0
- package/dist/polyfills/streams/make-node-stream.d.ts.map +1 -0
- package/dist/polyfills/streams/make-node-stream.js +53 -0
- package/dist/polyfills/streams/make-node-stream.js.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts +31 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js +35 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts +15 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.js +2778 -0
- package/dist/polyfills/text-encoder/text-encoder.js.map +1 -0
- package/dist/polyfills/utils/assert.d.ts +2 -0
- package/dist/polyfills/utils/assert.d.ts.map +1 -0
- package/dist/polyfills/utils/assert.js +9 -0
- package/dist/polyfills/utils/assert.js.map +1 -0
- package/dist/polyfills/utils/buffer-utils.d.ts +5 -0
- package/dist/polyfills/utils/buffer-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/buffer-utils.js +34 -0
- package/dist/polyfills/utils/buffer-utils.js.map +1 -0
- package/dist/polyfills/utils/filesystem-types.d.ts +10 -0
- package/dist/polyfills/utils/filesystem-types.d.ts.map +1 -0
- package/dist/polyfills/utils/filesystem-types.js +5 -0
- package/dist/polyfills/utils/filesystem-types.js.map +1 -0
- package/dist/polyfills/utils/is-browser.d.ts +2 -0
- package/dist/polyfills/utils/is-browser.d.ts.map +1 -0
- package/dist/polyfills/utils/is-browser.js +8 -0
- package/dist/polyfills/utils/is-browser.js.map +1 -0
- package/dist/polyfills/utils/path-utils.d.ts +7 -0
- package/dist/polyfills/utils/path-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/path-utils.js +28 -0
- package/dist/polyfills/utils/path-utils.js.map +1 -0
- package/dist/scan/arrow-query.cjs +38 -0
- package/dist/scan/arrow-query.cjs.map +7 -0
- package/dist/scan/arrow-query.d.ts +5 -0
- package/dist/scan/arrow-query.d.ts.map +1 -0
- package/dist/scan/arrow-query.js +6 -0
- package/dist/scan/arrow-query.js.map +1 -0
- package/dist/scan/bind-sql-predicate.cjs +36 -0
- package/dist/scan/bind-sql-predicate.cjs.map +7 -0
- package/dist/scan/bind-sql-predicate.d.ts +4 -0
- package/dist/scan/bind-sql-predicate.d.ts.map +1 -0
- package/dist/scan/bind-sql-predicate.js +11 -0
- package/dist/scan/bind-sql-predicate.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +719 -0
- package/dist/scan/federated-table-scan-source.cjs.map +7 -0
- package/dist/scan/federated-table-scan-source.d.ts +116 -0
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -0
- package/dist/scan/federated-table-scan-source.js +691 -0
- package/dist/scan/federated-table-scan-source.js.map +1 -0
- package/dist/scan/index.cjs +87 -0
- package/dist/scan/index.cjs.map +7 -0
- package/dist/scan/index.d.ts +20 -0
- package/dist/scan/index.d.ts.map +1 -0
- package/dist/scan/index.js +17 -0
- package/dist/scan/index.js.map +1 -0
- package/dist/scan/parse-sql-predicate.cjs +328 -0
- package/dist/scan/parse-sql-predicate.cjs.map +7 -0
- package/dist/scan/parse-sql-predicate.d.ts +10 -0
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -0
- package/dist/scan/parse-sql-predicate.js +322 -0
- package/dist/scan/parse-sql-predicate.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +633 -0
- package/dist/scan/query-arrow-table.cjs.map +7 -0
- package/dist/scan/query-arrow-table.d.ts +83 -0
- package/dist/scan/query-arrow-table.d.ts.map +1 -0
- package/dist/scan/query-arrow-table.js +663 -0
- package/dist/scan/query-arrow-table.js.map +1 -0
- package/dist/scan/rows-to-arrow.cjs +71 -0
- package/dist/scan/rows-to-arrow.cjs.map +7 -0
- package/dist/scan/rows-to-arrow.d.ts +4 -0
- package/dist/scan/rows-to-arrow.d.ts.map +1 -0
- package/dist/scan/rows-to-arrow.js +39 -0
- package/dist/scan/rows-to-arrow.js.map +1 -0
- package/dist/scan/scan-engine.cjs +66 -0
- package/dist/scan/scan-engine.cjs.map +7 -0
- package/dist/scan/scan-engine.d.ts +45 -0
- package/dist/scan/scan-engine.d.ts.map +1 -0
- package/dist/scan/scan-engine.js +51 -0
- package/dist/scan/scan-engine.js.map +1 -0
- package/dist/scan/scan-query.cjs +19 -0
- package/dist/scan/scan-query.cjs.map +7 -0
- package/dist/scan/scan-query.d.ts +24 -0
- package/dist/scan/scan-query.d.ts.map +1 -0
- package/dist/scan/scan-query.js +5 -0
- package/dist/scan/scan-query.js.map +1 -0
- package/dist/scan/sql-predicate-schema.cjs +237 -0
- package/dist/scan/sql-predicate-schema.cjs.map +7 -0
- package/dist/scan/sql-predicate-schema.d.ts +156 -0
- package/dist/scan/sql-predicate-schema.d.ts.map +1 -0
- package/dist/scan/sql-predicate-schema.js +226 -0
- package/dist/scan/sql-predicate-schema.js.map +1 -0
- package/dist/scan/sql-predicate-types.cjs +34 -0
- package/dist/scan/sql-predicate-types.cjs.map +7 -0
- package/dist/scan/sql-predicate-types.d.ts +45 -0
- package/dist/scan/sql-predicate-types.d.ts.map +1 -0
- package/dist/scan/sql-predicate-types.js +9 -0
- package/dist/scan/sql-predicate-types.js.map +1 -0
- package/dist/scan/sql-predicate-zod.cjs +61 -0
- package/dist/scan/sql-predicate-zod.cjs.map +7 -0
- package/dist/scan/sql-predicate-zod.d.ts +11 -0
- package/dist/scan/sql-predicate-zod.d.ts.map +1 -0
- package/dist/scan/sql-predicate-zod.js +45 -0
- package/dist/scan/sql-predicate-zod.js.map +1 -0
- package/dist/scan/sql-predicate.cjs +44 -0
- package/dist/scan/sql-predicate.cjs.map +7 -0
- package/dist/scan/sql-predicate.d.ts +6 -0
- package/dist/scan/sql-predicate.d.ts.map +1 -0
- package/dist/scan/sql-predicate.js +8 -0
- package/dist/scan/sql-predicate.js.map +1 -0
- package/dist/scan/table-query-capabilities.cjs +52 -0
- package/dist/scan/table-query-capabilities.cjs.map +7 -0
- package/dist/scan/table-query-capabilities.d.ts +6 -0
- package/dist/scan/table-query-capabilities.d.ts.map +1 -0
- package/dist/scan/table-query-capabilities.js +26 -0
- package/dist/scan/table-query-capabilities.js.map +1 -0
- package/dist/scan/table-query.cjs +56 -0
- package/dist/scan/table-query.cjs.map +7 -0
- package/dist/scan/table-query.d.ts +29 -0
- package/dist/scan/table-query.d.ts.map +1 -0
- package/dist/scan/table-query.js +30 -0
- package/dist/scan/table-query.js.map +1 -0
- package/dist/scan/vector-table-scan-source.cjs +227 -0
- package/dist/scan/vector-table-scan-source.cjs.map +7 -0
- package/dist/scan/vector-table-scan-source.d.ts +93 -0
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -0
- package/dist/scan/vector-table-scan-source.js +221 -0
- package/dist/scan/vector-table-scan-source.js.map +1 -0
- package/dist/schema/categories/category-gis.d.ts +7 -0
- package/dist/schema/categories/category-gis.d.ts.map +1 -0
- package/dist/schema/categories/category-gis.js +5 -0
- package/dist/schema/categories/category-gis.js.map +1 -0
- package/dist/schema/categories/category-image.d.ts +18 -0
- package/dist/schema/categories/category-image.d.ts.map +1 -0
- package/dist/schema/categories/category-image.js +5 -0
- package/dist/schema/categories/category-image.js.map +1 -0
- package/dist/schema/categories/category-mesh.d.ts +99 -0
- package/dist/schema/categories/category-mesh.d.ts.map +1 -0
- package/dist/schema/categories/category-mesh.js +14 -0
- package/dist/schema/categories/category-mesh.js.map +1 -0
- package/dist/schema/categories/category-table.d.ts +106 -0
- package/dist/schema/categories/category-table.d.ts.map +1 -0
- package/dist/schema/categories/category-table.js +5 -0
- package/dist/schema/categories/category-table.js.map +1 -0
- package/dist/schema/categories/category-texture.d.ts +115 -0
- package/dist/schema/categories/category-texture.d.ts.map +1 -0
- package/dist/schema/categories/category-texture.js +5 -0
- package/dist/schema/categories/category-texture.js.map +1 -0
- package/dist/schema/deprecated/mesh-utils.d.ts +12 -0
- package/dist/schema/deprecated/mesh-utils.d.ts.map +1 -0
- package/dist/schema/deprecated/mesh-utils.js +37 -0
- package/dist/schema/deprecated/mesh-utils.js.map +1 -0
- package/dist/schema/float16.d.ts +19 -0
- package/dist/schema/float16.d.ts.map +1 -0
- package/dist/schema/float16.js +90 -0
- package/dist/schema/float16.js.map +1 -0
- package/dist/schema/geoarrow-metadata.schema.json +117 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts +45 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/arrow-binary-features.js +5 -0
- package/dist/schema/geometry/arrow-binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-features.d.ts +30 -0
- package/dist/schema/geometry/binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/binary-features.js +5 -0
- package/dist/schema/geometry/binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-geometries.d.ts +33 -0
- package/dist/schema/geometry/binary-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/binary-geometries.js +5 -0
- package/dist/schema/geometry/binary-geometries.js.map +1 -0
- package/dist/schema/geometry/flat-geometries.d.ts +61 -0
- package/dist/schema/geometry/flat-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/flat-geometries.js +5 -0
- package/dist/schema/geometry/flat-geometries.js.map +1 -0
- package/dist/schema/geometry/geoarrow.d.ts +69 -0
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -0
- package/dist/schema/geometry/geoarrow.js +5 -0
- package/dist/schema/geometry/geoarrow.js.map +1 -0
- package/dist/schema/geoparquet.schema.json +222 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs +154 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs.map +6 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts +44 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts.map +1 -0
- package/dist/schema/geospatial-metadata-zod-schema.js +151 -0
- package/dist/schema/geospatial-metadata-zod-schema.js.map +1 -0
- package/dist/schema/index.cjs +259 -0
- package/dist/schema/index.cjs.map +6 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/metadata.d.ts +40 -0
- package/dist/schema/metadata.d.ts.map +1 -0
- package/dist/schema/metadata.js +86 -0
- package/dist/schema/metadata.js.map +1 -0
- package/dist/schema/types/batch.d.ts +37 -0
- package/dist/schema/types/batch.d.ts.map +1 -0
- package/dist/schema/types/batch.js +5 -0
- package/dist/schema/types/batch.js.map +1 -0
- package/dist/schema/types/schema.d.ts +70 -0
- package/dist/schema/types/schema.d.ts.map +1 -0
- package/dist/schema/types/schema.js +5 -0
- package/dist/schema/types/schema.js.map +1 -0
- package/dist/schema/types/types.d.ts +16 -0
- package/dist/schema/types/types.d.ts.map +1 -0
- package/dist/schema/types/types.js +6 -0
- package/dist/schema/types/types.js.map +1 -0
- package/dist/schema-utils/arrow-transport.cjs +691 -0
- package/dist/schema-utils/arrow-transport.cjs.map +6 -0
- package/dist/schema-utils/arrow-transport.d.ts +4 -0
- package/dist/schema-utils/arrow-transport.d.ts.map +1 -0
- package/dist/schema-utils/arrow-transport.js +7 -0
- package/dist/schema-utils/arrow-transport.js.map +1 -0
- package/dist/schema-utils/deprecated.d.ts +24 -0
- package/dist/schema-utils/deprecated.d.ts.map +1 -0
- package/dist/schema-utils/deprecated.js +27 -0
- package/dist/schema-utils/deprecated.js.map +1 -0
- package/dist/schema-utils/index.cjs +3422 -0
- package/dist/schema-utils/index.cjs.map +6 -0
- package/dist/schema-utils/index.d.ts +38 -0
- package/dist/schema-utils/index.d.ts.map +1 -0
- package/dist/schema-utils/index.js +77 -0
- package/dist/schema-utils/index.js.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +76 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +182 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +33 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +134 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js +45 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js +33 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.d.ts +10 -0
- package/dist/schema-utils/lib/converters/convert.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +98 -0
- package/dist/schema-utils/lib/converters/convert.js.map +1 -0
- package/dist/schema-utils/lib/converters/converters.d.ts +3 -0
- package/dist/schema-utils/lib/converters/converters.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/converters.js +5 -0
- package/dist/schema-utils/lib/converters/converters.js.map +1 -0
- package/dist/schema-utils/lib/converters/types.d.ts +35 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/types.js +5 -0
- package/dist/schema-utils/lib/converters/types.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +44 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +187 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +217 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js +72 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js +54 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts +98 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +407 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts +39 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js +441 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts +16 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.js +102 -0
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +14 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +101 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts +19 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js +37 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts +43 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js +5 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts +12 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js +82 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +28 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +64 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts +177 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js +441 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts +92 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js +98 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts +13 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js +28 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts +6 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js +8 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +10 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +71 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +28 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +104 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +19 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +64 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +20 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +83 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +21 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +86 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +24 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +5 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +52 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +149 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +10 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js +46 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +17 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +61 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts +15 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js +22 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +9 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +63 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +23 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js +73 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +24 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +151 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +43 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js +122 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +67 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.js +102 -0
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts +15 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js +50 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +68 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js +352 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts +7 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.js +40 -0
- package/dist/schema-utils/lib/table/tables/table-column.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +9 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +19 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +16 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +45 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +12 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.js +24 -0
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -0
- package/dist/schema-utils/lib/utils/assert.d.ts +2 -0
- package/dist/schema-utils/lib/utils/assert.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/assert.js +12 -0
- package/dist/schema-utils/lib/utils/assert.js.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts +18 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.js +96 -0
- package/dist/schema-utils/lib/utils/async-queue.js.map +1 -0
- package/dist/schema-utils/types/types.d.ts +15 -0
- package/dist/schema-utils/types/types.d.ts.map +1 -0
- package/dist/schema-utils/types/types.js +5 -0
- package/dist/schema-utils/types/types.js.map +1 -0
- package/dist/vector-table-scan-source.cjs +1703 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/wkt/index.cjs +44 -0
- package/dist/wkt/index.cjs.map +7 -0
- package/dist/wkt/index.d.ts +3 -0
- package/dist/wkt/index.d.ts.map +1 -0
- package/dist/wkt/index.js +6 -0
- package/dist/wkt/index.js.map +1 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.cjs +211 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.cjs.map +7 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.d.ts +6 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.d.ts.map +1 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.js +204 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.js.map +1 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.cjs +251 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.cjs.map +7 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.d.ts +10 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.d.ts.map +1 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.js +261 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.js.map +1 -0
- package/dist/wkt/twkb/index.cjs +36 -0
- package/dist/wkt/twkb/index.cjs.map +7 -0
- package/dist/wkt/twkb/index.d.ts +3 -0
- package/dist/wkt/twkb/index.d.ts.map +1 -0
- package/dist/wkt/twkb/index.js +6 -0
- package/dist/wkt/twkb/index.js.map +1 -0
- package/dist/wkt/twkb/twkb-io.cjs +102 -0
- package/dist/wkt/twkb/twkb-io.cjs.map +7 -0
- package/dist/wkt/twkb/twkb-io.d.ts +33 -0
- package/dist/wkt/twkb/twkb-io.d.ts.map +1 -0
- package/dist/wkt/twkb/twkb-io.js +78 -0
- package/dist/wkt/twkb/twkb-io.js.map +1 -0
- package/dist/wkt/twkb/twkb-types.cjs +40 -0
- package/dist/wkt/twkb/twkb-types.cjs.map +7 -0
- package/dist/wkt/twkb/twkb-types.d.ts +11 -0
- package/dist/wkt/twkb/twkb-types.d.ts.map +1 -0
- package/dist/wkt/twkb/twkb-types.js +15 -0
- package/dist/wkt/twkb/twkb-types.js.map +1 -0
- package/dist/worker-utils/index.cjs +413 -0
- package/dist/worker-utils/index.cjs.map +6 -0
- package/dist/worker-utils/index.d.ts +22 -0
- package/dist/worker-utils/index.d.ts.map +1 -0
- package/dist/worker-utils/index.js +40 -0
- package/dist/worker-utils/index.js.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +2 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js +5 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.js +13 -0
- package/dist/worker-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts +22 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.js +30 -0
- package/dist/worker-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.js +14 -0
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts +42 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js +248 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts +14 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js +22 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts +15 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.js +16 -0
- package/dist/worker-utils/lib/node/worker_threads.js.map +1 -0
- package/dist/worker-utils/lib/npm-tag.d.ts +2 -0
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -0
- package/dist/worker-utils/lib/npm-tag.js +5 -0
- package/dist/worker-utils/lib/npm-tag.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts +8 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js +18 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts +45 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +123 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts +2 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js +32 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +2 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js +5 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts +29 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +99 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +3 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +5 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js +35 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +2 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js +5 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +2 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +5 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +2 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js +5 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +2 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +5 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +2 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +5 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts +14 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +72 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +15 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +86 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts +6 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js +27 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js.map +1 -0
- package/dist/worker-utils/null-worker-node.js +473 -0
- package/dist/worker-utils/null-worker-node.js.map +7 -0
- package/dist/worker-utils/null-worker.js +472 -0
- package/dist/worker-utils/null-worker.js.map +7 -0
- package/dist/worker-utils/types.d.ts +2 -0
- package/dist/worker-utils/types.d.ts.map +1 -0
- package/dist/worker-utils/types.js +5 -0
- package/dist/worker-utils/types.js.map +1 -0
- package/dist/worker-utils/workers/null-worker.d.ts +2 -0
- package/dist/worker-utils/workers/null-worker.d.ts.map +1 -0
- package/dist/worker-utils/workers/null-worker.js +17 -0
- package/dist/worker-utils/workers/null-worker.js.map +1 -0
- package/dist/workers/null-worker-node.js +1 -1
- package/dist/workers/null-worker-node.js.map +1 -1
- package/dist/workers/null-worker.js +1 -1
- package/dist/workers/null-worker.js.map +1 -1
- package/package.json +349 -13
- package/src/arrow-geometry/arrow-geoarrow-adapter.ts +568 -0
- package/src/arrow-geometry/binary-features.ts +399 -0
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +245 -0
- package/src/arrow-geometry/feature-collection-to-arrow.ts +158 -0
- package/src/arrow-geometry/feature-table.ts +936 -0
- package/src/arrow-geometry/geoarrow-builder.ts +862 -0
- package/src/arrow-geometry/geoarrow-union-kind.ts +47 -0
- package/src/arrow-geometry/geojson-table.ts +156 -0
- package/src/arrow-geometry/geometry-codecs.ts +186 -0
- package/src/arrow-geometry/geometry-field.ts +349 -0
- package/src/arrow-geometry/geometry-to-wkt.ts +121 -0
- package/src/arrow-geometry/geometry-utils.ts +29 -0
- package/src/arrow-geometry/index.ts +42 -0
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +583 -0
- package/src/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.ts +45 -0
- package/src/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.ts +177 -0
- package/src/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.ts +62 -0
- package/src/arrow-geometry/legacy-binary/geometry-info.ts +129 -0
- package/src/arrow-geometry/legacy-binary/transform-coordinates.ts +72 -0
- package/src/arrow-geometry/legacy-binary.ts +24 -0
- package/src/arrow-geometry/native-geometry.ts +278 -0
- package/src/arrow-geometry/sampled-bounds.ts +46 -0
- package/src/arrow-geometry/triangulate-wkb.ts +1133 -0
- package/src/arrow-geometry/wkb-arrow-utils.ts +202 -0
- package/src/arrow-geometry/wkb-builder.ts +223 -0
- package/src/arrow-geometry/wkb-statistics.ts +70 -0
- package/src/arrow-geometry/wkb-table.ts +62 -0
- package/src/arrow-geometry/wkb-types.ts +21 -0
- package/src/cluster-source.ts +1 -0
- package/src/constants/index.ts +23 -0
- package/src/federated-table-scan-source.ts +1 -0
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +120 -0
- package/src/geoarrow/clustering/cluster-index.ts +510 -0
- package/src/geoarrow/clustering/cluster-source.ts +281 -0
- package/src/geoarrow/clustering/get-representative-point.ts +192 -0
- package/src/geoarrow/compatibility.ts +65 -0
- package/src/geoarrow/convert-table-to-geoarrow.ts +256 -0
- package/src/geoarrow/deprecated.ts +73 -0
- package/src/geoarrow/geo-column/geo-column-info.ts +114 -0
- package/src/geoarrow/geo-column/geo-column.ts +85 -0
- package/src/geoarrow/geoarrow-bounds.ts +176 -0
- package/src/geoarrow/geoarrow-builder.ts +21 -0
- package/src/geoarrow/geoarrow-capabilities.ts +581 -0
- package/src/geoarrow/geoarrow-conformance.ts +177 -0
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +2168 -0
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +75 -0
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +105 -0
- package/src/geoarrow/geoarrow-converter/geoarrow-geometry-converter.ts +66 -0
- package/src/geoarrow/geoarrow-functions.ts +293 -0
- package/src/geoarrow/geoarrow-inspection.ts +296 -0
- package/src/geoarrow/geoarrow-layout.ts +844 -0
- package/src/geoarrow/geoarrow-resource-limits.ts +94 -0
- package/src/geoarrow/geoarrow-spatial-index.ts +251 -0
- package/src/geoarrow/geoarrow-stream.ts +377 -0
- package/src/geoarrow/geoarrow-types.ts +91 -0
- package/src/geoarrow/get-geo-column-from-geoarrow.ts.disabled +251 -0
- package/src/geoarrow/get-geoarrow-geometry-info.ts +147 -0
- package/src/geoarrow/get-geoarrow-native-geometry.ts +8 -0
- package/src/geoarrow/get-geoarrow-vertex-count.ts +225 -0
- package/src/geoarrow/index.ts +260 -0
- package/src/geoarrow/lib/arrow-geoarrow-adapter.ts +12 -0
- package/src/geoarrow/lib/binary-geometry-api/binary-geometry-info.ts +75 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +576 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.ts +152 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +1598 -0
- package/src/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.ts +212 -0
- package/src/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.ts +96 -0
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +4 -0
- package/src/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.ts +154 -0
- package/src/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.ts +195 -0
- package/src/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.ts +143 -0
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +86 -0
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +116 -0
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.ts +82 -0
- package/src/geoarrow/lib/geometry-predicates.ts +170 -0
- package/src/geoarrow/lib/kernels/decode-wkt-native.ts +752 -0
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +303 -0
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +373 -0
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +97 -0
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +120 -0
- package/src/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.ts +16 -0
- package/src/geoarrow/map-geoarrow-coordinates.ts +282 -0
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +62 -0
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +47 -0
- package/src/geoarrow/mesharrow/get-bounding-box.ts +37 -0
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +70 -0
- package/src/geoarrow/mesharrow/mesh-accessors.ts +27 -0
- package/src/geoarrow/metadata/geoarrow-metadata.ts +91 -0
- package/src/geoarrow/metadata/geoparquet-metadata-schema.ts +71 -0
- package/src/geoarrow/metadata/geoparquet-metadata.ts +16 -0
- package/src/geoarrow/metadata/merge-geoarrow-metadata.ts +357 -0
- package/src/geoarrow/metadata/metadata-utils.ts +6 -0
- package/src/geoarrow/rewind-geoarrow.ts +268 -0
- package/src/index.ts +10 -10
- package/src/iterators/make-iterator/make-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-stream-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-string-iterator.ts +1 -1
- package/src/lib/api/core-api.ts +1 -1
- package/src/lib/api/create-data-source.ts +2 -2
- package/src/lib/api/encode-table.ts +2 -2
- package/src/lib/api/encode.ts +3 -3
- package/src/lib/api/load-in-batches.ts +2 -2
- package/src/lib/api/load-loader.ts +155 -1
- package/src/lib/api/load.ts +2 -2
- package/src/lib/api/parse-file.ts +5 -3
- package/src/lib/api/parse-in-batches.ts +49 -11
- package/src/lib/api/parse-sync.ts +2 -2
- package/src/lib/api/parse.ts +8 -6
- package/src/lib/api/preload.ts +27 -7
- package/src/lib/api/register-loaders.ts +1 -1
- package/src/lib/api/select-loader.ts +3 -3
- package/src/lib/api/select-source.ts +1 -1
- package/src/lib/common.ts +1 -1
- package/src/lib/fetch/fetch-file.ts +2 -2
- package/src/lib/filesystems/browser-filesystem.ts +2 -2
- package/src/lib/init.ts +1 -1
- package/src/lib/loader-utils/get-data.ts +2 -2
- package/src/lib/loader-utils/get-fetch-function.ts +6 -4
- package/src/lib/loader-utils/loader-context.ts +8 -2
- package/src/lib/loader-utils/loggers.ts +1 -1
- package/src/lib/loader-utils/normalize-loader.ts +2 -2
- package/src/lib/loader-utils/option-defaults.ts +4 -2
- package/src/lib/loader-utils/option-utils.ts +2 -2
- package/src/lib/utils/resource-utils.ts +1 -1
- package/src/lib/utils/response-utils.ts +1 -1
- package/src/loader-utils/format-types.ts +49 -0
- package/src/loader-utils/index.ts +534 -0
- package/src/loader-utils/json-loader.ts +39 -0
- package/src/loader-utils/lib/binary-utils/array-buffer-utils.ts +114 -0
- package/src/loader-utils/lib/binary-utils/binary-chunk-reader.ts +297 -0
- package/src/loader-utils/lib/binary-utils/dataview-copy-utils.ts +121 -0
- package/src/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.ts +17 -0
- package/src/loader-utils/lib/binary-utils/get-first-characters.ts +46 -0
- package/src/loader-utils/lib/binary-utils/hex-transcoder.ts +54 -0
- package/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts +105 -0
- package/src/loader-utils/lib/binary-utils/memory-copy-utils.ts +69 -0
- package/src/loader-utils/lib/crs/crs-reprojection.ts +52 -0
- package/src/loader-utils/lib/env-utils/assert.ts +13 -0
- package/src/loader-utils/lib/env-utils/globals.ts +36 -0
- package/src/loader-utils/lib/file-provider/data-view-file.ts +83 -0
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +114 -0
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +60 -0
- package/src/loader-utils/lib/file-provider/file-provider.ts +130 -0
- package/src/loader-utils/lib/files/array-buffer-file.ts +46 -0
- package/src/loader-utils/lib/files/blob-file.ts +45 -0
- package/src/loader-utils/lib/files/file.ts +39 -0
- package/src/loader-utils/lib/files/http-file-transport.ts +432 -0
- package/src/loader-utils/lib/files/http-file-types.ts +60 -0
- package/src/loader-utils/lib/files/http-file.ts +267 -0
- package/src/loader-utils/lib/files/node-file-facade.ts +57 -0
- package/src/loader-utils/lib/files/sources.ts +154 -0
- package/src/loader-utils/lib/filesystems/filesystem.ts +40 -0
- package/src/loader-utils/lib/filesystems/node-filesystem-facade.ts +65 -0
- package/src/loader-utils/lib/iterators/async-iteration.ts +136 -0
- package/src/loader-utils/lib/iterators/text-iterators.ts +76 -0
- package/src/loader-utils/lib/javascript-utils/is-type.ts +130 -0
- package/src/loader-utils/lib/laz/LASZIP-LICENSE +202 -0
- package/src/loader-utils/lib/laz/LASZIP-NOTICE +6 -0
- package/src/loader-utils/lib/laz/laz-arithmetic-encoder.ts +446 -0
- package/src/loader-utils/lib/laz/laz-chunk-decoder.ts +5251 -0
- package/src/loader-utils/lib/laz/laz-chunk-encoder.ts +1909 -0
- package/src/loader-utils/lib/log-utils/log.ts +28 -0
- package/src/loader-utils/lib/module-utils/initialize-wasm-module.ts +51 -0
- package/src/loader-utils/lib/module-utils/js-module-utils.ts +44 -0
- package/src/loader-utils/lib/node/buffer.browser.ts +22 -0
- package/src/loader-utils/lib/node/buffer.ts +40 -0
- package/src/loader-utils/lib/node/fs.browser.ts +5 -0
- package/src/loader-utils/lib/node/promisify.ts +72 -0
- package/src/loader-utils/lib/node/stream.browser.ts +5 -0
- package/src/loader-utils/lib/node/stream.ts +12 -0
- package/src/loader-utils/lib/option-utils/merge-options.ts +50 -0
- package/src/loader-utils/lib/parser-utils/parse-json.ts +16 -0
- package/src/loader-utils/lib/path-utils/cached-uri-resolver.ts +69 -0
- package/src/loader-utils/lib/path-utils/file-aliases.ts +49 -0
- package/src/loader-utils/lib/path-utils/get-cwd.ts +12 -0
- package/src/loader-utils/lib/path-utils/path.ts +173 -0
- package/src/loader-utils/lib/request-utils/abort-utils.ts +64 -0
- package/src/loader-utils/lib/request-utils/authentication.ts +134 -0
- package/src/loader-utils/lib/request-utils/parse-content-type.ts +22 -0
- package/src/loader-utils/lib/request-utils/range-request-cache.ts +279 -0
- package/src/loader-utils/lib/request-utils/range-request-scheduler.ts +899 -0
- package/src/loader-utils/lib/request-utils/request-cache.ts +296 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +574 -0
- package/src/loader-utils/lib/request-utils/request-scheduler.ts +230 -0
- package/src/loader-utils/lib/scan-utils/columnar-predicate.ts +397 -0
- package/src/loader-utils/lib/scan-utils/experimental-scan-options.ts +46 -0
- package/src/loader-utils/lib/scan-utils/point-cloud-query.ts +176 -0
- package/src/loader-utils/lib/scan-utils/raster-query.ts +82 -0
- package/src/loader-utils/lib/scan-utils/relational-query.ts +188 -0
- package/src/loader-utils/lib/scan-utils/scan-executor.ts +208 -0
- package/src/loader-utils/lib/scan-utils/scan-fragments.ts +33 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +439 -0
- package/src/loader-utils/lib/scan-utils/table-query-explain.ts +88 -0
- package/src/loader-utils/lib/scan-utils/table-query.ts +163 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +200 -0
- package/src/loader-utils/lib/sources/catalog-source.ts +42 -0
- package/src/loader-utils/lib/sources/data-source-manager.ts +569 -0
- package/src/loader-utils/lib/sources/data-source.ts +236 -0
- package/src/loader-utils/lib/sources/image-source.ts +66 -0
- package/src/loader-utils/lib/sources/image-tile-source.ts +22 -0
- package/src/loader-utils/lib/sources/raster-coverage.ts +92 -0
- package/src/loader-utils/lib/sources/raster-region.ts +35 -0
- package/src/loader-utils/lib/sources/raster-sampling.ts +213 -0
- package/src/loader-utils/lib/sources/raster-source.ts +344 -0
- package/src/loader-utils/lib/sources/service-capabilities.ts +50 -0
- package/src/loader-utils/lib/sources/tile-grid.ts +414 -0
- package/src/loader-utils/lib/sources/tile-source-adapter.ts +117 -0
- package/src/loader-utils/lib/sources/tile-source-utils.ts +19 -0
- package/src/loader-utils/lib/sources/tile-source.ts +200 -0
- package/src/loader-utils/lib/sources/utils/image-type.ts +14 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +31 -0
- package/src/loader-utils/lib/sources/vector-source.ts +89 -0
- package/src/loader-utils/lib/sources/vector-tile-source.ts +29 -0
- package/src/loader-utils/lib/sources/xyz-grid-options.ts +90 -0
- package/src/loader-utils/lib/sources/xyz-grid.ts +88 -0
- package/src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts +256 -0
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +28 -0
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +392 -0
- package/src/loader-utils/loader-types.ts +545 -0
- package/src/loader-utils/source-types.ts +76 -0
- package/src/loader-utils/tile-grid.ts +8 -0
- package/src/loader-utils/types.ts +83 -0
- package/src/loader-utils/workers/json-worker.ts +8 -0
- package/src/loader-utils/writer-types.ts +107 -0
- package/src/null-loader.ts +2 -2
- package/src/polyfills/README.md +16 -0
- package/src/polyfills/buffer/btoa.node.ts +15 -0
- package/src/polyfills/buffer/to-array-buffer.node.ts +12 -0
- package/src/polyfills/crypto/node-hash.ts +78 -0
- package/src/polyfills/file/file-reader.ts +59 -0
- package/src/polyfills/file/install-file-polyfills.ts +14 -0
- package/src/polyfills/filesystems/fetch-node.ts +98 -0
- package/src/polyfills/filesystems/node-file.ts +169 -0
- package/src/polyfills/filesystems/node-filesystem.ts +54 -0
- package/src/polyfills/filesystems/stream-utils.node.ts +81 -0
- package/src/polyfills/images/encode-image-node.ts +52 -0
- package/src/polyfills/images/image-codecs-node.ts +5 -0
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +81 -0
- package/src/polyfills/images/node-image-formats.ts +12 -0
- package/src/polyfills/images/parse-image-node.ts +45 -0
- package/src/polyfills/index.browser.ts +23 -0
- package/src/polyfills/index.ts +132 -0
- package/src/polyfills/libs/encoding-indexes-asian.js +15 -0
- package/src/polyfills/load-library/require-utils.node.ts +108 -0
- package/src/polyfills/streams/make-node-stream.ts +61 -0
- package/src/polyfills/text-encoder/encoding-indexes.ts +36 -0
- package/src/polyfills/text-encoder/text-encoder.ts +3085 -0
- package/src/polyfills/utils/assert.ts +9 -0
- package/src/polyfills/utils/buffer-utils.ts +40 -0
- package/src/polyfills/utils/filesystem-types.ts +13 -0
- package/src/polyfills/utils/is-browser.ts +8 -0
- package/src/polyfills/utils/path-utils.ts +31 -0
- package/src/polyfills/wip/fetch-browser/fetch-file.browser.d.ts +34 -0
- package/src/scan/arrow-query.ts +17 -0
- package/src/scan/bind-sql-predicate.ts +21 -0
- package/src/scan/federated-table-scan-source.ts +996 -0
- package/src/scan/index.ts +114 -0
- package/src/scan/parse-sql-predicate.ts +381 -0
- package/src/scan/query-arrow-table.ts +846 -0
- package/src/scan/rows-to-arrow.ts +45 -0
- package/src/scan/scan-engine.ts +96 -0
- package/src/scan/scan-query.ts +27 -0
- package/src/scan/sql-predicate-schema.ts +251 -0
- package/src/scan/sql-predicate-types.ts +87 -0
- package/src/scan/sql-predicate-zod.ts +52 -0
- package/src/scan/sql-predicate.ts +28 -0
- package/src/scan/table-query-capabilities.ts +29 -0
- package/src/scan/table-query.ts +79 -0
- package/src/scan/vector-table-scan-source.ts +296 -0
- package/src/schema/categories/category-gis.ts +63 -0
- package/src/schema/categories/category-image.ts +23 -0
- package/src/schema/categories/category-mesh.ts +138 -0
- package/src/schema/categories/category-table.ts +125 -0
- package/src/schema/categories/category-texture.ts +259 -0
- package/src/schema/deprecated/mesh-utils.ts +46 -0
- package/src/schema/float16.ts +111 -0
- package/src/schema/geometry/arrow-binary-features.ts +54 -0
- package/src/schema/geometry/binary-features.ts +43 -0
- package/src/schema/geometry/binary-geometries.ts +45 -0
- package/src/schema/geometry/flat-geometries.ts +72 -0
- package/src/schema/geometry/geoarrow.ts +116 -0
- package/src/schema/geospatial-metadata-zod-schema.ts +163 -0
- package/src/schema/index.ts +169 -0
- package/src/schema/metadata.ts +115 -0
- package/src/schema/types/batch.ts +47 -0
- package/src/schema/types/schema.ts +86 -0
- package/src/schema/types/types.ts +52 -0
- package/src/schema-utils/arrow-transport.ts +7 -0
- package/src/schema-utils/deprecated.ts +53 -0
- package/src/schema-utils/index.ts +165 -0
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +282 -0
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +247 -0
- package/src/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.ts +78 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +48 -0
- package/src/schema-utils/lib/converters/convert.ts +142 -0
- package/src/schema-utils/lib/converters/converters.ts +6 -0
- package/src/schema-utils/lib/converters/types.ts +44 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +311 -0
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +257 -0
- package/src/schema-utils/lib/mesh/deduce-mesh-schema.ts +85 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +73 -0
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +485 -0
- package/src/schema-utils/lib/schema/convert-arrow-schema.ts +552 -0
- package/src/schema-utils/lib/schema/data-type.ts +122 -0
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +119 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-field.ts +53 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-interface.ts +84 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-schema.ts +101 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +85 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-type.ts +500 -0
- package/src/schema-utils/lib/table/arrow-api/enum.ts +99 -0
- package/src/schema-utils/lib/table/arrow-api/get-type-info.ts +38 -0
- package/src/schema-utils/lib/table/arrow-api/index.ts +50 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +190 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +85 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +123 -0
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +82 -0
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +103 -0
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +108 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +28 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +185 -0
- package/src/schema-utils/lib/table/batches/convert-batches.ts +83 -0
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +81 -0
- package/src/schema-utils/lib/table/batches/make-table-batch-iterator.ts +25 -0
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +84 -0
- package/src/schema-utils/lib/table/query-arrow-table.ts +130 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +198 -0
- package/src/schema-utils/lib/table/tables/convert-table.ts +152 -0
- package/src/schema-utils/lib/table/tables/make-table.ts +127 -0
- package/src/schema-utils/lib/table/tables/row-utils.ts +59 -0
- package/src/schema-utils/lib/table/tables/table-accessors.ts +418 -0
- package/src/schema-utils/lib/table/tables/table-column.ts +49 -0
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +35 -0
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +57 -0
- package/src/schema-utils/lib/table/tables/table-types.ts +37 -0
- package/src/schema-utils/lib/utils/assert.ts +12 -0
- package/src/schema-utils/lib/utils/async-queue.ts +109 -0
- package/src/schema-utils/types/types.ts +45 -0
- package/src/vector-table-scan-source.ts +1 -0
- package/src/wkt/index.ts +11 -0
- package/src/wkt/twkb/convert-geometry-to-twkb.ts +317 -0
- package/src/wkt/twkb/convert-twkb-to-geometry.ts +373 -0
- package/src/wkt/twkb/index.ts +6 -0
- package/src/wkt/twkb/twkb-io.ts +85 -0
- package/src/wkt/twkb/twkb-types.ts +14 -0
- package/src/worker-utils/index.ts +82 -0
- package/src/worker-utils/lib/async-queue/async-queue.ts +5 -0
- package/src/worker-utils/lib/env-utils/assert.ts +14 -0
- package/src/worker-utils/lib/env-utils/globals.ts +40 -0
- package/src/worker-utils/lib/env-utils/version.ts +18 -0
- package/src/worker-utils/lib/library-utils/library-utils.ts +303 -0
- package/src/worker-utils/lib/node/worker_threads-browser.ts +34 -0
- package/src/worker-utils/lib/node/worker_threads.ts +58 -0
- package/src/worker-utils/lib/npm-tag.ts +5 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.browser.ts +23 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +165 -0
- package/src/worker-utils/lib/process-utils/process-utils.ts +34 -0
- package/src/worker-utils/lib/worker-api/create-worker.ts +5 -0
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +128 -0
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +12 -0
- package/src/worker-utils/lib/worker-api/validate-worker-version.ts +44 -0
- package/src/worker-utils/lib/worker-farm/worker-body.ts +5 -0
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +5 -0
- package/src/worker-utils/lib/worker-farm/worker-job.ts +5 -0
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +5 -0
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +5 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +81 -0
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +93 -0
- package/src/worker-utils/lib/worker-utils/remove-nontransferable-options.ts +27 -0
- package/src/worker-utils/types.ts +18 -0
- package/src/worker-utils/workers/null-worker.ts +20 -0
- package/src/workers/null-worker-node.ts +1 -1
- package/src/workers/null-worker.ts +1 -1
- package/third-party-licenses/Apache-2.0 +73 -0
- package/third-party-licenses/fetch-LICENSE +20 -0
- package/third-party-licenses/fetch-progress-LICENSE +21 -0
- package/third-party-licenses/path-resolve-LICENSE +21 -0
- package/third-party-licenses/retained-MIT-LICENSE +23 -0
- package/third-party-licenses/text-encoding-LICENSE +29 -0
- package/third-party-licenses/wkx-LICENSE +20 -0
|
@@ -0,0 +1,3422 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/schema-utils/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
ArrowLikeDataType: () => DataType3,
|
|
34
|
+
ArrowLikeField: () => ArrowLikeField,
|
|
35
|
+
ArrowLikeSchema: () => ArrowLikeSchema,
|
|
36
|
+
ArrowLikeTable: () => ArrowLikeTable,
|
|
37
|
+
ArrowTableBuilder: () => ArrowTableBuilder,
|
|
38
|
+
AsyncQueue: () => AsyncQueue,
|
|
39
|
+
ColumnarTableBatchAggregator: () => ColumnarTableBatchAggregator,
|
|
40
|
+
PointCloudTiler: () => PointCloudTiler,
|
|
41
|
+
RowTableBatchAggregator: () => RowTableBatchAggregator,
|
|
42
|
+
TABLE_CONVERTERS: () => TABLE_CONVERTERS,
|
|
43
|
+
TableBatchBuilder: () => TableBatchBuilder,
|
|
44
|
+
TableConverter: () => TableConverter,
|
|
45
|
+
convert: () => convert,
|
|
46
|
+
convertArrowToSchema: () => convertArrowToSchema,
|
|
47
|
+
convertArrowToTable: () => convertArrowToTable2,
|
|
48
|
+
convertBatch: () => convertBatch,
|
|
49
|
+
convertBatches: () => convertBatches,
|
|
50
|
+
convertMeshToTable: () => convertMeshToTable,
|
|
51
|
+
convertSchemaToArrow: () => convertSchemaToArrow,
|
|
52
|
+
convertTable: () => convertTable2,
|
|
53
|
+
convertTableToArrow: () => convertTableToArrow2,
|
|
54
|
+
convertTableToMesh: () => convertTableToMesh,
|
|
55
|
+
convertToArrayRow: () => convertToArrayRow2,
|
|
56
|
+
convertToObjectRow: () => convertToObjectRow2,
|
|
57
|
+
deduceMeshField: () => deduceMeshField,
|
|
58
|
+
deduceMeshSchema: () => deduceMeshSchema,
|
|
59
|
+
deduceTableSchema: () => deduceTableSchema,
|
|
60
|
+
deserializeArrowField: () => deserializeArrowField,
|
|
61
|
+
deserializeArrowMetadata: () => deserializeArrowMetadata,
|
|
62
|
+
deserializeArrowSchema: () => deserializeArrowSchema,
|
|
63
|
+
deserializeArrowType: () => deserializeArrowType,
|
|
64
|
+
getArrayTypeFromDataType: () => getArrayTypeFromDataType,
|
|
65
|
+
getArrowViewTypeSupport: () => getArrowViewTypeSupport,
|
|
66
|
+
getDataTypeFromArray: () => getDataTypeFromArray,
|
|
67
|
+
getMeshBoundingBox: () => getMeshBoundingBox,
|
|
68
|
+
getMeshSize: () => getMeshSize,
|
|
69
|
+
getTableCell: () => getTableCell,
|
|
70
|
+
getTableCellAt: () => getTableCellAt,
|
|
71
|
+
getTableColumnIndex: () => getTableColumnIndex,
|
|
72
|
+
getTableColumnName: () => getTableColumnName,
|
|
73
|
+
getTableLength: () => getTableLength,
|
|
74
|
+
getTableNumCols: () => getTableNumCols,
|
|
75
|
+
getTableRowAsArray: () => getTableRowAsArray,
|
|
76
|
+
getTableRowAsObject: () => getTableRowAsObject,
|
|
77
|
+
getTableRowShape: () => getTableRowShape,
|
|
78
|
+
getTypeInfo: () => getTypeInfo,
|
|
79
|
+
isArrayRowTable: () => isArrayRowTable,
|
|
80
|
+
isArrowTable: () => isArrowTable,
|
|
81
|
+
isColumnarTable: () => isColumnarTable,
|
|
82
|
+
isGeoJSONTable: () => isGeoJSONTable,
|
|
83
|
+
isObjectRowTable: () => isObjectRowTable,
|
|
84
|
+
isTable: () => isTable,
|
|
85
|
+
makeArrayRowIterator: () => makeArrayRowIterator,
|
|
86
|
+
makeArrowRecordBatchIterator: () => makeArrowRecordBatchIterator,
|
|
87
|
+
makeArrowTableBatchIterator: () => makeArrowTableBatchIterator,
|
|
88
|
+
makeBatchFromTable: () => makeBatchFromTable,
|
|
89
|
+
makeMeshArrowTable: () => makeMeshArrowTable,
|
|
90
|
+
makeMeshAttributeMetadata: () => makeMeshAttributeMetadata,
|
|
91
|
+
makeObjectRowIterator: () => makeObjectRowIterator,
|
|
92
|
+
makeRowIterator: () => makeRowIterator,
|
|
93
|
+
makeTableBatchIterator: () => makeTableBatchIterator,
|
|
94
|
+
makeTableFromBatches: () => makeTableFromBatches,
|
|
95
|
+
makeTableFromData: () => makeTableFromData,
|
|
96
|
+
queryArrowTable: () => queryArrowTable,
|
|
97
|
+
selectArrowTableRows: () => selectArrowTableRows,
|
|
98
|
+
serializeArrowField: () => serializeArrowField,
|
|
99
|
+
serializeArrowMetadata: () => serializeArrowMetadata,
|
|
100
|
+
serializeArrowSchema: () => serializeArrowSchema,
|
|
101
|
+
serializeArrowType: () => serializeArrowType
|
|
102
|
+
});
|
|
103
|
+
module.exports = __toCommonJS(index_exports);
|
|
104
|
+
|
|
105
|
+
// src/schema-utils/lib/schema/data-type.ts
|
|
106
|
+
var import_core = require("@math.gl/core");
|
|
107
|
+
function getDataTypeFromValue(value, defaultNumberType = "float32") {
|
|
108
|
+
if (value instanceof Date) {
|
|
109
|
+
return "date-millisecond";
|
|
110
|
+
}
|
|
111
|
+
if (typeof value === "number") {
|
|
112
|
+
return defaultNumberType;
|
|
113
|
+
}
|
|
114
|
+
if (typeof value === "boolean") {
|
|
115
|
+
return "bool";
|
|
116
|
+
}
|
|
117
|
+
if (typeof value === "string") {
|
|
118
|
+
return "utf8";
|
|
119
|
+
}
|
|
120
|
+
if (value === null || value === "undefined") {
|
|
121
|
+
return "null";
|
|
122
|
+
}
|
|
123
|
+
return "null";
|
|
124
|
+
}
|
|
125
|
+
function getDataTypeFromArray(array) {
|
|
126
|
+
let type = getDataTypeFromTypedArray(array);
|
|
127
|
+
if (type !== "null") {
|
|
128
|
+
return { type, nullable: false };
|
|
129
|
+
}
|
|
130
|
+
if (array.length > 0) {
|
|
131
|
+
type = getDataTypeFromValue(array[0]);
|
|
132
|
+
return { type, nullable: true };
|
|
133
|
+
}
|
|
134
|
+
return { type: "null", nullable: true };
|
|
135
|
+
}
|
|
136
|
+
function getDataTypeFromTypedArray(array) {
|
|
137
|
+
if (typeof Float16Array !== "undefined" && array instanceof Float16Array) {
|
|
138
|
+
return "float16";
|
|
139
|
+
}
|
|
140
|
+
switch (array.constructor) {
|
|
141
|
+
case Int8Array:
|
|
142
|
+
return "int8";
|
|
143
|
+
case Uint8Array:
|
|
144
|
+
case Uint8ClampedArray:
|
|
145
|
+
return "uint8";
|
|
146
|
+
case Int16Array:
|
|
147
|
+
return "int16";
|
|
148
|
+
case Uint16Array:
|
|
149
|
+
return "uint16";
|
|
150
|
+
case Int32Array:
|
|
151
|
+
return "int32";
|
|
152
|
+
case Uint32Array:
|
|
153
|
+
return "uint32";
|
|
154
|
+
case BigInt64Array:
|
|
155
|
+
return "int64";
|
|
156
|
+
case BigUint64Array:
|
|
157
|
+
return "uint64";
|
|
158
|
+
case Float32Array:
|
|
159
|
+
return "float32";
|
|
160
|
+
case Float64Array:
|
|
161
|
+
return "float64";
|
|
162
|
+
default:
|
|
163
|
+
return "null";
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function getArrayTypeFromDataType(type, nullable) {
|
|
167
|
+
if (!nullable) {
|
|
168
|
+
switch (type) {
|
|
169
|
+
case "int8":
|
|
170
|
+
return Int8Array;
|
|
171
|
+
case "uint8":
|
|
172
|
+
return Uint8Array;
|
|
173
|
+
case "int16":
|
|
174
|
+
return Int16Array;
|
|
175
|
+
case "uint16":
|
|
176
|
+
return Uint16Array;
|
|
177
|
+
case "int32":
|
|
178
|
+
return Int32Array;
|
|
179
|
+
case "uint32":
|
|
180
|
+
return Uint32Array;
|
|
181
|
+
case "float32":
|
|
182
|
+
return Float32Array;
|
|
183
|
+
case "float64":
|
|
184
|
+
return Float64Array;
|
|
185
|
+
case "float16":
|
|
186
|
+
return (0, import_core.getFloat16ArrayConstructor)();
|
|
187
|
+
default:
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return Array;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// src/schema-utils/lib/converters/convert.ts
|
|
195
|
+
function convert(input, targetShape, converters, options) {
|
|
196
|
+
const normalizedConverters = Array.isArray(converters) ? converters : [converters];
|
|
197
|
+
const sourceShape = detectSourceShape(input, normalizedConverters);
|
|
198
|
+
if (sourceShape === targetShape) {
|
|
199
|
+
return input;
|
|
200
|
+
}
|
|
201
|
+
const steps = findConversionPath(sourceShape, targetShape, normalizedConverters);
|
|
202
|
+
if (!steps) {
|
|
203
|
+
throw new Error(
|
|
204
|
+
`No conversion path found from "${sourceShape}" to "${targetShape}" using converters: ${normalizedConverters.map((converter) => converter.id).join(", ")}`
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
let currentValue = input;
|
|
208
|
+
let currentShape = sourceShape;
|
|
209
|
+
const path = [sourceShape, ...steps.map((step) => step.shape)];
|
|
210
|
+
for (let stepIndex = 0; stepIndex < steps.length; stepIndex++) {
|
|
211
|
+
const step = steps[stepIndex];
|
|
212
|
+
const context = {
|
|
213
|
+
sourceShape,
|
|
214
|
+
targetShape,
|
|
215
|
+
currentShape,
|
|
216
|
+
path,
|
|
217
|
+
converters: normalizedConverters,
|
|
218
|
+
stepIndex
|
|
219
|
+
};
|
|
220
|
+
currentValue = step.converter.convert(currentValue, step.shape, options, context);
|
|
221
|
+
currentShape = step.shape;
|
|
222
|
+
}
|
|
223
|
+
return currentValue;
|
|
224
|
+
}
|
|
225
|
+
function detectSourceShape(input, converters) {
|
|
226
|
+
const detectedShapes = /* @__PURE__ */ new Set();
|
|
227
|
+
const fallbackShape = getShapeFromInput(input);
|
|
228
|
+
if (fallbackShape !== null) {
|
|
229
|
+
detectedShapes.add(fallbackShape);
|
|
230
|
+
}
|
|
231
|
+
for (const converter of converters) {
|
|
232
|
+
const detectedShape = converter.detectInputShape?.(input);
|
|
233
|
+
if (detectedShape) {
|
|
234
|
+
detectedShapes.add(detectedShape);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (detectedShapes.size === 0) {
|
|
238
|
+
throw new Error("Could not detect source shape for conversion input");
|
|
239
|
+
}
|
|
240
|
+
if (detectedShapes.size > 1) {
|
|
241
|
+
throw new Error(
|
|
242
|
+
`Ambiguous source shape for conversion input: ${Array.from(detectedShapes).join(", ")}`
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
return Array.from(detectedShapes)[0];
|
|
246
|
+
}
|
|
247
|
+
function getShapeFromInput(input) {
|
|
248
|
+
return typeof input === "object" && input !== null && "shape" in input && typeof input.shape === "string" ? input.shape : null;
|
|
249
|
+
}
|
|
250
|
+
function findConversionPath(sourceShape, targetShape, converters) {
|
|
251
|
+
const queue = [
|
|
252
|
+
{ shape: sourceShape, path: [] }
|
|
253
|
+
];
|
|
254
|
+
const visitedShapes = /* @__PURE__ */ new Set([sourceShape]);
|
|
255
|
+
while (queue.length > 0) {
|
|
256
|
+
const candidate = queue.shift();
|
|
257
|
+
for (const converter of converters) {
|
|
258
|
+
if (!converter.from.includes(candidate.shape)) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
for (const nextShape of converter.to) {
|
|
262
|
+
if (!converter.canConvert?.(candidate.shape, nextShape) && converter.canConvert !== void 0) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
const nextPath = [...candidate.path, { shape: nextShape, converter }];
|
|
266
|
+
if (nextShape === targetShape) {
|
|
267
|
+
return nextPath;
|
|
268
|
+
}
|
|
269
|
+
if (!visitedShapes.has(nextShape)) {
|
|
270
|
+
visitedShapes.add(nextShape);
|
|
271
|
+
queue.push({ shape: nextShape, path: nextPath });
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/schema-utils/lib/schema/convert-arrow-schema.ts
|
|
280
|
+
var arrow = __toESM(require("apache-arrow"), 1);
|
|
281
|
+
function getArrowViewTypeSupport() {
|
|
282
|
+
return {
|
|
283
|
+
binaryView: typeof getOptionalArrowConstructor("BinaryView") === "function",
|
|
284
|
+
utf8View: typeof getOptionalArrowConstructor("Utf8View") === "function"
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
function convertArrowToSchema(arrowSchema) {
|
|
288
|
+
return serializeArrowSchema(arrowSchema);
|
|
289
|
+
}
|
|
290
|
+
function convertSchemaToArrow(schema, options) {
|
|
291
|
+
return deserializeArrowSchema(schema, options);
|
|
292
|
+
}
|
|
293
|
+
function serializeArrowSchema(arrowSchema) {
|
|
294
|
+
return {
|
|
295
|
+
fields: arrowSchema.fields.map((arrowField) => serializeArrowField(arrowField)),
|
|
296
|
+
metadata: serializeArrowMetadata(arrowSchema.metadata)
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function deserializeArrowSchema(schema, options) {
|
|
300
|
+
return new arrow.Schema(
|
|
301
|
+
schema.fields.map((field) => deserializeArrowField(field, options)),
|
|
302
|
+
deserializeArrowMetadata(schema.metadata)
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
function serializeArrowMetadata(arrowMetadata) {
|
|
306
|
+
return Object.fromEntries(arrowMetadata);
|
|
307
|
+
}
|
|
308
|
+
function deserializeArrowMetadata(metadata) {
|
|
309
|
+
return metadata ? new Map(Object.entries(metadata)) : /* @__PURE__ */ new Map();
|
|
310
|
+
}
|
|
311
|
+
function serializeArrowField(field) {
|
|
312
|
+
return {
|
|
313
|
+
name: field.name,
|
|
314
|
+
type: serializeArrowType(field.type),
|
|
315
|
+
nullable: field.nullable,
|
|
316
|
+
metadata: serializeArrowMetadata(field.metadata)
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function deserializeArrowField(field, options) {
|
|
320
|
+
return new arrow.Field(
|
|
321
|
+
field.name,
|
|
322
|
+
deserializeArrowType(field.type, options),
|
|
323
|
+
field.nullable,
|
|
324
|
+
deserializeArrowMetadata(field.metadata)
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
function serializeArrowType(arrowType) {
|
|
328
|
+
if (isArrowViewType(arrowType, "BinaryView")) {
|
|
329
|
+
return "binary-view";
|
|
330
|
+
}
|
|
331
|
+
if (isArrowViewType(arrowType, "Utf8View")) {
|
|
332
|
+
return "utf8-view";
|
|
333
|
+
}
|
|
334
|
+
if (isOptionalArrowType(arrowType, "LargeList")) {
|
|
335
|
+
const largeListType = arrowType;
|
|
336
|
+
return {
|
|
337
|
+
type: "large-list",
|
|
338
|
+
children: [serializeArrowField(largeListType.valueField)]
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
switch (arrowType.constructor) {
|
|
342
|
+
case arrow.Null:
|
|
343
|
+
return "null";
|
|
344
|
+
case arrow.Binary:
|
|
345
|
+
return "binary";
|
|
346
|
+
case arrow.FixedSizeBinary:
|
|
347
|
+
return {
|
|
348
|
+
type: "fixed-size-binary",
|
|
349
|
+
byteWidth: arrowType.byteWidth
|
|
350
|
+
};
|
|
351
|
+
case arrow.Bool:
|
|
352
|
+
return "bool";
|
|
353
|
+
case arrow.Int:
|
|
354
|
+
const intType = arrowType;
|
|
355
|
+
return `${intType.isSigned ? "" : "u"}int${intType.bitWidth}`;
|
|
356
|
+
case arrow.Int8:
|
|
357
|
+
return "int8";
|
|
358
|
+
case arrow.Int16:
|
|
359
|
+
return "int16";
|
|
360
|
+
case arrow.Int32:
|
|
361
|
+
return "int32";
|
|
362
|
+
case arrow.Int64:
|
|
363
|
+
return "int64";
|
|
364
|
+
case arrow.Uint8:
|
|
365
|
+
return "uint8";
|
|
366
|
+
case arrow.Uint16:
|
|
367
|
+
return "uint16";
|
|
368
|
+
case arrow.Uint32:
|
|
369
|
+
return "uint32";
|
|
370
|
+
case arrow.Uint64:
|
|
371
|
+
return "uint64";
|
|
372
|
+
case arrow.Float:
|
|
373
|
+
const precision = arrowType.precision;
|
|
374
|
+
switch (precision) {
|
|
375
|
+
case arrow.Precision.HALF:
|
|
376
|
+
return "float16";
|
|
377
|
+
case arrow.Precision.SINGLE:
|
|
378
|
+
return "float32";
|
|
379
|
+
case arrow.Precision.DOUBLE:
|
|
380
|
+
return "float64";
|
|
381
|
+
default:
|
|
382
|
+
return "float16";
|
|
383
|
+
}
|
|
384
|
+
case arrow.Float16:
|
|
385
|
+
return "float16";
|
|
386
|
+
case arrow.Float32:
|
|
387
|
+
return "float32";
|
|
388
|
+
case arrow.Float64:
|
|
389
|
+
return "float64";
|
|
390
|
+
case arrow.Utf8:
|
|
391
|
+
return "utf8";
|
|
392
|
+
case arrow.Decimal:
|
|
393
|
+
const decimal = arrowType;
|
|
394
|
+
return {
|
|
395
|
+
type: "decimal",
|
|
396
|
+
bitWidth: decimal.bitWidth,
|
|
397
|
+
precision: decimal.precision,
|
|
398
|
+
scale: decimal.scale
|
|
399
|
+
};
|
|
400
|
+
case arrow.Date_:
|
|
401
|
+
const dateUnit = arrowType.unit;
|
|
402
|
+
return dateUnit === arrow.DateUnit.DAY ? "date-day" : "date-millisecond";
|
|
403
|
+
case arrow.DateDay:
|
|
404
|
+
return "date-day";
|
|
405
|
+
case arrow.DateMillisecond:
|
|
406
|
+
return "date-millisecond";
|
|
407
|
+
case arrow.Time:
|
|
408
|
+
const timeUnit = arrowType.unit;
|
|
409
|
+
switch (timeUnit) {
|
|
410
|
+
case arrow.TimeUnit.SECOND:
|
|
411
|
+
return "time-second";
|
|
412
|
+
case arrow.TimeUnit.MILLISECOND:
|
|
413
|
+
return "time-millisecond";
|
|
414
|
+
case arrow.TimeUnit.MICROSECOND:
|
|
415
|
+
return "time-microsecond";
|
|
416
|
+
case arrow.TimeUnit.NANOSECOND:
|
|
417
|
+
return "time-nanosecond";
|
|
418
|
+
default:
|
|
419
|
+
return "time-second";
|
|
420
|
+
}
|
|
421
|
+
case arrow.TimeMillisecond:
|
|
422
|
+
return "time-millisecond";
|
|
423
|
+
case arrow.TimeSecond:
|
|
424
|
+
return "time-second";
|
|
425
|
+
case arrow.TimeMicrosecond:
|
|
426
|
+
return "time-microsecond";
|
|
427
|
+
case arrow.TimeNanosecond:
|
|
428
|
+
return "time-nanosecond";
|
|
429
|
+
case arrow.Timestamp:
|
|
430
|
+
const timeStampUnit = arrowType.unit;
|
|
431
|
+
switch (timeStampUnit) {
|
|
432
|
+
case arrow.TimeUnit.SECOND:
|
|
433
|
+
return "timestamp-second";
|
|
434
|
+
case arrow.TimeUnit.MILLISECOND:
|
|
435
|
+
return "timestamp-millisecond";
|
|
436
|
+
case arrow.TimeUnit.MICROSECOND:
|
|
437
|
+
return "timestamp-microsecond";
|
|
438
|
+
case arrow.TimeUnit.NANOSECOND:
|
|
439
|
+
return "timestamp-nanosecond";
|
|
440
|
+
default:
|
|
441
|
+
return "timestamp-second";
|
|
442
|
+
}
|
|
443
|
+
case arrow.TimestampSecond:
|
|
444
|
+
return "timestamp-second";
|
|
445
|
+
case arrow.TimestampMillisecond:
|
|
446
|
+
return "timestamp-millisecond";
|
|
447
|
+
case arrow.TimestampMicrosecond:
|
|
448
|
+
return "timestamp-microsecond";
|
|
449
|
+
case arrow.TimestampNanosecond:
|
|
450
|
+
return "timestamp-nanosecond";
|
|
451
|
+
case arrow.Interval:
|
|
452
|
+
const intervalUnit = arrowType.unit;
|
|
453
|
+
switch (intervalUnit) {
|
|
454
|
+
case arrow.IntervalUnit.DAY_TIME:
|
|
455
|
+
return "interval-daytime";
|
|
456
|
+
case arrow.IntervalUnit.YEAR_MONTH:
|
|
457
|
+
return "interval-yearmonth";
|
|
458
|
+
default:
|
|
459
|
+
return "interval-daytime";
|
|
460
|
+
}
|
|
461
|
+
case arrow.IntervalDayTime:
|
|
462
|
+
return "interval-daytime";
|
|
463
|
+
case arrow.IntervalYearMonth:
|
|
464
|
+
return "interval-yearmonth";
|
|
465
|
+
case arrow.Map_:
|
|
466
|
+
const mapType = arrowType;
|
|
467
|
+
return {
|
|
468
|
+
type: "map",
|
|
469
|
+
keysSorted: mapType.keysSorted,
|
|
470
|
+
children: mapType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
471
|
+
};
|
|
472
|
+
case arrow.List:
|
|
473
|
+
const listType = arrowType;
|
|
474
|
+
const listField = listType.valueField;
|
|
475
|
+
return {
|
|
476
|
+
type: "list",
|
|
477
|
+
children: [serializeArrowField(listField)]
|
|
478
|
+
};
|
|
479
|
+
case arrow.FixedSizeList:
|
|
480
|
+
const fixedSizeList = arrowType;
|
|
481
|
+
return {
|
|
482
|
+
type: "fixed-size-list",
|
|
483
|
+
listSize: fixedSizeList.listSize,
|
|
484
|
+
children: [serializeArrowField(fixedSizeList.children[0])]
|
|
485
|
+
};
|
|
486
|
+
case arrow.Struct:
|
|
487
|
+
const structType = arrowType;
|
|
488
|
+
return {
|
|
489
|
+
type: "struct",
|
|
490
|
+
children: structType.children.map((arrowField) => serializeArrowField(arrowField))
|
|
491
|
+
};
|
|
492
|
+
case arrow.SparseUnion:
|
|
493
|
+
case arrow.DenseUnion:
|
|
494
|
+
const unionType = arrowType;
|
|
495
|
+
return {
|
|
496
|
+
type: unionType instanceof arrow.DenseUnion ? "dense-union" : "sparse-union",
|
|
497
|
+
typeIds: unionType.typeIds,
|
|
498
|
+
children: unionType.children.map((arrowField) => serializeArrowField(arrowField)),
|
|
499
|
+
typeIdToChildIndex: { ...unionType.typeIdToChildIndex }
|
|
500
|
+
};
|
|
501
|
+
case arrow.Dictionary:
|
|
502
|
+
const dictionaryType = arrowType;
|
|
503
|
+
return {
|
|
504
|
+
type: "dictionary",
|
|
505
|
+
id: dictionaryType.id,
|
|
506
|
+
indices: serializeArrowDictionaryKeyType(dictionaryType.indices),
|
|
507
|
+
dictionary: serializeArrowType(dictionaryType.dictionary),
|
|
508
|
+
isOrdered: dictionaryType.isOrdered
|
|
509
|
+
};
|
|
510
|
+
default:
|
|
511
|
+
throw new Error(`arrow type not supported: ${arrowType.constructor.name}`);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
function deserializeArrowType(dataType, options) {
|
|
515
|
+
if (typeof dataType === "object") {
|
|
516
|
+
switch (dataType.type) {
|
|
517
|
+
case "decimal":
|
|
518
|
+
return new arrow.Decimal(dataType.scale, dataType.precision, dataType.bitWidth);
|
|
519
|
+
case "map": {
|
|
520
|
+
const children = dataType.children.map(
|
|
521
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
522
|
+
);
|
|
523
|
+
return new arrow.Map_(children[0], dataType.keysSorted);
|
|
524
|
+
}
|
|
525
|
+
case "list": {
|
|
526
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
527
|
+
return new arrow.List(field);
|
|
528
|
+
}
|
|
529
|
+
case "large-list": {
|
|
530
|
+
const field = deserializeArrowField(dataType.children[0], options);
|
|
531
|
+
const LargeList = getOptionalArrowConstructor("LargeList");
|
|
532
|
+
if (!LargeList) {
|
|
533
|
+
throw new Error(
|
|
534
|
+
"LargeList requires an Apache Arrow runtime that exports the LargeList constructor"
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
return new LargeList(field);
|
|
538
|
+
}
|
|
539
|
+
case "fixed-size-list": {
|
|
540
|
+
const child = deserializeArrowField(dataType.children[0], options);
|
|
541
|
+
return new arrow.FixedSizeList(dataType.listSize, child);
|
|
542
|
+
}
|
|
543
|
+
case "fixed-size-binary":
|
|
544
|
+
return new arrow.FixedSizeBinary(dataType.byteWidth);
|
|
545
|
+
case "struct": {
|
|
546
|
+
const children = dataType.children.map(
|
|
547
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
548
|
+
);
|
|
549
|
+
return new arrow.Struct(children);
|
|
550
|
+
}
|
|
551
|
+
case "sparse-union":
|
|
552
|
+
case "dense-union": {
|
|
553
|
+
const children = dataType.children.map(
|
|
554
|
+
(arrowField) => deserializeArrowField(arrowField, options)
|
|
555
|
+
);
|
|
556
|
+
return dataType.type === "dense-union" ? new arrow.DenseUnion(dataType.typeIds, children) : new arrow.SparseUnion(dataType.typeIds, children);
|
|
557
|
+
}
|
|
558
|
+
case "dictionary": {
|
|
559
|
+
return new arrow.Dictionary(
|
|
560
|
+
deserializeArrowType(dataType.dictionary, options),
|
|
561
|
+
deserializeArrowDictionaryKeyType(dataType.indices),
|
|
562
|
+
dataType.id,
|
|
563
|
+
dataType.isOrdered
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
default:
|
|
567
|
+
throw new Error("array type not supported");
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
switch (dataType) {
|
|
571
|
+
case "null":
|
|
572
|
+
return new arrow.Null();
|
|
573
|
+
case "binary":
|
|
574
|
+
return makeVariableWidthArrowType("BinaryView", new arrow.Binary(), options);
|
|
575
|
+
case "binary-view":
|
|
576
|
+
return makeRequiredArrowViewType("BinaryView");
|
|
577
|
+
case "bool":
|
|
578
|
+
return new arrow.Bool();
|
|
579
|
+
case "int8":
|
|
580
|
+
return new arrow.Int8();
|
|
581
|
+
case "int16":
|
|
582
|
+
return new arrow.Int16();
|
|
583
|
+
case "int32":
|
|
584
|
+
return new arrow.Int32();
|
|
585
|
+
case "int64":
|
|
586
|
+
return new arrow.Int64();
|
|
587
|
+
case "uint8":
|
|
588
|
+
return new arrow.Uint8();
|
|
589
|
+
case "uint16":
|
|
590
|
+
return new arrow.Uint16();
|
|
591
|
+
case "uint32":
|
|
592
|
+
return new arrow.Uint32();
|
|
593
|
+
case "uint64":
|
|
594
|
+
return new arrow.Uint64();
|
|
595
|
+
case "float16":
|
|
596
|
+
return new arrow.Float16();
|
|
597
|
+
case "float32":
|
|
598
|
+
return new arrow.Float32();
|
|
599
|
+
case "float64":
|
|
600
|
+
return new arrow.Float64();
|
|
601
|
+
case "utf8":
|
|
602
|
+
return makeVariableWidthArrowType("Utf8View", new arrow.Utf8(), options);
|
|
603
|
+
case "utf8-view":
|
|
604
|
+
return makeRequiredArrowViewType("Utf8View");
|
|
605
|
+
case "date-day":
|
|
606
|
+
return new arrow.DateDay();
|
|
607
|
+
case "date-millisecond":
|
|
608
|
+
return new arrow.DateMillisecond();
|
|
609
|
+
case "time-second":
|
|
610
|
+
return new arrow.TimeSecond();
|
|
611
|
+
case "time-millisecond":
|
|
612
|
+
return new arrow.TimeMillisecond();
|
|
613
|
+
case "time-microsecond":
|
|
614
|
+
return new arrow.TimeMicrosecond();
|
|
615
|
+
case "time-nanosecond":
|
|
616
|
+
return new arrow.TimeNanosecond();
|
|
617
|
+
case "timestamp-second":
|
|
618
|
+
return new arrow.TimestampSecond();
|
|
619
|
+
case "timestamp-millisecond":
|
|
620
|
+
return new arrow.TimestampMillisecond();
|
|
621
|
+
case "timestamp-microsecond":
|
|
622
|
+
return new arrow.TimestampMicrosecond();
|
|
623
|
+
case "timestamp-nanosecond":
|
|
624
|
+
return new arrow.TimestampNanosecond();
|
|
625
|
+
case "interval-daytime":
|
|
626
|
+
return new arrow.IntervalDayTime();
|
|
627
|
+
case "interval-yearmonth":
|
|
628
|
+
return new arrow.IntervalYearMonth();
|
|
629
|
+
default:
|
|
630
|
+
throw new Error("array type not supported");
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
function getOptionalArrowConstructor(typeName) {
|
|
634
|
+
return arrow[typeName];
|
|
635
|
+
}
|
|
636
|
+
function isArrowViewType(arrowType, viewTypeName) {
|
|
637
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
638
|
+
if (constructor && arrowType instanceof constructor) {
|
|
639
|
+
return true;
|
|
640
|
+
}
|
|
641
|
+
const guards = arrow.DataType;
|
|
642
|
+
const guard = viewTypeName === "BinaryView" ? guards.isBinaryView : guards.isUtf8View;
|
|
643
|
+
return Boolean(guard?.(arrowType));
|
|
644
|
+
}
|
|
645
|
+
function isOptionalArrowType(arrowType, typeName) {
|
|
646
|
+
const constructor = getOptionalArrowConstructor(typeName);
|
|
647
|
+
return Boolean(constructor && arrowType instanceof constructor);
|
|
648
|
+
}
|
|
649
|
+
function makeVariableWidthArrowType(viewTypeName, fallbackType, options) {
|
|
650
|
+
const viewTypeMode = options?.viewTypes || "never";
|
|
651
|
+
if (viewTypeMode === "never") {
|
|
652
|
+
return fallbackType;
|
|
653
|
+
}
|
|
654
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
655
|
+
if (constructor) {
|
|
656
|
+
return new constructor();
|
|
657
|
+
}
|
|
658
|
+
if (viewTypeMode === "require") {
|
|
659
|
+
throw new Error(
|
|
660
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
661
|
+
);
|
|
662
|
+
}
|
|
663
|
+
return fallbackType;
|
|
664
|
+
}
|
|
665
|
+
function makeRequiredArrowViewType(viewTypeName) {
|
|
666
|
+
const constructor = getOptionalArrowConstructor(viewTypeName);
|
|
667
|
+
if (!constructor) {
|
|
668
|
+
throw new Error(
|
|
669
|
+
`${viewTypeName} requires apache-arrow 21.2.0 or later; the installed runtime does not support it`
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
return new constructor();
|
|
673
|
+
}
|
|
674
|
+
function serializeArrowDictionaryKeyType(arrowType) {
|
|
675
|
+
if (arrowType instanceof arrow.Int) {
|
|
676
|
+
const prefix = arrowType.isSigned ? "int" : "uint";
|
|
677
|
+
const keyType = `${prefix}${arrowType.bitWidth}`;
|
|
678
|
+
if (isSchemaDictionaryKeyType(keyType)) {
|
|
679
|
+
return keyType;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
switch (arrowType.constructor) {
|
|
683
|
+
case arrow.Int8:
|
|
684
|
+
return "int8";
|
|
685
|
+
case arrow.Int16:
|
|
686
|
+
return "int16";
|
|
687
|
+
case arrow.Int32:
|
|
688
|
+
return "int32";
|
|
689
|
+
case arrow.Uint8:
|
|
690
|
+
return "uint8";
|
|
691
|
+
case arrow.Uint16:
|
|
692
|
+
return "uint16";
|
|
693
|
+
case arrow.Uint32:
|
|
694
|
+
return "uint32";
|
|
695
|
+
default:
|
|
696
|
+
throw new Error(`arrow dictionary index type not supported: ${arrowType.constructor.name}`);
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
function isSchemaDictionaryKeyType(keyType) {
|
|
700
|
+
return ["int8", "int16", "int32", "uint8", "uint16", "uint32"].includes(keyType);
|
|
701
|
+
}
|
|
702
|
+
function deserializeArrowDictionaryKeyType(keyType) {
|
|
703
|
+
switch (keyType) {
|
|
704
|
+
case "int8":
|
|
705
|
+
return new arrow.Int8();
|
|
706
|
+
case "int16":
|
|
707
|
+
return new arrow.Int16();
|
|
708
|
+
case "int32":
|
|
709
|
+
return new arrow.Int32();
|
|
710
|
+
case "uint8":
|
|
711
|
+
return new arrow.Uint8();
|
|
712
|
+
case "uint16":
|
|
713
|
+
return new arrow.Uint16();
|
|
714
|
+
case "uint32":
|
|
715
|
+
return new arrow.Uint32();
|
|
716
|
+
default:
|
|
717
|
+
throw new Error(`schema dictionary index type not supported: ${keyType}`);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
// src/schema-utils/lib/schema/deduce-table-schema.ts
|
|
722
|
+
function deduceTableSchema(table) {
|
|
723
|
+
switch (table.shape) {
|
|
724
|
+
case "array-row-table":
|
|
725
|
+
case "object-row-table":
|
|
726
|
+
return deduceSchemaFromRows(table.data);
|
|
727
|
+
case "geojson-table":
|
|
728
|
+
return deduceSchemaFromGeoJSON(table.features);
|
|
729
|
+
case "columnar-table":
|
|
730
|
+
return deduceSchemaFromColumns(table.data);
|
|
731
|
+
case "arrow-table":
|
|
732
|
+
default:
|
|
733
|
+
throw new Error("Deduce schema");
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
function deduceSchemaFromColumns(columnarTable) {
|
|
737
|
+
const fields = [];
|
|
738
|
+
for (const [columnName, column] of Object.entries(columnarTable)) {
|
|
739
|
+
const field = deduceFieldFromColumn(column, columnName);
|
|
740
|
+
fields.push(field);
|
|
741
|
+
}
|
|
742
|
+
return { fields, metadata: {} };
|
|
743
|
+
}
|
|
744
|
+
function deduceSchemaFromRows(rowTable) {
|
|
745
|
+
if (!rowTable.length) {
|
|
746
|
+
throw new Error("deduce from empty table");
|
|
747
|
+
}
|
|
748
|
+
const fields = [];
|
|
749
|
+
const row0 = rowTable[0];
|
|
750
|
+
for (const [columnName, value] of Object.entries(row0)) {
|
|
751
|
+
fields.push(deduceFieldFromValue(value, columnName));
|
|
752
|
+
}
|
|
753
|
+
return { fields, metadata: {} };
|
|
754
|
+
}
|
|
755
|
+
function deduceSchemaFromGeoJSON(features) {
|
|
756
|
+
if (!features.length) {
|
|
757
|
+
throw new Error("deduce from empty table");
|
|
758
|
+
}
|
|
759
|
+
const fields = [];
|
|
760
|
+
const row0 = features[0].properties || {};
|
|
761
|
+
for (const [columnName, value] of Object.entries(row0)) {
|
|
762
|
+
fields.push(deduceFieldFromValue(value, columnName));
|
|
763
|
+
}
|
|
764
|
+
return { fields, metadata: {} };
|
|
765
|
+
}
|
|
766
|
+
function deduceFieldFromColumn(column, name) {
|
|
767
|
+
if (ArrayBuffer.isView(column)) {
|
|
768
|
+
const type = getDataTypeFromArray(column);
|
|
769
|
+
return {
|
|
770
|
+
name,
|
|
771
|
+
type: type.type || "null",
|
|
772
|
+
nullable: type.nullable
|
|
773
|
+
// metadata: {}
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
if (Array.isArray(column) && column.length > 0) {
|
|
777
|
+
const value = column[0];
|
|
778
|
+
const type = getDataTypeFromValue(value);
|
|
779
|
+
return {
|
|
780
|
+
name,
|
|
781
|
+
type,
|
|
782
|
+
nullable: true
|
|
783
|
+
// metadata: {},
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
throw new Error("empty table");
|
|
787
|
+
}
|
|
788
|
+
function deduceFieldFromValue(value, name) {
|
|
789
|
+
const type = getDataTypeFromValue(value);
|
|
790
|
+
return {
|
|
791
|
+
name,
|
|
792
|
+
type,
|
|
793
|
+
nullable: true
|
|
794
|
+
// metadata: {}
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
// src/schema-utils/lib/table/tables/make-table.ts
|
|
799
|
+
var arrow2 = __toESM(require("apache-arrow"), 1);
|
|
800
|
+
function makeTableFromData(data) {
|
|
801
|
+
let table;
|
|
802
|
+
switch (getTableShapeFromData(data)) {
|
|
803
|
+
case "array-row-table":
|
|
804
|
+
table = { shape: "array-row-table", data };
|
|
805
|
+
break;
|
|
806
|
+
case "object-row-table":
|
|
807
|
+
table = { shape: "object-row-table", data };
|
|
808
|
+
break;
|
|
809
|
+
case "columnar-table":
|
|
810
|
+
table = { shape: "columnar-table", data };
|
|
811
|
+
break;
|
|
812
|
+
case "arrow-table":
|
|
813
|
+
table = { shape: "arrow-table", data };
|
|
814
|
+
break;
|
|
815
|
+
default:
|
|
816
|
+
throw new Error("table");
|
|
817
|
+
}
|
|
818
|
+
const schema = deduceTableSchema(table);
|
|
819
|
+
return { ...table, schema };
|
|
820
|
+
}
|
|
821
|
+
function getTableShapeFromData(data) {
|
|
822
|
+
if (data instanceof arrow2.Table) {
|
|
823
|
+
return "arrow-table";
|
|
824
|
+
}
|
|
825
|
+
if (Array.isArray(data)) {
|
|
826
|
+
if (data.length === 0) {
|
|
827
|
+
throw new Error("cannot deduce type of empty table");
|
|
828
|
+
}
|
|
829
|
+
const firstRow = data[0];
|
|
830
|
+
if (Array.isArray(firstRow)) {
|
|
831
|
+
return "array-row-table";
|
|
832
|
+
}
|
|
833
|
+
if (firstRow && typeof firstRow === "object") {
|
|
834
|
+
return "object-row-table";
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
if (data && typeof data === "object") {
|
|
838
|
+
return "columnar-table";
|
|
839
|
+
}
|
|
840
|
+
throw new Error("invalid table");
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// src/schema-utils/lib/table/tables/table-accessors.ts
|
|
844
|
+
function isTable(table) {
|
|
845
|
+
const shape = typeof table === "object" && table?.shape;
|
|
846
|
+
switch (shape) {
|
|
847
|
+
case "array-row-table":
|
|
848
|
+
case "object-row-table":
|
|
849
|
+
return Array.isArray(table.data);
|
|
850
|
+
case "geojson-table":
|
|
851
|
+
return Array.isArray(table.features);
|
|
852
|
+
case "columnar-table":
|
|
853
|
+
return Boolean(table.data && typeof table.data === "object");
|
|
854
|
+
case "arrow-table":
|
|
855
|
+
return Boolean(table?.data?.numRows !== void 0);
|
|
856
|
+
default:
|
|
857
|
+
return false;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
function getTableLength(table) {
|
|
861
|
+
switch (table.shape) {
|
|
862
|
+
case "array-row-table":
|
|
863
|
+
case "object-row-table":
|
|
864
|
+
return table.data.length;
|
|
865
|
+
case "geojson-table":
|
|
866
|
+
return table.features.length;
|
|
867
|
+
case "arrow-table":
|
|
868
|
+
const arrowTable = table.data;
|
|
869
|
+
return arrowTable.numRows;
|
|
870
|
+
case "columnar-table":
|
|
871
|
+
for (const column of Object.values(table.data)) {
|
|
872
|
+
return column.length || 0;
|
|
873
|
+
}
|
|
874
|
+
return 0;
|
|
875
|
+
default:
|
|
876
|
+
throw new Error("table");
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
function getTableNumCols(table) {
|
|
880
|
+
if (table.schema) {
|
|
881
|
+
return table.schema.fields.length;
|
|
882
|
+
}
|
|
883
|
+
if (getTableLength(table) === 0) {
|
|
884
|
+
throw new Error("empty table");
|
|
885
|
+
}
|
|
886
|
+
switch (table.shape) {
|
|
887
|
+
case "array-row-table":
|
|
888
|
+
return table.data[0].length;
|
|
889
|
+
case "object-row-table":
|
|
890
|
+
return Object.keys(table.data[0]).length;
|
|
891
|
+
case "geojson-table":
|
|
892
|
+
return Object.keys(table.features[0]).length;
|
|
893
|
+
case "columnar-table":
|
|
894
|
+
return Object.keys(table.data).length;
|
|
895
|
+
case "arrow-table":
|
|
896
|
+
const arrowTable = table.data;
|
|
897
|
+
return arrowTable.numCols;
|
|
898
|
+
default:
|
|
899
|
+
throw new Error("table");
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
function getTableCell(table, rowIndex, columnName) {
|
|
903
|
+
switch (table.shape) {
|
|
904
|
+
case "array-row-table":
|
|
905
|
+
const columnIndex = getTableColumnIndex(table, columnName);
|
|
906
|
+
return table.data[rowIndex][columnIndex];
|
|
907
|
+
case "object-row-table":
|
|
908
|
+
return table.data[rowIndex][columnName];
|
|
909
|
+
case "geojson-table":
|
|
910
|
+
return table.features[rowIndex][columnName];
|
|
911
|
+
case "columnar-table":
|
|
912
|
+
const column = table.data[columnName];
|
|
913
|
+
return column[rowIndex];
|
|
914
|
+
case "arrow-table":
|
|
915
|
+
const arrowTable = table.data;
|
|
916
|
+
const arrowColumnIndex = arrowTable.schema.fields.findIndex(
|
|
917
|
+
(field) => field.name === columnName
|
|
918
|
+
);
|
|
919
|
+
return arrowTable.getChildAt(arrowColumnIndex)?.get(rowIndex);
|
|
920
|
+
default:
|
|
921
|
+
throw new Error("todo");
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function getTableCellAt(table, rowIndex, columnIndex) {
|
|
925
|
+
switch (table.shape) {
|
|
926
|
+
case "array-row-table":
|
|
927
|
+
return table.data[rowIndex][columnIndex];
|
|
928
|
+
case "object-row-table":
|
|
929
|
+
const columnName1 = getTableColumnName(table, columnIndex);
|
|
930
|
+
return table.data[rowIndex][columnName1];
|
|
931
|
+
case "geojson-table":
|
|
932
|
+
const columnName2 = getTableColumnName(table, columnIndex);
|
|
933
|
+
return table.features[rowIndex][columnName2];
|
|
934
|
+
case "columnar-table":
|
|
935
|
+
const columnName3 = getTableColumnName(table, columnIndex);
|
|
936
|
+
const column = table.data[columnName3];
|
|
937
|
+
return column[rowIndex];
|
|
938
|
+
case "arrow-table":
|
|
939
|
+
const arrowTable = table.data;
|
|
940
|
+
return arrowTable.getChildAt(columnIndex)?.get(rowIndex);
|
|
941
|
+
default:
|
|
942
|
+
throw new Error("todo");
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
function getTableRowShape(table) {
|
|
946
|
+
switch (table.shape) {
|
|
947
|
+
case "array-row-table":
|
|
948
|
+
case "object-row-table":
|
|
949
|
+
return table.shape;
|
|
950
|
+
case "geojson-table":
|
|
951
|
+
return "object-row-table";
|
|
952
|
+
case "columnar-table":
|
|
953
|
+
default:
|
|
954
|
+
throw new Error("Not a row table");
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
function getTableColumnIndex(table, columnName) {
|
|
958
|
+
const columnIndex = table.schema?.fields.findIndex((field) => field.name === columnName);
|
|
959
|
+
if (columnIndex === void 0) {
|
|
960
|
+
throw new Error(columnName);
|
|
961
|
+
}
|
|
962
|
+
return columnIndex;
|
|
963
|
+
}
|
|
964
|
+
function getTableColumnName(table, columnIndex) {
|
|
965
|
+
const columnName = table.schema?.fields[columnIndex]?.name;
|
|
966
|
+
if (!columnName) {
|
|
967
|
+
throw new Error(`${columnIndex}`);
|
|
968
|
+
}
|
|
969
|
+
return columnName;
|
|
970
|
+
}
|
|
971
|
+
function getTableRowAsObject(table, rowIndex, target, copy) {
|
|
972
|
+
switch (table.shape) {
|
|
973
|
+
case "object-row-table":
|
|
974
|
+
return copy ? Object.fromEntries(Object.entries(table.data[rowIndex])) : table.data[rowIndex];
|
|
975
|
+
case "array-row-table":
|
|
976
|
+
if (table.schema) {
|
|
977
|
+
const objectRow2 = target || {};
|
|
978
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
979
|
+
objectRow2[table.schema.fields[i].name] = table.data[rowIndex][i];
|
|
980
|
+
}
|
|
981
|
+
return objectRow2;
|
|
982
|
+
}
|
|
983
|
+
throw new Error("no schema");
|
|
984
|
+
case "geojson-table":
|
|
985
|
+
if (table.schema) {
|
|
986
|
+
const objectRow2 = target || {};
|
|
987
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
988
|
+
objectRow2[table.schema.fields[i].name] = table.features[rowIndex][table.schema.fields[i].name];
|
|
989
|
+
}
|
|
990
|
+
return objectRow2;
|
|
991
|
+
}
|
|
992
|
+
throw new Error("no schema");
|
|
993
|
+
case "columnar-table":
|
|
994
|
+
if (table.schema) {
|
|
995
|
+
const objectRow2 = target || {};
|
|
996
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
997
|
+
objectRow2[table.schema.fields[i].name] = table.data[table.schema.fields[i].name][rowIndex];
|
|
998
|
+
}
|
|
999
|
+
return objectRow2;
|
|
1000
|
+
} else {
|
|
1001
|
+
const objectRow2 = target || {};
|
|
1002
|
+
for (const [name, column] of Object.entries(table.data)) {
|
|
1003
|
+
objectRow2[name] = column[rowIndex];
|
|
1004
|
+
}
|
|
1005
|
+
return objectRow2;
|
|
1006
|
+
}
|
|
1007
|
+
case "arrow-table":
|
|
1008
|
+
const arrowTable = table.data;
|
|
1009
|
+
const objectRow = target || {};
|
|
1010
|
+
const row = arrowTable.get(rowIndex);
|
|
1011
|
+
const schema = arrowTable.schema;
|
|
1012
|
+
for (let i = 0; i < schema.fields.length; i++) {
|
|
1013
|
+
objectRow[schema.fields[i].name] = row?.[schema.fields[i].name];
|
|
1014
|
+
}
|
|
1015
|
+
return objectRow;
|
|
1016
|
+
default:
|
|
1017
|
+
throw new Error("shape");
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
function getTableRowAsArray(table, rowIndex, target, copy) {
|
|
1021
|
+
switch (table.shape) {
|
|
1022
|
+
case "array-row-table":
|
|
1023
|
+
return copy ? Array.from(table.data[rowIndex]) : table.data[rowIndex];
|
|
1024
|
+
case "object-row-table":
|
|
1025
|
+
if (table.schema) {
|
|
1026
|
+
const arrayRow2 = target || [];
|
|
1027
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
1028
|
+
arrayRow2[i] = table.data[rowIndex][table.schema.fields[i].name];
|
|
1029
|
+
}
|
|
1030
|
+
return arrayRow2;
|
|
1031
|
+
}
|
|
1032
|
+
return Object.values(table.data[rowIndex]);
|
|
1033
|
+
case "geojson-table":
|
|
1034
|
+
if (table.schema) {
|
|
1035
|
+
const arrayRow2 = target || [];
|
|
1036
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
1037
|
+
arrayRow2[i] = table.features[rowIndex][table.schema.fields[i].name];
|
|
1038
|
+
}
|
|
1039
|
+
return arrayRow2;
|
|
1040
|
+
}
|
|
1041
|
+
return Object.values(table.features[rowIndex]);
|
|
1042
|
+
case "columnar-table":
|
|
1043
|
+
if (table.schema) {
|
|
1044
|
+
const arrayRow2 = target || [];
|
|
1045
|
+
for (let i = 0; i < table.schema.fields.length; i++) {
|
|
1046
|
+
arrayRow2[i] = table.data[table.schema.fields[i].name][rowIndex];
|
|
1047
|
+
}
|
|
1048
|
+
return arrayRow2;
|
|
1049
|
+
} else {
|
|
1050
|
+
const arrayRow2 = target || [];
|
|
1051
|
+
let i = 0;
|
|
1052
|
+
for (const column of Object.values(table.data)) {
|
|
1053
|
+
arrayRow2[i] = column[rowIndex];
|
|
1054
|
+
i++;
|
|
1055
|
+
}
|
|
1056
|
+
return arrayRow2;
|
|
1057
|
+
}
|
|
1058
|
+
case "arrow-table":
|
|
1059
|
+
const arrowTable = table.data;
|
|
1060
|
+
const arrayRow = target || [];
|
|
1061
|
+
const row = arrowTable.get(rowIndex);
|
|
1062
|
+
const schema = arrowTable.schema;
|
|
1063
|
+
for (let i = 0; i < schema.fields.length; i++) {
|
|
1064
|
+
arrayRow[i] = row?.[schema.fields[i].name];
|
|
1065
|
+
}
|
|
1066
|
+
return arrayRow;
|
|
1067
|
+
default:
|
|
1068
|
+
throw new Error("shape");
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
function* makeRowIterator(table, shape) {
|
|
1072
|
+
switch (shape) {
|
|
1073
|
+
case "array-row-table":
|
|
1074
|
+
yield* makeArrayRowIterator(table);
|
|
1075
|
+
break;
|
|
1076
|
+
case "object-row-table":
|
|
1077
|
+
yield* makeObjectRowIterator(table);
|
|
1078
|
+
break;
|
|
1079
|
+
default:
|
|
1080
|
+
throw new Error(`Unknown row type ${shape}`);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
function* makeArrayRowIterator(table, target = []) {
|
|
1084
|
+
const length = getTableLength(table);
|
|
1085
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1086
|
+
yield getTableRowAsArray(table, rowIndex, target);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
function* makeObjectRowIterator(table, target = {}) {
|
|
1090
|
+
const length = getTableLength(table);
|
|
1091
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1092
|
+
yield getTableRowAsObject(table, rowIndex, target);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
// src/schema-utils/lib/table/batches/make-table-from-batches.ts
|
|
1097
|
+
async function makeTableFromBatches(batchIterator) {
|
|
1098
|
+
let arrayRows;
|
|
1099
|
+
let objectRows;
|
|
1100
|
+
let features;
|
|
1101
|
+
let shape = null;
|
|
1102
|
+
let schema;
|
|
1103
|
+
for await (const batch of batchIterator) {
|
|
1104
|
+
shape = shape || batch.shape;
|
|
1105
|
+
schema = schema || batch.schema;
|
|
1106
|
+
switch (batch.shape) {
|
|
1107
|
+
case "array-row-table":
|
|
1108
|
+
arrayRows = arrayRows || [];
|
|
1109
|
+
for (let rowIndex = 0; rowIndex < getTableLength(batch); rowIndex++) {
|
|
1110
|
+
const row = batch.data[rowIndex];
|
|
1111
|
+
arrayRows.push(row);
|
|
1112
|
+
}
|
|
1113
|
+
break;
|
|
1114
|
+
case "object-row-table":
|
|
1115
|
+
objectRows = objectRows || [];
|
|
1116
|
+
for (let rowIndex = 0; rowIndex < getTableLength(batch); rowIndex++) {
|
|
1117
|
+
const row = batch.data[rowIndex];
|
|
1118
|
+
objectRows.push(row);
|
|
1119
|
+
}
|
|
1120
|
+
break;
|
|
1121
|
+
case "geojson-table":
|
|
1122
|
+
features = features || [];
|
|
1123
|
+
for (let rowIndex = 0; rowIndex < getTableLength(batch); rowIndex++) {
|
|
1124
|
+
const row = batch.features[rowIndex];
|
|
1125
|
+
features.push(row);
|
|
1126
|
+
}
|
|
1127
|
+
break;
|
|
1128
|
+
case "columnar-table":
|
|
1129
|
+
case "arrow-table":
|
|
1130
|
+
default:
|
|
1131
|
+
throw new Error("shape");
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
if (!shape) {
|
|
1135
|
+
return null;
|
|
1136
|
+
}
|
|
1137
|
+
switch (shape) {
|
|
1138
|
+
case "array-row-table":
|
|
1139
|
+
return { shape: "array-row-table", data: arrayRows, schema };
|
|
1140
|
+
case "object-row-table":
|
|
1141
|
+
return { shape: "object-row-table", data: objectRows, schema };
|
|
1142
|
+
case "geojson-table":
|
|
1143
|
+
return { shape: "geojson-table", type: "FeatureCollection", features, schema };
|
|
1144
|
+
default:
|
|
1145
|
+
return null;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
// src/schema-utils/lib/table/tables/table-column.ts
|
|
1150
|
+
function makeColumnFromField(field, length) {
|
|
1151
|
+
const ArrayType = getArrayTypeFromDataType(field.type, field.nullable);
|
|
1152
|
+
return new ArrayType(length);
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
// src/schema-utils/lib/table/tables/convert-arrow-table.ts
|
|
1156
|
+
var arrow4 = __toESM(require("apache-arrow"), 1);
|
|
1157
|
+
|
|
1158
|
+
// src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts
|
|
1159
|
+
var arrow3 = __toESM(require("apache-arrow"), 1);
|
|
1160
|
+
function* makeArrowTableBatchIterator(table, options) {
|
|
1161
|
+
for (const batch of makeArrowRecordBatchIterator(table, options)) {
|
|
1162
|
+
const arrowTable = new arrow3.Table([batch]);
|
|
1163
|
+
yield {
|
|
1164
|
+
...batch,
|
|
1165
|
+
shape: "arrow-table",
|
|
1166
|
+
schema: table.schema,
|
|
1167
|
+
batchType: "data",
|
|
1168
|
+
length: arrowTable.numRows,
|
|
1169
|
+
data: arrowTable
|
|
1170
|
+
};
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
function* makeArrowRecordBatchIterator(table, options) {
|
|
1174
|
+
const arrowSchema = convertSchemaToArrow(table.schema);
|
|
1175
|
+
const length = getTableLength(table);
|
|
1176
|
+
const numColumns = getTableNumCols(table);
|
|
1177
|
+
const batchSize = options?.batchSize || length;
|
|
1178
|
+
const builders = arrowSchema?.fields.map(
|
|
1179
|
+
(arrowField) => arrow3.makeBuilder({
|
|
1180
|
+
type: arrowField.type,
|
|
1181
|
+
nullValues: [null, void 0]
|
|
1182
|
+
})
|
|
1183
|
+
);
|
|
1184
|
+
const structField = new arrow3.Struct(arrowSchema.fields);
|
|
1185
|
+
let batchLength = 0;
|
|
1186
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1187
|
+
for (let columnIndex = 0; columnIndex < numColumns; ++columnIndex) {
|
|
1188
|
+
const value = getTableCellAt(table, rowIndex, columnIndex);
|
|
1189
|
+
const builder = builders[columnIndex];
|
|
1190
|
+
builder.append(value);
|
|
1191
|
+
}
|
|
1192
|
+
batchLength++;
|
|
1193
|
+
if (batchLength >= batchSize) {
|
|
1194
|
+
const datas = builders.map((builder) => builder.flush());
|
|
1195
|
+
const structData = new arrow3.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
1196
|
+
yield new arrow3.RecordBatch(arrowSchema, structData);
|
|
1197
|
+
batchLength = 0;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
if (batchLength > 0) {
|
|
1201
|
+
const datas = builders.map((builder) => builder.flush());
|
|
1202
|
+
const structData = new arrow3.Data(structField, 0, batchLength, 0, void 0, datas);
|
|
1203
|
+
yield new arrow3.RecordBatch(arrowSchema, structData);
|
|
1204
|
+
batchLength = 0;
|
|
1205
|
+
}
|
|
1206
|
+
builders.map((builder) => builder.finish());
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// src/schema-utils/lib/table/tables/convert-arrow-table.ts
|
|
1210
|
+
function convertTableToArrow(table, options) {
|
|
1211
|
+
switch (table.shape) {
|
|
1212
|
+
case "arrow-table":
|
|
1213
|
+
return table.data;
|
|
1214
|
+
case "columnar-table":
|
|
1215
|
+
// TODO - optimized implementation is possible
|
|
1216
|
+
// return convertColumnarTableToArrow(table, options);
|
|
1217
|
+
// fall through
|
|
1218
|
+
default:
|
|
1219
|
+
const arrowBatchIterator = makeArrowRecordBatchIterator(table, options);
|
|
1220
|
+
return new arrow4.Table(arrowBatchIterator);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
function convertArrowToTable(arrowTable, shape) {
|
|
1224
|
+
switch (shape) {
|
|
1225
|
+
case "arrow-table":
|
|
1226
|
+
return convertArrowToArrowTable(arrowTable);
|
|
1227
|
+
case "array-row-table":
|
|
1228
|
+
return convertArrowToArrayRowTable(arrowTable);
|
|
1229
|
+
case "object-row-table":
|
|
1230
|
+
return convertArrowToObjectRowTable(arrowTable);
|
|
1231
|
+
case "columnar-table":
|
|
1232
|
+
return convertArrowToColumnarTable(arrowTable);
|
|
1233
|
+
case "geojson-table":
|
|
1234
|
+
return convertArrowToGeoJSONTable(arrowTable);
|
|
1235
|
+
default:
|
|
1236
|
+
throw new Error(shape);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
function convertArrowToArrowTable(arrowTable) {
|
|
1240
|
+
return {
|
|
1241
|
+
shape: "arrow-table",
|
|
1242
|
+
schema: convertArrowToSchema(arrowTable.schema),
|
|
1243
|
+
data: arrowTable
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
function convertArrowToArrayRowTable(arrowTable) {
|
|
1247
|
+
const columnarTable = convertArrowToColumnarTable(arrowTable);
|
|
1248
|
+
return convertTable(columnarTable, "array-row-table");
|
|
1249
|
+
}
|
|
1250
|
+
function convertArrowToObjectRowTable(arrowTable) {
|
|
1251
|
+
const columnarTable = convertArrowToColumnarTable(arrowTable);
|
|
1252
|
+
return convertTable(columnarTable, "object-row-table");
|
|
1253
|
+
}
|
|
1254
|
+
function convertArrowToColumnarTable(arrowTable) {
|
|
1255
|
+
const columns = {};
|
|
1256
|
+
for (const field of arrowTable.schema.fields) {
|
|
1257
|
+
const arrowColumn = arrowTable.getChild(field.name);
|
|
1258
|
+
const values = arrowColumn?.toArray();
|
|
1259
|
+
columns[field.name] = values;
|
|
1260
|
+
}
|
|
1261
|
+
const schema = convertArrowToSchema(arrowTable.schema);
|
|
1262
|
+
return {
|
|
1263
|
+
shape: "columnar-table",
|
|
1264
|
+
schema,
|
|
1265
|
+
data: columns
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
function convertArrowToGeoJSONTable(arrowTable) {
|
|
1269
|
+
const schema = convertArrowToSchema(arrowTable.schema);
|
|
1270
|
+
const features = [];
|
|
1271
|
+
for (let row = 0; row < arrowTable.numRows; row++) {
|
|
1272
|
+
const properties = arrowTable.get(row)?.toJSON() || {};
|
|
1273
|
+
features.push({ type: "Feature", geometry: null, properties });
|
|
1274
|
+
}
|
|
1275
|
+
return {
|
|
1276
|
+
shape: "geojson-table",
|
|
1277
|
+
type: "FeatureCollection",
|
|
1278
|
+
schema,
|
|
1279
|
+
features
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// src/schema-utils/lib/table/tables/convert-table.ts
|
|
1284
|
+
function convertTable(table, shape) {
|
|
1285
|
+
switch (shape) {
|
|
1286
|
+
case "object-row-table":
|
|
1287
|
+
return convertToObjectRowTable(table);
|
|
1288
|
+
case "array-row-table":
|
|
1289
|
+
return convertToArrayRowTable(table);
|
|
1290
|
+
case "columnar-table":
|
|
1291
|
+
return convertToColumnarTable(table);
|
|
1292
|
+
case "arrow-table":
|
|
1293
|
+
return convertToArrowTable(table);
|
|
1294
|
+
default:
|
|
1295
|
+
throw new Error(shape);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
function convertToColumnarTable(table) {
|
|
1299
|
+
const schema = table.schema || deduceTableSchema(table);
|
|
1300
|
+
const fields = schema.fields;
|
|
1301
|
+
if (table.shape === "columnar-table") {
|
|
1302
|
+
return { ...table, schema };
|
|
1303
|
+
}
|
|
1304
|
+
const length = getTableLength(table);
|
|
1305
|
+
const columns = {};
|
|
1306
|
+
for (const field of fields) {
|
|
1307
|
+
const column = makeColumnFromField(field, length);
|
|
1308
|
+
columns[field.name] = column;
|
|
1309
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1310
|
+
column[rowIndex] = getTableCell(table, rowIndex, field.name);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
return {
|
|
1314
|
+
shape: "columnar-table",
|
|
1315
|
+
schema,
|
|
1316
|
+
data: columns
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
function convertToArrayRowTable(table) {
|
|
1320
|
+
if (table.shape === "array-row-table") {
|
|
1321
|
+
return table;
|
|
1322
|
+
}
|
|
1323
|
+
const length = getTableLength(table);
|
|
1324
|
+
const data = new Array(length);
|
|
1325
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1326
|
+
data[rowIndex] = getTableRowAsArray(table, rowIndex);
|
|
1327
|
+
}
|
|
1328
|
+
return {
|
|
1329
|
+
shape: "array-row-table",
|
|
1330
|
+
schema: table.schema,
|
|
1331
|
+
data
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
function convertToObjectRowTable(table) {
|
|
1335
|
+
if (table.shape === "object-row-table") {
|
|
1336
|
+
return table;
|
|
1337
|
+
}
|
|
1338
|
+
const length = getTableLength(table);
|
|
1339
|
+
const data = new Array(length);
|
|
1340
|
+
for (let rowIndex = 0; rowIndex < length; rowIndex++) {
|
|
1341
|
+
data[rowIndex] = getTableRowAsObject(table, rowIndex);
|
|
1342
|
+
}
|
|
1343
|
+
return {
|
|
1344
|
+
shape: "object-row-table",
|
|
1345
|
+
schema: table.schema,
|
|
1346
|
+
data
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
function convertToArrowTable(table) {
|
|
1350
|
+
const schema = table.schema || deduceTableSchema(table);
|
|
1351
|
+
const arrowTable = convertTableToArrow({ ...table, schema });
|
|
1352
|
+
return {
|
|
1353
|
+
shape: "arrow-table",
|
|
1354
|
+
schema,
|
|
1355
|
+
data: arrowTable
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
// src/schema-utils/lib/table/tables/table-converter/convert-tables.ts
|
|
1360
|
+
function convertTables(table, shape) {
|
|
1361
|
+
switch (shape) {
|
|
1362
|
+
case "object-row-table":
|
|
1363
|
+
return convertTable(table, "object-row-table");
|
|
1364
|
+
case "array-row-table":
|
|
1365
|
+
return convertTable(table, "array-row-table");
|
|
1366
|
+
case "columnar-table":
|
|
1367
|
+
return convertTable(table, "columnar-table");
|
|
1368
|
+
case "arrow-table":
|
|
1369
|
+
return convertTable(table, "arrow-table");
|
|
1370
|
+
default:
|
|
1371
|
+
throw new Error(`Unsupported table conversion target: ${shape}`);
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// src/schema-utils/lib/table/tables/table-converter/table-converter.ts
|
|
1376
|
+
var TableConverter = {
|
|
1377
|
+
id: "table",
|
|
1378
|
+
from: ["object-row-table", "array-row-table", "columnar-table", "arrow-table"],
|
|
1379
|
+
to: ["object-row-table", "array-row-table", "columnar-table", "arrow-table"],
|
|
1380
|
+
canConvert(sourceShape, targetShape) {
|
|
1381
|
+
return sourceShape !== targetShape;
|
|
1382
|
+
},
|
|
1383
|
+
detectInputShape(input) {
|
|
1384
|
+
if (typeof input === "object" && input !== null && "shape" in input && typeof input.shape === "string" && ["object-row-table", "array-row-table", "columnar-table", "arrow-table"].includes(input.shape)) {
|
|
1385
|
+
return input.shape;
|
|
1386
|
+
}
|
|
1387
|
+
return null;
|
|
1388
|
+
},
|
|
1389
|
+
convert(input, targetShape) {
|
|
1390
|
+
switch (targetShape) {
|
|
1391
|
+
case "object-row-table":
|
|
1392
|
+
return convertTables(input, "object-row-table");
|
|
1393
|
+
case "array-row-table":
|
|
1394
|
+
return convertTables(input, "array-row-table");
|
|
1395
|
+
case "columnar-table":
|
|
1396
|
+
return convertTables(input, "columnar-table");
|
|
1397
|
+
case "arrow-table":
|
|
1398
|
+
return convertTables(input, "arrow-table");
|
|
1399
|
+
default:
|
|
1400
|
+
throw new Error(`Unsupported table conversion target: ${targetShape}`);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
};
|
|
1404
|
+
var TABLE_CONVERTERS = [TableConverter];
|
|
1405
|
+
|
|
1406
|
+
// src/schema-utils/lib/table/tables/row-utils.ts
|
|
1407
|
+
function convertToObjectRow(arrayRow, headers) {
|
|
1408
|
+
if (!arrayRow) {
|
|
1409
|
+
throw new Error("null row");
|
|
1410
|
+
}
|
|
1411
|
+
const objectRow = {};
|
|
1412
|
+
if (headers) {
|
|
1413
|
+
for (let i = 0; i < headers.length; i++) {
|
|
1414
|
+
objectRow[headers[i]] = arrayRow[i];
|
|
1415
|
+
}
|
|
1416
|
+
} else {
|
|
1417
|
+
for (let i = 0; i < arrayRow.length; i++) {
|
|
1418
|
+
const columnName = `column-${i}`;
|
|
1419
|
+
objectRow[columnName] = arrayRow[i];
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return objectRow;
|
|
1423
|
+
}
|
|
1424
|
+
function convertToArrayRow(objectRow, headers) {
|
|
1425
|
+
if (!objectRow) {
|
|
1426
|
+
throw new Error("null row");
|
|
1427
|
+
}
|
|
1428
|
+
if (headers) {
|
|
1429
|
+
const arrayRow = new Array(headers.length);
|
|
1430
|
+
for (let i = 0; i < headers.length; i++) {
|
|
1431
|
+
arrayRow[i] = objectRow[headers[i]];
|
|
1432
|
+
}
|
|
1433
|
+
return arrayRow;
|
|
1434
|
+
}
|
|
1435
|
+
return Object.values(objectRow);
|
|
1436
|
+
}
|
|
1437
|
+
function inferHeadersFromArrayRow(arrayRow) {
|
|
1438
|
+
const headers = [];
|
|
1439
|
+
for (let i = 0; i < arrayRow.length; i++) {
|
|
1440
|
+
const columnName = `column-${i}`;
|
|
1441
|
+
headers.push(columnName);
|
|
1442
|
+
}
|
|
1443
|
+
return headers;
|
|
1444
|
+
}
|
|
1445
|
+
function inferHeadersFromObjectRow(row) {
|
|
1446
|
+
return Object.keys(row);
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
// src/schema-utils/deprecated.ts
|
|
1450
|
+
var convertTable2 = ((...args) => convertTable(
|
|
1451
|
+
...args
|
|
1452
|
+
));
|
|
1453
|
+
var convertArrowToTable2 = ((...args) => convertArrowToTable(
|
|
1454
|
+
...args
|
|
1455
|
+
));
|
|
1456
|
+
var convertTableToArrow2 = ((...args) => convertTableToArrow(
|
|
1457
|
+
...args
|
|
1458
|
+
));
|
|
1459
|
+
var convertToObjectRow2 = ((...args) => convertToObjectRow(
|
|
1460
|
+
...args
|
|
1461
|
+
));
|
|
1462
|
+
var convertToArrayRow2 = ((...args) => convertToArrayRow(
|
|
1463
|
+
...args
|
|
1464
|
+
));
|
|
1465
|
+
|
|
1466
|
+
// src/schema-utils/lib/table/batches/make-table-batch-iterator.ts
|
|
1467
|
+
function* makeTableBatchIterator(table) {
|
|
1468
|
+
yield makeBatchFromTable(table);
|
|
1469
|
+
}
|
|
1470
|
+
function makeBatchFromTable(table) {
|
|
1471
|
+
return { ...table, length: getTableLength(table), batchType: "data" };
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
// src/schema-utils/lib/table/query-arrow-table.ts
|
|
1475
|
+
var arrow5 = __toESM(require("apache-arrow"), 1);
|
|
1476
|
+
function queryArrowTable(table, options = {}, filterRows) {
|
|
1477
|
+
const availableColumns = table.data.schema.fields.map((field) => field.name);
|
|
1478
|
+
const selectedColumns = options.columns ? [...options.columns] : availableColumns;
|
|
1479
|
+
for (const columnName of selectedColumns) {
|
|
1480
|
+
if (!availableColumns.includes(columnName)) {
|
|
1481
|
+
throw new Error(`Arrow table query could not read column "${columnName}".`);
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
let rowIndices;
|
|
1485
|
+
if (options.predicate !== void 0) {
|
|
1486
|
+
if (!filterRows) throw new Error("Arrow table query requires a predicate evaluator.");
|
|
1487
|
+
const columns = Object.fromEntries(
|
|
1488
|
+
availableColumns.map((name) => [name, [...table.data.getChild(name) || []]])
|
|
1489
|
+
);
|
|
1490
|
+
rowIndices = filterRows(options.predicate, columns, table.data.numRows);
|
|
1491
|
+
}
|
|
1492
|
+
const limitedRowIndices = rowIndices ? rowIndices.slice(0, options.limit ?? Number.POSITIVE_INFINITY) : void 0;
|
|
1493
|
+
const data = limitedRowIndices ? createArrowTableFromRowIndices(table.data, selectedColumns, limitedRowIndices) : table.data.select(selectedColumns).slice(0, options.limit ?? Number.POSITIVE_INFINITY);
|
|
1494
|
+
const schema = table.schema ? {
|
|
1495
|
+
...table.schema,
|
|
1496
|
+
fields: selectedColumns.flatMap(
|
|
1497
|
+
(columnName) => table.schema?.fields.filter((field) => field.name === columnName) || []
|
|
1498
|
+
)
|
|
1499
|
+
} : void 0;
|
|
1500
|
+
return schema ? { shape: "arrow-table", schema, data } : { shape: "arrow-table", data };
|
|
1501
|
+
}
|
|
1502
|
+
function selectArrowTableRows(table, rowIndices, columns, limit) {
|
|
1503
|
+
const availableColumns = table.data.schema.fields.map((field) => field.name);
|
|
1504
|
+
const selectedColumns = columns ? [...columns] : availableColumns;
|
|
1505
|
+
for (const columnName of selectedColumns) {
|
|
1506
|
+
if (!availableColumns.includes(columnName)) {
|
|
1507
|
+
throw new Error(`Arrow table query could not read column "${columnName}".`);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
const limitedRowIndices = rowIndices.slice(0, limit ?? Number.POSITIVE_INFINITY);
|
|
1511
|
+
const data = createArrowTableFromRowIndices(table.data, selectedColumns, limitedRowIndices);
|
|
1512
|
+
const schema = table.schema ? {
|
|
1513
|
+
...table.schema,
|
|
1514
|
+
fields: selectedColumns.flatMap(
|
|
1515
|
+
(columnName) => table.schema?.fields.filter((field) => field.name === columnName) || []
|
|
1516
|
+
)
|
|
1517
|
+
} : void 0;
|
|
1518
|
+
return schema ? { shape: "arrow-table", schema, data } : { shape: "arrow-table", data };
|
|
1519
|
+
}
|
|
1520
|
+
function createArrowTableFromRowIndices(sourceData, selectedColumns, rowIndices) {
|
|
1521
|
+
const schema = new arrow5.Schema(
|
|
1522
|
+
selectedColumns.map(
|
|
1523
|
+
(columnName) => sourceData.schema.fields.find((field) => field.name === columnName)
|
|
1524
|
+
)
|
|
1525
|
+
);
|
|
1526
|
+
const vectors = Object.fromEntries(
|
|
1527
|
+
selectedColumns.map((columnName) => {
|
|
1528
|
+
const sourceVector = sourceData.getChild(columnName);
|
|
1529
|
+
return [
|
|
1530
|
+
columnName,
|
|
1531
|
+
arrow5.vectorFromArray(
|
|
1532
|
+
rowIndices.map((rowIndex) => sourceVector?.get(rowIndex)),
|
|
1533
|
+
sourceVector?.type
|
|
1534
|
+
)
|
|
1535
|
+
];
|
|
1536
|
+
})
|
|
1537
|
+
);
|
|
1538
|
+
const children = selectedColumns.map((columnName) => vectors[columnName].data[0]);
|
|
1539
|
+
const data = new arrow5.Data(
|
|
1540
|
+
new arrow5.Struct(schema.fields),
|
|
1541
|
+
0,
|
|
1542
|
+
rowIndices.length,
|
|
1543
|
+
0,
|
|
1544
|
+
void 0,
|
|
1545
|
+
children
|
|
1546
|
+
);
|
|
1547
|
+
return new arrow5.Table(schema, new arrow5.RecordBatch(schema, data));
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
// src/schema-utils/lib/table/batches/convert-batches.ts
|
|
1551
|
+
function convertBatch(batch, shape) {
|
|
1552
|
+
switch (shape) {
|
|
1553
|
+
case "object-row-table":
|
|
1554
|
+
return { ...batch, ...convertTable(batch, "object-row-table") };
|
|
1555
|
+
case "array-row-table":
|
|
1556
|
+
return { ...batch, ...convertTable(batch, "array-row-table") };
|
|
1557
|
+
case "columnar-table":
|
|
1558
|
+
return { ...batch, ...convertTable(batch, "columnar-table") };
|
|
1559
|
+
case "arrow-table":
|
|
1560
|
+
return { ...batch, ...convertTable(batch, "arrow-table") };
|
|
1561
|
+
default:
|
|
1562
|
+
throw new Error(shape);
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
async function* convertBatches(batches, shape) {
|
|
1566
|
+
for await (const batch of batches) {
|
|
1567
|
+
switch (shape) {
|
|
1568
|
+
case "object-row-table":
|
|
1569
|
+
yield convertBatch(batch, "object-row-table");
|
|
1570
|
+
break;
|
|
1571
|
+
case "array-row-table":
|
|
1572
|
+
yield convertBatch(batch, "array-row-table");
|
|
1573
|
+
break;
|
|
1574
|
+
case "columnar-table":
|
|
1575
|
+
yield convertBatch(batch, "columnar-table");
|
|
1576
|
+
break;
|
|
1577
|
+
case "arrow-table":
|
|
1578
|
+
yield convertBatch(batch, "arrow-table");
|
|
1579
|
+
break;
|
|
1580
|
+
default:
|
|
1581
|
+
throw new Error(shape);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
// src/schema-utils/lib/table/tables/table-types.ts
|
|
1587
|
+
function isArrayRowTable(table) {
|
|
1588
|
+
return table.shape === "array-row-table";
|
|
1589
|
+
}
|
|
1590
|
+
function isObjectRowTable(table) {
|
|
1591
|
+
return table.shape === "object-row-table";
|
|
1592
|
+
}
|
|
1593
|
+
function isColumnarTable(table) {
|
|
1594
|
+
return table.shape === "columnar-table";
|
|
1595
|
+
}
|
|
1596
|
+
function isGeoJSONTable(table) {
|
|
1597
|
+
return table.shape === "geojson-table";
|
|
1598
|
+
}
|
|
1599
|
+
function isArrowTable(table) {
|
|
1600
|
+
return table.shape === "arrow-table";
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
// src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts
|
|
1604
|
+
var DEFAULT_ROW_COUNT = 100;
|
|
1605
|
+
var BaseTableBatchAggregator = class {
|
|
1606
|
+
schema;
|
|
1607
|
+
options;
|
|
1608
|
+
shape;
|
|
1609
|
+
length = 0;
|
|
1610
|
+
rows = null;
|
|
1611
|
+
cursor = 0;
|
|
1612
|
+
_headers = [];
|
|
1613
|
+
constructor(schema, options) {
|
|
1614
|
+
this.options = options;
|
|
1615
|
+
this.schema = schema;
|
|
1616
|
+
if (!Array.isArray(schema)) {
|
|
1617
|
+
this._headers = [];
|
|
1618
|
+
for (const key in schema) {
|
|
1619
|
+
this._headers[schema[key].index] = schema[key].name;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
rowCount() {
|
|
1624
|
+
return this.length;
|
|
1625
|
+
}
|
|
1626
|
+
addArrayRow(row, cursor) {
|
|
1627
|
+
if (Number.isFinite(cursor)) {
|
|
1628
|
+
this.cursor = cursor;
|
|
1629
|
+
}
|
|
1630
|
+
this.shape = "array-row-table";
|
|
1631
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
1632
|
+
this.rows[this.length] = row;
|
|
1633
|
+
this.length++;
|
|
1634
|
+
}
|
|
1635
|
+
addObjectRow(row, cursor) {
|
|
1636
|
+
if (Number.isFinite(cursor)) {
|
|
1637
|
+
this.cursor = cursor;
|
|
1638
|
+
}
|
|
1639
|
+
this.shape = "object-row-table";
|
|
1640
|
+
this.rows = this.rows || new Array(DEFAULT_ROW_COUNT);
|
|
1641
|
+
this.rows[this.length] = row;
|
|
1642
|
+
this.length++;
|
|
1643
|
+
}
|
|
1644
|
+
getBatch() {
|
|
1645
|
+
let rows = this.rows;
|
|
1646
|
+
if (!rows) {
|
|
1647
|
+
return null;
|
|
1648
|
+
}
|
|
1649
|
+
rows = rows.slice(0, this.length);
|
|
1650
|
+
this.rows = null;
|
|
1651
|
+
const batch = {
|
|
1652
|
+
shape: this.shape || "array-row-table",
|
|
1653
|
+
batchType: "data",
|
|
1654
|
+
data: rows,
|
|
1655
|
+
length: this.length,
|
|
1656
|
+
schema: this.schema,
|
|
1657
|
+
cursor: this.cursor
|
|
1658
|
+
};
|
|
1659
|
+
return batch;
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
// src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts
|
|
1664
|
+
var DEFAULT_ROW_COUNT2 = 100;
|
|
1665
|
+
var RowTableBatchAggregator = class {
|
|
1666
|
+
schema;
|
|
1667
|
+
options;
|
|
1668
|
+
length = 0;
|
|
1669
|
+
objectRows = null;
|
|
1670
|
+
arrayRows = null;
|
|
1671
|
+
cursor = 0;
|
|
1672
|
+
_headers = null;
|
|
1673
|
+
constructor(schema, options) {
|
|
1674
|
+
this.options = options;
|
|
1675
|
+
this.schema = schema;
|
|
1676
|
+
if (schema) {
|
|
1677
|
+
this._headers = [];
|
|
1678
|
+
for (let i = 0; i < schema.fields.length; i++) {
|
|
1679
|
+
this._headers[i] = schema.fields[i].name;
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
rowCount() {
|
|
1684
|
+
return this.length;
|
|
1685
|
+
}
|
|
1686
|
+
addArrayRow(row, cursor) {
|
|
1687
|
+
if (Number.isFinite(cursor)) {
|
|
1688
|
+
this.cursor = cursor;
|
|
1689
|
+
}
|
|
1690
|
+
this._headers ||= inferHeadersFromArrayRow(row);
|
|
1691
|
+
switch (this.options.shape) {
|
|
1692
|
+
case "object-row-table":
|
|
1693
|
+
const rowObject = convertToObjectRow(row, this._headers);
|
|
1694
|
+
this.addObjectRow(rowObject, cursor);
|
|
1695
|
+
break;
|
|
1696
|
+
case "array-row-table":
|
|
1697
|
+
this.arrayRows = this.arrayRows || new Array(DEFAULT_ROW_COUNT2);
|
|
1698
|
+
this.arrayRows[this.length] = row;
|
|
1699
|
+
this.length++;
|
|
1700
|
+
break;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
addObjectRow(row, cursor) {
|
|
1704
|
+
if (Number.isFinite(cursor)) {
|
|
1705
|
+
this.cursor = cursor;
|
|
1706
|
+
}
|
|
1707
|
+
this._headers ||= inferHeadersFromObjectRow(row);
|
|
1708
|
+
switch (this.options.shape) {
|
|
1709
|
+
case "array-row-table":
|
|
1710
|
+
const rowArray = convertToArrayRow(row, this._headers);
|
|
1711
|
+
this.addArrayRow(rowArray, cursor);
|
|
1712
|
+
break;
|
|
1713
|
+
case "object-row-table":
|
|
1714
|
+
this.objectRows = this.objectRows || new Array(DEFAULT_ROW_COUNT2);
|
|
1715
|
+
this.objectRows[this.length] = row;
|
|
1716
|
+
this.length++;
|
|
1717
|
+
break;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
getBatch() {
|
|
1721
|
+
let rows = this.arrayRows || this.objectRows;
|
|
1722
|
+
if (!rows) {
|
|
1723
|
+
return null;
|
|
1724
|
+
}
|
|
1725
|
+
rows = rows.slice(0, this.length);
|
|
1726
|
+
this.arrayRows = null;
|
|
1727
|
+
this.objectRows = null;
|
|
1728
|
+
return {
|
|
1729
|
+
shape: this.options.shape,
|
|
1730
|
+
batchType: "data",
|
|
1731
|
+
data: rows,
|
|
1732
|
+
length: this.length,
|
|
1733
|
+
// @ts-expect-error we should infer a schema
|
|
1734
|
+
schema: this.schema,
|
|
1735
|
+
cursor: this.cursor
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1740
|
+
// src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts
|
|
1741
|
+
var DEFAULT_ROW_COUNT3 = 100;
|
|
1742
|
+
var ColumnarTableBatchAggregator = class {
|
|
1743
|
+
schema;
|
|
1744
|
+
length = 0;
|
|
1745
|
+
allocated = 0;
|
|
1746
|
+
columns = {};
|
|
1747
|
+
constructor(schema, options) {
|
|
1748
|
+
this.schema = schema;
|
|
1749
|
+
this._reallocateColumns();
|
|
1750
|
+
}
|
|
1751
|
+
rowCount() {
|
|
1752
|
+
return this.length;
|
|
1753
|
+
}
|
|
1754
|
+
addArrayRow(row) {
|
|
1755
|
+
this._reallocateColumns();
|
|
1756
|
+
let i = 0;
|
|
1757
|
+
for (const fieldName in this.columns) {
|
|
1758
|
+
this.columns[fieldName][this.length] = row[i++];
|
|
1759
|
+
}
|
|
1760
|
+
this.length++;
|
|
1761
|
+
}
|
|
1762
|
+
addObjectRow(row) {
|
|
1763
|
+
this._reallocateColumns();
|
|
1764
|
+
for (const fieldName in row) {
|
|
1765
|
+
this.columns[fieldName][this.length] = row[fieldName];
|
|
1766
|
+
}
|
|
1767
|
+
this.length++;
|
|
1768
|
+
}
|
|
1769
|
+
getBatch() {
|
|
1770
|
+
this._pruneColumns();
|
|
1771
|
+
const batch = {
|
|
1772
|
+
shape: "columnar-table",
|
|
1773
|
+
batchType: "data",
|
|
1774
|
+
data: this.columns,
|
|
1775
|
+
schema: this.schema,
|
|
1776
|
+
length: this.length
|
|
1777
|
+
};
|
|
1778
|
+
return batch;
|
|
1779
|
+
}
|
|
1780
|
+
// HELPERS
|
|
1781
|
+
_reallocateColumns() {
|
|
1782
|
+
if (this.length < this.allocated) {
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
this.allocated = this.allocated > 0 ? this.allocated * 2 : DEFAULT_ROW_COUNT3;
|
|
1786
|
+
this.columns = {};
|
|
1787
|
+
for (const field of this.schema.fields) {
|
|
1788
|
+
const ArrayType = getArrayTypeFromDataType(field.type, field.nullable);
|
|
1789
|
+
const oldColumn = this.columns[field.name];
|
|
1790
|
+
if (!oldColumn) {
|
|
1791
|
+
this.columns[field.name] = new ArrayType(this.allocated);
|
|
1792
|
+
} else if (Array.isArray(oldColumn)) {
|
|
1793
|
+
oldColumn.length = this.allocated;
|
|
1794
|
+
} else if (ArrayBuffer.isView(oldColumn) && !(oldColumn instanceof DataView)) {
|
|
1795
|
+
const typedArray = new ArrayType(this.allocated);
|
|
1796
|
+
typedArray.set(oldColumn);
|
|
1797
|
+
this.columns[field.name] = typedArray;
|
|
1798
|
+
} else {
|
|
1799
|
+
throw new Error("Invalid column type");
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
_pruneColumns() {
|
|
1804
|
+
for (const [columnName, column] of Object.entries(this.columns)) {
|
|
1805
|
+
this.columns[columnName] = column.slice(0, this.length);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
// src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts
|
|
1811
|
+
var arrow6 = __toESM(require("apache-arrow"), 1);
|
|
1812
|
+
var ArrowTableBatchAggregator = class extends ColumnarTableBatchAggregator {
|
|
1813
|
+
arrowSchema;
|
|
1814
|
+
constructor(schema, options) {
|
|
1815
|
+
super(schema, options);
|
|
1816
|
+
this.arrowSchema = null;
|
|
1817
|
+
}
|
|
1818
|
+
getBatch() {
|
|
1819
|
+
const batch = super.getBatch();
|
|
1820
|
+
if (batch) {
|
|
1821
|
+
this.arrowSchema = this.arrowSchema || getArrowSchema(batch.schema);
|
|
1822
|
+
const arrowVectors = getArrowVectors(this.arrowSchema, batch.data);
|
|
1823
|
+
const recordBatch = new arrow6.RecordBatch(
|
|
1824
|
+
this.arrowSchema,
|
|
1825
|
+
arrow6.makeData({
|
|
1826
|
+
type: new arrow6.Struct(this.arrowSchema.fields),
|
|
1827
|
+
children: arrowVectors.map(({ data }) => data[0])
|
|
1828
|
+
})
|
|
1829
|
+
);
|
|
1830
|
+
return {
|
|
1831
|
+
shape: "arrow-table",
|
|
1832
|
+
batchType: "data",
|
|
1833
|
+
data: new arrow6.Table([recordBatch]),
|
|
1834
|
+
length: batch.length
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
return null;
|
|
1838
|
+
}
|
|
1839
|
+
};
|
|
1840
|
+
function getArrowSchema(schema) {
|
|
1841
|
+
const arrowFields = [];
|
|
1842
|
+
const fields = Array.isArray(schema.fields) ? schema.fields : Object.values(schema);
|
|
1843
|
+
for (const field of fields) {
|
|
1844
|
+
if (field.type === "float32" || field.type === Float32Array) {
|
|
1845
|
+
const metadata = /* @__PURE__ */ new Map();
|
|
1846
|
+
const arrowField = new arrow6.Field(field.name, new arrow6.Float32(), field.nullable, metadata);
|
|
1847
|
+
arrowFields.push(arrowField);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
if (arrowFields.length === 0) {
|
|
1851
|
+
throw new Error("No arrow convertible fields");
|
|
1852
|
+
}
|
|
1853
|
+
if (arrowFields.length !== fields.length) {
|
|
1854
|
+
throw new Error("Some schema fields are not arrow convertible");
|
|
1855
|
+
}
|
|
1856
|
+
return new arrow6.Schema(arrowFields);
|
|
1857
|
+
}
|
|
1858
|
+
function getArrowVectors(arrowSchema, data) {
|
|
1859
|
+
const arrowVectors = [];
|
|
1860
|
+
for (const field of arrowSchema.fields) {
|
|
1861
|
+
const vector = data[field.name];
|
|
1862
|
+
if (vector instanceof Float32Array) {
|
|
1863
|
+
const arrowVector = arrow6.makeVector(vector);
|
|
1864
|
+
arrowVectors.push(arrowVector);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
if (arrowSchema.fields.length !== arrowVectors.length) {
|
|
1868
|
+
throw new Error("Some columns not arrow convertible");
|
|
1869
|
+
}
|
|
1870
|
+
return arrowVectors;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
// src/schema-utils/lib/table/batch-builder/table-batch-builder.ts
|
|
1874
|
+
var DEFAULT_OPTIONS = {
|
|
1875
|
+
shape: void 0,
|
|
1876
|
+
batchSize: "auto",
|
|
1877
|
+
batchDebounceMs: 0,
|
|
1878
|
+
limit: 0,
|
|
1879
|
+
_limitMB: 0
|
|
1880
|
+
};
|
|
1881
|
+
var TableBatchBuilder = class {
|
|
1882
|
+
schema;
|
|
1883
|
+
options;
|
|
1884
|
+
aggregator = null;
|
|
1885
|
+
batchCount = 0;
|
|
1886
|
+
bytesUsed = 0;
|
|
1887
|
+
isChunkComplete = false;
|
|
1888
|
+
lastBatchEmittedMs = Date.now();
|
|
1889
|
+
totalLength = 0;
|
|
1890
|
+
totalBytes = 0;
|
|
1891
|
+
rowBytes = 0;
|
|
1892
|
+
static ArrowBatch;
|
|
1893
|
+
constructor(schema, options) {
|
|
1894
|
+
this.schema = schema;
|
|
1895
|
+
this.options = { ...DEFAULT_OPTIONS, ...options };
|
|
1896
|
+
}
|
|
1897
|
+
limitReached() {
|
|
1898
|
+
if (Boolean(this.options?.limit) && this.totalLength >= this.options.limit) {
|
|
1899
|
+
return true;
|
|
1900
|
+
}
|
|
1901
|
+
if (Boolean(this.options?._limitMB) && this.totalBytes / 1e6 >= this.options._limitMB) {
|
|
1902
|
+
return true;
|
|
1903
|
+
}
|
|
1904
|
+
return false;
|
|
1905
|
+
}
|
|
1906
|
+
/** @deprecated Use addArrayRow or addObjectRow */
|
|
1907
|
+
addRow(row) {
|
|
1908
|
+
if (this.limitReached()) {
|
|
1909
|
+
return;
|
|
1910
|
+
}
|
|
1911
|
+
this.totalLength++;
|
|
1912
|
+
this.rowBytes = this.rowBytes || this._estimateRowMB(row);
|
|
1913
|
+
this.totalBytes += this.rowBytes;
|
|
1914
|
+
if (Array.isArray(row)) {
|
|
1915
|
+
this.addArrayRow(row);
|
|
1916
|
+
} else {
|
|
1917
|
+
this.addObjectRow(row);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
/** Add one row to the batch */
|
|
1921
|
+
addArrayRow(row) {
|
|
1922
|
+
if (!this.aggregator) {
|
|
1923
|
+
const TableBatchType = this._getTableBatchType();
|
|
1924
|
+
this.aggregator = new TableBatchType(this.schema, this.options);
|
|
1925
|
+
}
|
|
1926
|
+
this.aggregator.addArrayRow(row);
|
|
1927
|
+
}
|
|
1928
|
+
/** Add one row to the batch */
|
|
1929
|
+
addObjectRow(row) {
|
|
1930
|
+
if (!this.aggregator) {
|
|
1931
|
+
const TableBatchType = this._getTableBatchType();
|
|
1932
|
+
this.aggregator = new TableBatchType(this.schema, this.options);
|
|
1933
|
+
}
|
|
1934
|
+
this.aggregator.addObjectRow(row);
|
|
1935
|
+
}
|
|
1936
|
+
/** Mark an incoming raw memory chunk has completed */
|
|
1937
|
+
chunkComplete(chunk) {
|
|
1938
|
+
if (chunk instanceof ArrayBuffer) {
|
|
1939
|
+
this.bytesUsed += chunk.byteLength;
|
|
1940
|
+
}
|
|
1941
|
+
if (typeof chunk === "string") {
|
|
1942
|
+
this.bytesUsed += chunk.length;
|
|
1943
|
+
}
|
|
1944
|
+
this.isChunkComplete = true;
|
|
1945
|
+
}
|
|
1946
|
+
getFullBatch(options) {
|
|
1947
|
+
return this._isFull() ? this._getBatch(options) : null;
|
|
1948
|
+
}
|
|
1949
|
+
getFinalBatch(options) {
|
|
1950
|
+
return this._getBatch(options);
|
|
1951
|
+
}
|
|
1952
|
+
// INTERNAL
|
|
1953
|
+
_estimateRowMB(row) {
|
|
1954
|
+
return Array.isArray(row) ? row.length * 8 : Object.keys(row).length * 8;
|
|
1955
|
+
}
|
|
1956
|
+
_isFull() {
|
|
1957
|
+
if (!this.aggregator || this.aggregator.rowCount() === 0) {
|
|
1958
|
+
return false;
|
|
1959
|
+
}
|
|
1960
|
+
if (this.options.batchSize === "auto") {
|
|
1961
|
+
if (!this.isChunkComplete) {
|
|
1962
|
+
return false;
|
|
1963
|
+
}
|
|
1964
|
+
} else if (this.options.batchSize > this.aggregator.rowCount()) {
|
|
1965
|
+
return false;
|
|
1966
|
+
}
|
|
1967
|
+
if (this.options.batchDebounceMs > Date.now() - this.lastBatchEmittedMs) {
|
|
1968
|
+
return false;
|
|
1969
|
+
}
|
|
1970
|
+
this.isChunkComplete = false;
|
|
1971
|
+
this.lastBatchEmittedMs = Date.now();
|
|
1972
|
+
return true;
|
|
1973
|
+
}
|
|
1974
|
+
/**
|
|
1975
|
+
* bytesUsed can be set via chunkComplete or via getBatch*
|
|
1976
|
+
*/
|
|
1977
|
+
_getBatch(options) {
|
|
1978
|
+
if (!this.aggregator) {
|
|
1979
|
+
return null;
|
|
1980
|
+
}
|
|
1981
|
+
if (options?.bytesUsed) {
|
|
1982
|
+
this.bytesUsed = options.bytesUsed;
|
|
1983
|
+
}
|
|
1984
|
+
const normalizedBatch = this.aggregator.getBatch();
|
|
1985
|
+
normalizedBatch.count = this.batchCount;
|
|
1986
|
+
normalizedBatch.bytesUsed = this.bytesUsed;
|
|
1987
|
+
Object.assign(normalizedBatch, options);
|
|
1988
|
+
this.batchCount++;
|
|
1989
|
+
this.aggregator = null;
|
|
1990
|
+
return normalizedBatch;
|
|
1991
|
+
}
|
|
1992
|
+
_getTableBatchType() {
|
|
1993
|
+
switch (this.options.shape) {
|
|
1994
|
+
case "array-row-table":
|
|
1995
|
+
case "object-row-table":
|
|
1996
|
+
return RowTableBatchAggregator;
|
|
1997
|
+
case "columnar-table":
|
|
1998
|
+
return ColumnarTableBatchAggregator;
|
|
1999
|
+
case "arrow-table":
|
|
2000
|
+
return ArrowTableBatchAggregator;
|
|
2001
|
+
default:
|
|
2002
|
+
return BaseTableBatchAggregator;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
};
|
|
2006
|
+
|
|
2007
|
+
// src/schema-utils/lib/table/arrow-api/arrow-like-field.ts
|
|
2008
|
+
var ArrowLikeField = class _ArrowLikeField {
|
|
2009
|
+
name;
|
|
2010
|
+
type;
|
|
2011
|
+
nullable;
|
|
2012
|
+
metadata;
|
|
2013
|
+
constructor(name, type, nullable = false, metadata = /* @__PURE__ */ new Map()) {
|
|
2014
|
+
this.name = name;
|
|
2015
|
+
this.type = type;
|
|
2016
|
+
this.nullable = nullable;
|
|
2017
|
+
this.metadata = metadata;
|
|
2018
|
+
}
|
|
2019
|
+
get typeId() {
|
|
2020
|
+
return this.type && this.type.typeId;
|
|
2021
|
+
}
|
|
2022
|
+
clone() {
|
|
2023
|
+
return new _ArrowLikeField(this.name, this.type, this.nullable, this.metadata);
|
|
2024
|
+
}
|
|
2025
|
+
compareTo(other) {
|
|
2026
|
+
return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata;
|
|
2027
|
+
}
|
|
2028
|
+
toString() {
|
|
2029
|
+
return `${JSON.stringify(this.type)}${this.nullable ? ", nullable" : ""}${this.metadata ? `, metadata: ${JSON.stringify(this.metadata)}` : ""}`;
|
|
2030
|
+
}
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
// src/schema-utils/lib/table/arrow-api/arrow-like-schema.ts
|
|
2034
|
+
var ArrowLikeSchema = class _ArrowLikeSchema {
|
|
2035
|
+
fields;
|
|
2036
|
+
metadata;
|
|
2037
|
+
constructor(fields, metadata = /* @__PURE__ */ new Map()) {
|
|
2038
|
+
this.fields = fields.map(
|
|
2039
|
+
(field) => new ArrowLikeField(field.name, field.type, field.nullable, field.metadata)
|
|
2040
|
+
);
|
|
2041
|
+
this.metadata = metadata instanceof Map ? metadata : new Map(Object.entries(metadata));
|
|
2042
|
+
}
|
|
2043
|
+
// TODO - arrow only seems to compare fields, not metadata
|
|
2044
|
+
compareTo(other) {
|
|
2045
|
+
if (this.metadata !== other.metadata) {
|
|
2046
|
+
return false;
|
|
2047
|
+
}
|
|
2048
|
+
if (this.fields.length !== other.fields.length) {
|
|
2049
|
+
return false;
|
|
2050
|
+
}
|
|
2051
|
+
for (let i = 0; i < this.fields.length; ++i) {
|
|
2052
|
+
if (!this.fields[i].compareTo(other.fields[i])) {
|
|
2053
|
+
return false;
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
return true;
|
|
2057
|
+
}
|
|
2058
|
+
select(...columnNames) {
|
|
2059
|
+
const nameMap = /* @__PURE__ */ Object.create(null);
|
|
2060
|
+
for (const name of columnNames) {
|
|
2061
|
+
nameMap[name] = true;
|
|
2062
|
+
}
|
|
2063
|
+
const selectedFields = this.fields.filter((field) => nameMap[field.name]);
|
|
2064
|
+
return new _ArrowLikeSchema(selectedFields, this.metadata);
|
|
2065
|
+
}
|
|
2066
|
+
selectAt(...columnIndices) {
|
|
2067
|
+
const selectedFields = columnIndices.map((index) => this.fields[index]).filter(Boolean);
|
|
2068
|
+
return new _ArrowLikeSchema(selectedFields, this.metadata);
|
|
2069
|
+
}
|
|
2070
|
+
assign(schemaOrFields) {
|
|
2071
|
+
let fields;
|
|
2072
|
+
let metadata = this.metadata;
|
|
2073
|
+
if (schemaOrFields instanceof _ArrowLikeSchema) {
|
|
2074
|
+
const otherArrowLikeSchema = schemaOrFields;
|
|
2075
|
+
fields = otherArrowLikeSchema.fields;
|
|
2076
|
+
metadata = mergeMaps(mergeMaps(/* @__PURE__ */ new Map(), this.metadata), otherArrowLikeSchema.metadata);
|
|
2077
|
+
} else {
|
|
2078
|
+
fields = schemaOrFields;
|
|
2079
|
+
}
|
|
2080
|
+
const fieldMap = /* @__PURE__ */ Object.create(null);
|
|
2081
|
+
for (const field of this.fields) {
|
|
2082
|
+
fieldMap[field.name] = field;
|
|
2083
|
+
}
|
|
2084
|
+
for (const field of fields) {
|
|
2085
|
+
fieldMap[field.name] = field;
|
|
2086
|
+
}
|
|
2087
|
+
const mergedFields = Object.values(fieldMap);
|
|
2088
|
+
return new _ArrowLikeSchema(mergedFields, metadata);
|
|
2089
|
+
}
|
|
2090
|
+
};
|
|
2091
|
+
function mergeMaps(m1, m2) {
|
|
2092
|
+
return new Map([...m1 || /* @__PURE__ */ new Map(), ...m2 || /* @__PURE__ */ new Map()]);
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
// src/schema-utils/lib/table/arrow-api/arrow-like-table.ts
|
|
2096
|
+
var ArrowLikeVector = class {
|
|
2097
|
+
table;
|
|
2098
|
+
columnName;
|
|
2099
|
+
constructor(table, columnName) {
|
|
2100
|
+
this.table = table;
|
|
2101
|
+
this.columnName = columnName;
|
|
2102
|
+
}
|
|
2103
|
+
get(rowIndex) {
|
|
2104
|
+
return getTableCell(this.table, rowIndex, this.columnName);
|
|
2105
|
+
}
|
|
2106
|
+
toArray() {
|
|
2107
|
+
switch (this.table.shape) {
|
|
2108
|
+
case "arrow-table":
|
|
2109
|
+
const arrowTable = this.table.data;
|
|
2110
|
+
return arrowTable.getChild(this.columnName)?.toArray();
|
|
2111
|
+
case "columnar-table":
|
|
2112
|
+
return this.table.data[this.columnName];
|
|
2113
|
+
default:
|
|
2114
|
+
throw new Error(this.table.shape);
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
};
|
|
2118
|
+
var ArrowLikeTable = class {
|
|
2119
|
+
schema;
|
|
2120
|
+
table;
|
|
2121
|
+
constructor(table) {
|
|
2122
|
+
const schema = table.schema || deduceTableSchema(table);
|
|
2123
|
+
this.schema = new ArrowLikeSchema(schema.fields, schema.metadata);
|
|
2124
|
+
this.table = { ...table, schema };
|
|
2125
|
+
}
|
|
2126
|
+
// get schema() {
|
|
2127
|
+
// return this.table.schema;
|
|
2128
|
+
// }
|
|
2129
|
+
get data() {
|
|
2130
|
+
return this.table.shape === "geojson-table" ? this.table.features : this.table.data;
|
|
2131
|
+
}
|
|
2132
|
+
get numCols() {
|
|
2133
|
+
return getTableNumCols(this.table);
|
|
2134
|
+
}
|
|
2135
|
+
get length() {
|
|
2136
|
+
return getTableLength(this.table);
|
|
2137
|
+
}
|
|
2138
|
+
getChild(columnName) {
|
|
2139
|
+
return new ArrowLikeVector(this.table, columnName);
|
|
2140
|
+
}
|
|
2141
|
+
// getChildAt(columnIndex: number): ArrowLikeVector {
|
|
2142
|
+
// return
|
|
2143
|
+
// }
|
|
2144
|
+
};
|
|
2145
|
+
|
|
2146
|
+
// src/schema-utils/lib/mesh/mesh-utils.ts
|
|
2147
|
+
function getMeshSize(attributes) {
|
|
2148
|
+
let size = 0;
|
|
2149
|
+
for (const attributeName in attributes) {
|
|
2150
|
+
const attribute = attributes[attributeName];
|
|
2151
|
+
if (ArrayBuffer.isView(attribute)) {
|
|
2152
|
+
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
return size;
|
|
2156
|
+
}
|
|
2157
|
+
function getMeshBoundingBox(attributes) {
|
|
2158
|
+
const positionAttribute = attributes?.POSITION;
|
|
2159
|
+
if (!positionAttribute || !("value" in positionAttribute) || !positionAttribute.value.length) {
|
|
2160
|
+
return null;
|
|
2161
|
+
}
|
|
2162
|
+
let minX = Infinity;
|
|
2163
|
+
let minY = Infinity;
|
|
2164
|
+
let minZ = Infinity;
|
|
2165
|
+
let maxX = -Infinity;
|
|
2166
|
+
let maxY = -Infinity;
|
|
2167
|
+
let maxZ = -Infinity;
|
|
2168
|
+
const positions = positionAttribute.value;
|
|
2169
|
+
const len = positions.length;
|
|
2170
|
+
for (let i = 0; i < len; i += 3) {
|
|
2171
|
+
const x = positions[i];
|
|
2172
|
+
const y = positions[i + 1];
|
|
2173
|
+
const z = positions[i + 2];
|
|
2174
|
+
minX = x < minX ? x : minX;
|
|
2175
|
+
minY = y < minY ? y : minY;
|
|
2176
|
+
minZ = z < minZ ? z : minZ;
|
|
2177
|
+
maxX = x > maxX ? x : maxX;
|
|
2178
|
+
maxY = y > maxY ? y : maxY;
|
|
2179
|
+
maxZ = z > maxZ ? z : maxZ;
|
|
2180
|
+
}
|
|
2181
|
+
return [
|
|
2182
|
+
[minX, minY, minZ],
|
|
2183
|
+
[maxX, maxY, maxZ]
|
|
2184
|
+
];
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
// src/schema/float16.ts
|
|
2188
|
+
var import_core2 = require("@math.gl/core");
|
|
2189
|
+
function createFloat16Array(length) {
|
|
2190
|
+
const ArrayConstructor = (0, import_core2.getFloat16ArrayConstructor)();
|
|
2191
|
+
return new ArrayConstructor(length);
|
|
2192
|
+
}
|
|
2193
|
+
function isNativeFloat16Array(value) {
|
|
2194
|
+
return Boolean(import_core2.NativeFloat16ArrayConstructor && value instanceof import_core2.NativeFloat16ArrayConstructor);
|
|
2195
|
+
}
|
|
2196
|
+
function setFloat16Value(array, index, value) {
|
|
2197
|
+
if (isNativeFloat16Array(array)) {
|
|
2198
|
+
array[index] = value;
|
|
2199
|
+
} else {
|
|
2200
|
+
array[index] = encodeFloat16(value);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
function getFloat16Value(array, index) {
|
|
2204
|
+
if (isNativeFloat16Array(array)) {
|
|
2205
|
+
return array[index];
|
|
2206
|
+
}
|
|
2207
|
+
return decodeFloat16(array[index]);
|
|
2208
|
+
}
|
|
2209
|
+
function getFloat16Storage(array) {
|
|
2210
|
+
return isNativeFloat16Array(array) ? new Uint16Array(array.buffer, array.byteOffset, array.length) : array;
|
|
2211
|
+
}
|
|
2212
|
+
function encodeFloat16(value) {
|
|
2213
|
+
if (!Number.isFinite(value)) {
|
|
2214
|
+
return value === Infinity ? 31744 : value === -Infinity ? 64512 : 32256;
|
|
2215
|
+
}
|
|
2216
|
+
const sign = value < 0 || Object.is(value, -0) ? 32768 : 0;
|
|
2217
|
+
const absoluteValue = Math.abs(value);
|
|
2218
|
+
if (absoluteValue === 0) {
|
|
2219
|
+
return sign;
|
|
2220
|
+
}
|
|
2221
|
+
if (absoluteValue >= 65520) {
|
|
2222
|
+
return sign | 31744;
|
|
2223
|
+
}
|
|
2224
|
+
if (absoluteValue >= 65504) {
|
|
2225
|
+
return sign | 31743;
|
|
2226
|
+
}
|
|
2227
|
+
const exponent = Math.floor(Math.log2(absoluteValue));
|
|
2228
|
+
if (exponent < -14) {
|
|
2229
|
+
return sign | Math.round(absoluteValue / 2 ** -24);
|
|
2230
|
+
}
|
|
2231
|
+
const normalizedExponent = exponent + 15;
|
|
2232
|
+
const mantissa = Math.round((absoluteValue / 2 ** exponent - 1) * 1024);
|
|
2233
|
+
if (mantissa === 1024) {
|
|
2234
|
+
return sign | normalizedExponent + 1 << 10;
|
|
2235
|
+
}
|
|
2236
|
+
return sign | normalizedExponent << 10 | mantissa;
|
|
2237
|
+
}
|
|
2238
|
+
function decodeFloat16(value) {
|
|
2239
|
+
const sign = value & 32768 ? -1 : 1;
|
|
2240
|
+
const exponent = value >> 10 & 31;
|
|
2241
|
+
const mantissa = value & 1023;
|
|
2242
|
+
if (exponent === 0) {
|
|
2243
|
+
return sign * mantissa * 2 ** -24;
|
|
2244
|
+
}
|
|
2245
|
+
if (exponent === 31) {
|
|
2246
|
+
return mantissa ? NaN : sign * Infinity;
|
|
2247
|
+
}
|
|
2248
|
+
return sign * (1 + mantissa / 1024) * 2 ** (exponent - 15);
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
// src/schema/categories/category-mesh.ts
|
|
2252
|
+
var arrow7 = __toESM(require("apache-arrow"), 1);
|
|
2253
|
+
var meshArrowSchema = new arrow7.Schema([
|
|
2254
|
+
new arrow7.Field(
|
|
2255
|
+
"POSITION",
|
|
2256
|
+
new arrow7.FixedSizeList(3, new arrow7.Field("value", new arrow7.Float32(), false)),
|
|
2257
|
+
false
|
|
2258
|
+
)
|
|
2259
|
+
]);
|
|
2260
|
+
var indexedMeshArrowSchema = new arrow7.Schema([
|
|
2261
|
+
...meshArrowSchema.fields,
|
|
2262
|
+
new arrow7.Field(
|
|
2263
|
+
"indices",
|
|
2264
|
+
new arrow7.List(new arrow7.Field("item", new arrow7.Uint32(), false)),
|
|
2265
|
+
true
|
|
2266
|
+
)
|
|
2267
|
+
]);
|
|
2268
|
+
|
|
2269
|
+
// src/schema-utils/lib/mesh/convert-mesh-to-table.ts
|
|
2270
|
+
var arrow9 = __toESM(require("apache-arrow"), 1);
|
|
2271
|
+
|
|
2272
|
+
// src/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.ts
|
|
2273
|
+
var arrow8 = __toESM(require("apache-arrow"), 1);
|
|
2274
|
+
function getFixedSizeListSize(vector) {
|
|
2275
|
+
return vector.type instanceof arrow8.FixedSizeList ? vector.type.listSize : 1;
|
|
2276
|
+
}
|
|
2277
|
+
function getFixedSizeListVector(typedArray, stride, logicalType) {
|
|
2278
|
+
const data = getFixedSizeListData(typedArray, stride, logicalType);
|
|
2279
|
+
return new arrow8.Vector([data]);
|
|
2280
|
+
}
|
|
2281
|
+
function getFixedSizeListData(typedArray, stride, logicalType) {
|
|
2282
|
+
const listType = getFixedSizeListType(typedArray, stride, logicalType);
|
|
2283
|
+
const nestedType = listType.children[0].type;
|
|
2284
|
+
const storage = logicalType === "float16" && isNativeFloat16Array(typedArray) ? getFloat16Storage(typedArray) : typedArray;
|
|
2285
|
+
const buffers = {
|
|
2286
|
+
// valueOffsets: undefined,
|
|
2287
|
+
[arrow8.BufferType.DATA]: storage
|
|
2288
|
+
// values
|
|
2289
|
+
// nullBitmap: undefined,
|
|
2290
|
+
// typeIds: undefined
|
|
2291
|
+
};
|
|
2292
|
+
const nestedData = new arrow8.Data(nestedType, 0, storage.length, 0, buffers);
|
|
2293
|
+
const data = new arrow8.Data(
|
|
2294
|
+
listType,
|
|
2295
|
+
0,
|
|
2296
|
+
storage.length / stride,
|
|
2297
|
+
0,
|
|
2298
|
+
void 0,
|
|
2299
|
+
[nestedData]
|
|
2300
|
+
);
|
|
2301
|
+
return data;
|
|
2302
|
+
}
|
|
2303
|
+
function getFixedSizeListType(typedArray, stride, logicalType) {
|
|
2304
|
+
const type = logicalType || getDataTypeFromArray(typedArray).type;
|
|
2305
|
+
const arrowType = deserializeArrowType(type);
|
|
2306
|
+
const listType = new arrow8.FixedSizeList(stride, new arrow8.Field("value", arrowType, false));
|
|
2307
|
+
return listType;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
// src/schema-utils/lib/mesh/convert-mesh-to-table.ts
|
|
2311
|
+
var MESH_ARROW_ATTRIBUTE_ORDER = ["POSITION"];
|
|
2312
|
+
function convertMeshToTable(mesh, shape) {
|
|
2313
|
+
switch (shape) {
|
|
2314
|
+
case "columnar-table":
|
|
2315
|
+
return convertMeshToColumnarTable(mesh);
|
|
2316
|
+
case "arrow-table":
|
|
2317
|
+
return convertMeshToArrowTable(mesh);
|
|
2318
|
+
default:
|
|
2319
|
+
throw new Error(shape);
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
function convertMeshToColumnarTable(mesh) {
|
|
2323
|
+
const columns = {};
|
|
2324
|
+
const hasIndices = hasMeshIndices(mesh);
|
|
2325
|
+
for (const [columnName, attribute] of Object.entries(mesh.attributes)) {
|
|
2326
|
+
columns[columnName] = attribute.value;
|
|
2327
|
+
}
|
|
2328
|
+
return {
|
|
2329
|
+
shape: "columnar-table",
|
|
2330
|
+
schema: mesh.schema,
|
|
2331
|
+
data: columns,
|
|
2332
|
+
topology: mesh.topology,
|
|
2333
|
+
indices: hasIndices ? mesh.indices : void 0
|
|
2334
|
+
};
|
|
2335
|
+
}
|
|
2336
|
+
function convertMeshToArrowTable(mesh, batchSize) {
|
|
2337
|
+
return makeMeshArrowTable(mesh.attributes, {
|
|
2338
|
+
schema: mesh.schema,
|
|
2339
|
+
topology: mesh.topology,
|
|
2340
|
+
mode: mesh.mode,
|
|
2341
|
+
boundingBox: mesh.header?.boundingBox,
|
|
2342
|
+
indices: hasMeshIndices(mesh) ? mesh.indices : void 0
|
|
2343
|
+
});
|
|
2344
|
+
}
|
|
2345
|
+
function makeMeshArrowTable(attributes, options = {}) {
|
|
2346
|
+
const fields = [];
|
|
2347
|
+
const columns = {};
|
|
2348
|
+
const attributeNames = getOrderedAttributeNames(attributes);
|
|
2349
|
+
for (const attributeName of attributeNames) {
|
|
2350
|
+
const attribute = attributes[attributeName];
|
|
2351
|
+
const { value, size = 1 } = attribute;
|
|
2352
|
+
const column = getAttributeArrowVector(value, size, attribute.componentType);
|
|
2353
|
+
columns[attributeName] = column;
|
|
2354
|
+
fields.push(
|
|
2355
|
+
getAttributeArrowField(options.schema, attributeName, column, attribute.componentType)
|
|
2356
|
+
);
|
|
2357
|
+
if (attributeName === "POSITION" && options.indices?.value?.length) {
|
|
2358
|
+
const indicesField = indexedMeshArrowSchema.fields.find((field) => field.name === "indices");
|
|
2359
|
+
columns.indices = getIndicesVector(options.indices.value, column.length, indicesField.type);
|
|
2360
|
+
fields.push(indicesField);
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
const arrowSchema = new arrow9.Schema(fields, getMeshArrowMetadata(options));
|
|
2364
|
+
const table = columns[attributeNames[0]]?.length === 0 ? new arrow9.Table(arrowSchema) : new arrow9.Table(arrowSchema, columns);
|
|
2365
|
+
const schema = serializeArrowSchema(table.schema);
|
|
2366
|
+
return {
|
|
2367
|
+
shape: "arrow-table",
|
|
2368
|
+
schema,
|
|
2369
|
+
data: table,
|
|
2370
|
+
topology: options.topology || "point-list",
|
|
2371
|
+
indices: options.indices
|
|
2372
|
+
};
|
|
2373
|
+
}
|
|
2374
|
+
function getAttributeArrowVector(value, size, componentType) {
|
|
2375
|
+
if (componentType === "float16") {
|
|
2376
|
+
const storage = isNativeFloat16Array(value) ? getFloat16Storage(value) : value;
|
|
2377
|
+
if (size === 1) {
|
|
2378
|
+
const data = new arrow9.Data(new arrow9.Float16(), 0, storage.length, 0, {
|
|
2379
|
+
[arrow9.BufferType.DATA]: storage
|
|
2380
|
+
});
|
|
2381
|
+
return new arrow9.Vector([data]);
|
|
2382
|
+
}
|
|
2383
|
+
return getFixedSizeListVector(value, size, componentType);
|
|
2384
|
+
}
|
|
2385
|
+
return size === 1 ? arrow9.makeVector(value) : getFixedSizeListVector(value, size);
|
|
2386
|
+
}
|
|
2387
|
+
function getOrderedAttributeNames(attributes) {
|
|
2388
|
+
const attributeNames = Object.keys(attributes);
|
|
2389
|
+
const orderedAttributeNames = MESH_ARROW_ATTRIBUTE_ORDER.filter(
|
|
2390
|
+
(attributeName) => attributeName in attributes
|
|
2391
|
+
);
|
|
2392
|
+
const remainingAttributeNames = attributeNames.filter(
|
|
2393
|
+
(attributeName) => !MESH_ARROW_ATTRIBUTE_ORDER.includes(attributeName)
|
|
2394
|
+
);
|
|
2395
|
+
return [...orderedAttributeNames, ...remainingAttributeNames];
|
|
2396
|
+
}
|
|
2397
|
+
function hasMeshIndices(mesh) {
|
|
2398
|
+
return Boolean(mesh.indices?.value?.length);
|
|
2399
|
+
}
|
|
2400
|
+
function getAttributeArrowField(schema, attributeName, column, componentType) {
|
|
2401
|
+
if (attributeName === "POSITION" && isMeshPositionColumn(column)) {
|
|
2402
|
+
const canonicalField = meshArrowSchema.fields[0];
|
|
2403
|
+
const suppliedField = schema?.fields.find((schemaField) => schemaField.name === attributeName);
|
|
2404
|
+
if (!suppliedField?.metadata) {
|
|
2405
|
+
return canonicalField;
|
|
2406
|
+
}
|
|
2407
|
+
const metadata = new Map(canonicalField.metadata);
|
|
2408
|
+
for (const [key, value] of Object.entries(suppliedField.metadata)) {
|
|
2409
|
+
metadata.set(key, value);
|
|
2410
|
+
}
|
|
2411
|
+
return new arrow9.Field(
|
|
2412
|
+
canonicalField.name,
|
|
2413
|
+
canonicalField.type,
|
|
2414
|
+
canonicalField.nullable,
|
|
2415
|
+
metadata
|
|
2416
|
+
);
|
|
2417
|
+
}
|
|
2418
|
+
const field = schema?.fields.find((schemaField) => schemaField.name === attributeName);
|
|
2419
|
+
if (componentType === "float16") {
|
|
2420
|
+
const metadata = new Map(Object.entries(field?.metadata || {}));
|
|
2421
|
+
metadata.set("componentType", "float16");
|
|
2422
|
+
return new arrow9.Field(attributeName, column.type, false, metadata);
|
|
2423
|
+
}
|
|
2424
|
+
if (field && field.type.toString() !== column.type.toString()) {
|
|
2425
|
+
const deserializedField = deserializeArrowField(field);
|
|
2426
|
+
return new arrow9.Field(
|
|
2427
|
+
attributeName,
|
|
2428
|
+
column.type,
|
|
2429
|
+
deserializedField.nullable,
|
|
2430
|
+
deserializedField.metadata
|
|
2431
|
+
);
|
|
2432
|
+
}
|
|
2433
|
+
return field ? deserializeArrowField(field) : new arrow9.Field(attributeName, column.type, false);
|
|
2434
|
+
}
|
|
2435
|
+
function isMeshPositionColumn(column) {
|
|
2436
|
+
return column.type instanceof arrow9.FixedSizeList && column.type.listSize === 3 && column.type.children[0].type instanceof arrow9.Float32;
|
|
2437
|
+
}
|
|
2438
|
+
function getIndicesVector(indices, vertexCount, type) {
|
|
2439
|
+
const indicesType = type;
|
|
2440
|
+
const values = indices instanceof Uint32Array ? indices : Uint32Array.from(indices);
|
|
2441
|
+
const valueOffsets = new Int32Array(vertexCount + 1);
|
|
2442
|
+
if (vertexCount > 0) {
|
|
2443
|
+
valueOffsets.fill(values.length, 1);
|
|
2444
|
+
}
|
|
2445
|
+
const nullBitmap = new Uint8Array(Math.ceil(vertexCount / 8));
|
|
2446
|
+
if (vertexCount > 0) {
|
|
2447
|
+
nullBitmap[0] = 1;
|
|
2448
|
+
}
|
|
2449
|
+
const valuesData = new arrow9.Data(
|
|
2450
|
+
indicesType.children[0].type,
|
|
2451
|
+
0,
|
|
2452
|
+
values.length,
|
|
2453
|
+
0,
|
|
2454
|
+
{ [arrow9.BufferType.DATA]: values }
|
|
2455
|
+
);
|
|
2456
|
+
const indicesData = new arrow9.Data(
|
|
2457
|
+
indicesType,
|
|
2458
|
+
0,
|
|
2459
|
+
vertexCount,
|
|
2460
|
+
Math.max(0, vertexCount - 1),
|
|
2461
|
+
{
|
|
2462
|
+
[arrow9.BufferType.OFFSET]: valueOffsets,
|
|
2463
|
+
[arrow9.BufferType.VALIDITY]: nullBitmap
|
|
2464
|
+
},
|
|
2465
|
+
[valuesData]
|
|
2466
|
+
);
|
|
2467
|
+
return new arrow9.Vector([indicesData]);
|
|
2468
|
+
}
|
|
2469
|
+
function getMeshArrowMetadata(options) {
|
|
2470
|
+
const metadata = { ...options.schema?.metadata };
|
|
2471
|
+
if (options.topology) {
|
|
2472
|
+
metadata.topology ||= options.topology;
|
|
2473
|
+
}
|
|
2474
|
+
if (Number.isFinite(options.mode)) {
|
|
2475
|
+
metadata.mode ||= String(options.mode);
|
|
2476
|
+
}
|
|
2477
|
+
if (options.boundingBox) {
|
|
2478
|
+
metadata.boundingBox ||= JSON.stringify(options.boundingBox);
|
|
2479
|
+
}
|
|
2480
|
+
return deserializeArrowMetadata(metadata);
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
// src/schema-utils/lib/mesh/convert-table-to-mesh.ts
|
|
2484
|
+
var arrow10 = __toESM(require("apache-arrow"), 1);
|
|
2485
|
+
function convertTableToMesh(table) {
|
|
2486
|
+
switch (table.shape) {
|
|
2487
|
+
// case 'columnar-table':
|
|
2488
|
+
// return convertColumnarTableToMesh(table);
|
|
2489
|
+
case "arrow-table":
|
|
2490
|
+
return convertArrowTableToMesh(table);
|
|
2491
|
+
default:
|
|
2492
|
+
throw new Error(table.shape);
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
function convertArrowTableToMesh(table) {
|
|
2496
|
+
const arrowTable = table.data;
|
|
2497
|
+
const schema = serializeArrowSchema(arrowTable.schema);
|
|
2498
|
+
const fields = schema.fields;
|
|
2499
|
+
const attributes = {};
|
|
2500
|
+
const columns = [];
|
|
2501
|
+
for (const field of fields) {
|
|
2502
|
+
const { name } = field;
|
|
2503
|
+
if (name === "indices") {
|
|
2504
|
+
continue;
|
|
2505
|
+
}
|
|
2506
|
+
const attributeData = arrowTable.getChild(name);
|
|
2507
|
+
const size = getFixedSizeListSize(attributeData);
|
|
2508
|
+
const typedArray = getAttributeTypedArray(attributeData, size);
|
|
2509
|
+
const metadata = getMeshAttributeMetadata(field.metadata);
|
|
2510
|
+
const value = metadata.componentType === "float16" ? restoreFloat16Array(typedArray) : typedArray;
|
|
2511
|
+
const shared = columns.find(
|
|
2512
|
+
(column) => column.data.length === attributeData.data.length && attributes[column.name].value.constructor === value.constructor && column.data.every((chunk, index) => shareArrowStorage(chunk, attributeData.data[index]))
|
|
2513
|
+
);
|
|
2514
|
+
attributes[name] = {
|
|
2515
|
+
value: shared ? attributes[shared.name].value : value,
|
|
2516
|
+
size,
|
|
2517
|
+
...metadata
|
|
2518
|
+
};
|
|
2519
|
+
if (!shared) columns.push({ name, data: attributeData.data });
|
|
2520
|
+
}
|
|
2521
|
+
fixMetadata(schema);
|
|
2522
|
+
const topology = schema.metadata.topology;
|
|
2523
|
+
const mode = getMeshMode(schema);
|
|
2524
|
+
const indices = getIndices(arrowTable);
|
|
2525
|
+
const boundingBox = attributes.POSITION?.transform?.type === "quantization" ? getMeshBoundingBoxFromSchema(schema) || getMeshBoundingBox(attributes) : getMeshBoundingBox(attributes);
|
|
2526
|
+
return {
|
|
2527
|
+
schema,
|
|
2528
|
+
attributes,
|
|
2529
|
+
topology,
|
|
2530
|
+
mode,
|
|
2531
|
+
indices,
|
|
2532
|
+
header: {
|
|
2533
|
+
vertexCount: arrowTable.numRows,
|
|
2534
|
+
boundingBox: boundingBox ?? void 0
|
|
2535
|
+
}
|
|
2536
|
+
};
|
|
2537
|
+
}
|
|
2538
|
+
function getMeshBoundingBoxFromSchema(schema) {
|
|
2539
|
+
const serializedBoundingBox = schema.metadata?.boundingBox;
|
|
2540
|
+
if (!serializedBoundingBox) {
|
|
2541
|
+
return null;
|
|
2542
|
+
}
|
|
2543
|
+
try {
|
|
2544
|
+
const boundingBox = JSON.parse(serializedBoundingBox);
|
|
2545
|
+
if (Array.isArray(boundingBox) && boundingBox.length === 2 && boundingBox.every(
|
|
2546
|
+
(corner) => Array.isArray(corner) && corner.length === 3 && corner.every((value) => typeof value === "number")
|
|
2547
|
+
)) {
|
|
2548
|
+
return boundingBox;
|
|
2549
|
+
}
|
|
2550
|
+
} catch {
|
|
2551
|
+
}
|
|
2552
|
+
return null;
|
|
2553
|
+
}
|
|
2554
|
+
function getMeshAttributeMetadata(metadata = {}) {
|
|
2555
|
+
const result = {};
|
|
2556
|
+
if (metadata.byteOffset !== void 0) {
|
|
2557
|
+
result.byteOffset = Number(metadata.byteOffset);
|
|
2558
|
+
}
|
|
2559
|
+
if (metadata.byteStride !== void 0) {
|
|
2560
|
+
result.byteStride = Number(metadata.byteStride);
|
|
2561
|
+
}
|
|
2562
|
+
if (metadata.normalized !== void 0) {
|
|
2563
|
+
result.normalized = metadata.normalized === "true";
|
|
2564
|
+
}
|
|
2565
|
+
if (metadata.componentType === "float16") {
|
|
2566
|
+
result.componentType = "float16";
|
|
2567
|
+
}
|
|
2568
|
+
if (metadata["loaders.gl.transform"]) {
|
|
2569
|
+
try {
|
|
2570
|
+
const transform = JSON.parse(metadata["loaders.gl.transform"]);
|
|
2571
|
+
if (isMeshAttributeTransform(transform)) {
|
|
2572
|
+
result.transform = transform;
|
|
2573
|
+
}
|
|
2574
|
+
} catch {
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
return result;
|
|
2578
|
+
}
|
|
2579
|
+
function isMeshAttributeTransform(value) {
|
|
2580
|
+
if (!value || typeof value !== "object" || !("type" in value)) {
|
|
2581
|
+
return false;
|
|
2582
|
+
}
|
|
2583
|
+
const transform = value;
|
|
2584
|
+
if (transform.type === "octahedron") {
|
|
2585
|
+
return Number.isInteger(transform.bits) && transform.bits >= 1 && transform.bits <= 30;
|
|
2586
|
+
}
|
|
2587
|
+
return transform.type === "quantization" && Number.isInteger(transform.bits) && transform.bits >= 1 && transform.bits <= 30 && Array.isArray(transform.origin) && transform.origin.every((component) => typeof component === "number") && typeof transform.range === "number";
|
|
2588
|
+
}
|
|
2589
|
+
function fixMetadata(schema) {
|
|
2590
|
+
schema.metadata ||= {};
|
|
2591
|
+
schema.metadata.topology ||= "point-list";
|
|
2592
|
+
schema.metadata.mode ||= "0";
|
|
2593
|
+
}
|
|
2594
|
+
function getAttributeTypedArray(attributeData, size) {
|
|
2595
|
+
if (!(attributeData.type instanceof arrow10.FixedSizeList)) {
|
|
2596
|
+
return attributeData.toArray();
|
|
2597
|
+
}
|
|
2598
|
+
const values = attributeData.data[0].children[0].values;
|
|
2599
|
+
const TypedArrayConstructor = values.constructor;
|
|
2600
|
+
const typedArray = new TypedArrayConstructor(attributeData.length * size);
|
|
2601
|
+
let targetOffset = 0;
|
|
2602
|
+
for (const data of attributeData.data) {
|
|
2603
|
+
const child = data.children[0];
|
|
2604
|
+
const sourceLength = data.length * size;
|
|
2605
|
+
const sourceOffset = child.offset || data.offset * size;
|
|
2606
|
+
const sourceStart = sourceOffset + sourceLength <= child.values.length ? sourceOffset : 0;
|
|
2607
|
+
const source = child.values.subarray(sourceStart, sourceStart + sourceLength);
|
|
2608
|
+
typedArray.set(source, targetOffset);
|
|
2609
|
+
targetOffset += sourceLength;
|
|
2610
|
+
}
|
|
2611
|
+
return typedArray;
|
|
2612
|
+
}
|
|
2613
|
+
function restoreFloat16Array(typedArray) {
|
|
2614
|
+
const result = createFloat16Array(typedArray.length);
|
|
2615
|
+
for (let index = 0; index < typedArray.length; index++) {
|
|
2616
|
+
setFloat16Value(result, index, getFloat16Value(typedArray, index));
|
|
2617
|
+
}
|
|
2618
|
+
return result;
|
|
2619
|
+
}
|
|
2620
|
+
function getMeshMode(schema) {
|
|
2621
|
+
const mode = Number(schema.metadata?.mode);
|
|
2622
|
+
return Number.isFinite(mode) ? mode : 0;
|
|
2623
|
+
}
|
|
2624
|
+
function getIndices(arrowTable) {
|
|
2625
|
+
const indicesColumn = arrowTable.getChild("indices");
|
|
2626
|
+
if (!indicesColumn?.isValid(0)) {
|
|
2627
|
+
return void 0;
|
|
2628
|
+
}
|
|
2629
|
+
const indicesData = indicesColumn.data[0];
|
|
2630
|
+
const valueOffsets = indicesData.valueOffsets;
|
|
2631
|
+
const start = valueOffsets[indicesData.offset];
|
|
2632
|
+
const end = valueOffsets[indicesData.offset + 1];
|
|
2633
|
+
const values = indicesData.children[0].values.subarray(start, end);
|
|
2634
|
+
return { value: values, size: 1 };
|
|
2635
|
+
}
|
|
2636
|
+
function shareArrowStorage(left, right) {
|
|
2637
|
+
const rightBuffers = Object.values(right.buffers);
|
|
2638
|
+
return left.type.toString() === right.type.toString() && left.offset === right.offset && left.length === right.length && left.nullCount === right.nullCount && left.dictionary === right.dictionary && Object.values(left.buffers).every((buffer, index) => {
|
|
2639
|
+
const other = rightBuffers[index];
|
|
2640
|
+
return buffer === other || Boolean(
|
|
2641
|
+
buffer && other && buffer.buffer === other.buffer && buffer.byteOffset === other.byteOffset && buffer.byteLength === other.byteLength
|
|
2642
|
+
);
|
|
2643
|
+
}) && left.children.length === right.children.length && left.children.every((child, index) => shareArrowStorage(child, right.children[index]));
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
// src/schema-utils/lib/mesh/deduce-mesh-schema.ts
|
|
2647
|
+
function deduceMeshSchema(attributes, metadata = {}) {
|
|
2648
|
+
const fields = deduceMeshFields(attributes);
|
|
2649
|
+
return { fields, metadata };
|
|
2650
|
+
}
|
|
2651
|
+
function deduceMeshField(name, attribute, optionalMetadata) {
|
|
2652
|
+
const type = attribute.componentType || getDataTypeFromTypedArray(attribute.value);
|
|
2653
|
+
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
2654
|
+
const dataType = attribute.size === 1 ? type : { type: "fixed-size-list", listSize: attribute.size, children: [{ name: "value", type }] };
|
|
2655
|
+
return {
|
|
2656
|
+
name,
|
|
2657
|
+
type: dataType,
|
|
2658
|
+
nullable: false,
|
|
2659
|
+
metadata
|
|
2660
|
+
};
|
|
2661
|
+
}
|
|
2662
|
+
function deduceMeshFields(attributes) {
|
|
2663
|
+
const fields = [];
|
|
2664
|
+
for (const attributeName in attributes) {
|
|
2665
|
+
const attribute = attributes[attributeName];
|
|
2666
|
+
fields.push(deduceMeshField(attributeName, attribute));
|
|
2667
|
+
}
|
|
2668
|
+
return fields;
|
|
2669
|
+
}
|
|
2670
|
+
function makeMeshAttributeMetadata(attribute) {
|
|
2671
|
+
const result = {};
|
|
2672
|
+
if ("byteOffset" in attribute) {
|
|
2673
|
+
result.byteOffset = attribute.byteOffset.toString(10);
|
|
2674
|
+
}
|
|
2675
|
+
if ("byteStride" in attribute) {
|
|
2676
|
+
result.byteStride = attribute.byteStride.toString(10);
|
|
2677
|
+
}
|
|
2678
|
+
if ("normalized" in attribute) {
|
|
2679
|
+
result.normalized = attribute.normalized.toString();
|
|
2680
|
+
}
|
|
2681
|
+
if (attribute.componentType) {
|
|
2682
|
+
result.componentType = attribute.componentType;
|
|
2683
|
+
}
|
|
2684
|
+
if (attribute.transform) {
|
|
2685
|
+
result["loaders.gl.transform"] = JSON.stringify(attribute.transform);
|
|
2686
|
+
}
|
|
2687
|
+
return result;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
// src/schema-utils/lib/table/arrow-api/enum.ts
|
|
2691
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
2692
|
+
Type2[Type2["NONE"] = 0] = "NONE";
|
|
2693
|
+
Type2[Type2["Null"] = 1] = "Null";
|
|
2694
|
+
Type2[Type2["Int"] = 2] = "Int";
|
|
2695
|
+
Type2[Type2["Float"] = 3] = "Float";
|
|
2696
|
+
Type2[Type2["Binary"] = 4] = "Binary";
|
|
2697
|
+
Type2[Type2["Utf8"] = 5] = "Utf8";
|
|
2698
|
+
Type2[Type2["Bool"] = 6] = "Bool";
|
|
2699
|
+
Type2[Type2["Decimal"] = 7] = "Decimal";
|
|
2700
|
+
Type2[Type2["Date"] = 8] = "Date";
|
|
2701
|
+
Type2[Type2["Time"] = 9] = "Time";
|
|
2702
|
+
Type2[Type2["Timestamp"] = 10] = "Timestamp";
|
|
2703
|
+
Type2[Type2["Interval"] = 11] = "Interval";
|
|
2704
|
+
Type2[Type2["List"] = 12] = "List";
|
|
2705
|
+
Type2[Type2["Struct"] = 13] = "Struct";
|
|
2706
|
+
Type2[Type2["Union"] = 14] = "Union";
|
|
2707
|
+
Type2[Type2["FixedSizeBinary"] = 15] = "FixedSizeBinary";
|
|
2708
|
+
Type2[Type2["FixedSizeList"] = 16] = "FixedSizeList";
|
|
2709
|
+
Type2[Type2["Map"] = 17] = "Map";
|
|
2710
|
+
Type2[Type2["Dictionary"] = -1] = "Dictionary";
|
|
2711
|
+
Type2[Type2["Int8"] = -2] = "Int8";
|
|
2712
|
+
Type2[Type2["Int16"] = -3] = "Int16";
|
|
2713
|
+
Type2[Type2["Int32"] = -4] = "Int32";
|
|
2714
|
+
Type2[Type2["Int64"] = -5] = "Int64";
|
|
2715
|
+
Type2[Type2["Uint8"] = -6] = "Uint8";
|
|
2716
|
+
Type2[Type2["Uint16"] = -7] = "Uint16";
|
|
2717
|
+
Type2[Type2["Uint32"] = -8] = "Uint32";
|
|
2718
|
+
Type2[Type2["Uint64"] = -9] = "Uint64";
|
|
2719
|
+
Type2[Type2["Float16"] = -10] = "Float16";
|
|
2720
|
+
Type2[Type2["Float32"] = -11] = "Float32";
|
|
2721
|
+
Type2[Type2["Float64"] = -12] = "Float64";
|
|
2722
|
+
Type2[Type2["DateDay"] = -13] = "DateDay";
|
|
2723
|
+
Type2[Type2["DateMillisecond"] = -14] = "DateMillisecond";
|
|
2724
|
+
Type2[Type2["TimestampSecond"] = -15] = "TimestampSecond";
|
|
2725
|
+
Type2[Type2["TimestampMillisecond"] = -16] = "TimestampMillisecond";
|
|
2726
|
+
Type2[Type2["TimestampMicrosecond"] = -17] = "TimestampMicrosecond";
|
|
2727
|
+
Type2[Type2["TimestampNanosecond"] = -18] = "TimestampNanosecond";
|
|
2728
|
+
Type2[Type2["TimeSecond"] = -19] = "TimeSecond";
|
|
2729
|
+
Type2[Type2["TimeMillisecond"] = -20] = "TimeMillisecond";
|
|
2730
|
+
Type2[Type2["TimeMicrosecond"] = -21] = "TimeMicrosecond";
|
|
2731
|
+
Type2[Type2["TimeNanosecond"] = -22] = "TimeNanosecond";
|
|
2732
|
+
Type2[Type2["DenseUnion"] = -23] = "DenseUnion";
|
|
2733
|
+
Type2[Type2["SparseUnion"] = -24] = "SparseUnion";
|
|
2734
|
+
Type2[Type2["IntervalDayTime"] = -25] = "IntervalDayTime";
|
|
2735
|
+
Type2[Type2["IntervalYearMonth"] = -26] = "IntervalYearMonth";
|
|
2736
|
+
return Type2;
|
|
2737
|
+
})(Type || {});
|
|
2738
|
+
|
|
2739
|
+
// src/schema-utils/lib/table/arrow-api/arrow-like-type.ts
|
|
2740
|
+
var DataType3 = class {
|
|
2741
|
+
static isNull(x) {
|
|
2742
|
+
return x && x.typeId === 1 /* Null */;
|
|
2743
|
+
}
|
|
2744
|
+
static isInt(x) {
|
|
2745
|
+
return x && x.typeId === 2 /* Int */;
|
|
2746
|
+
}
|
|
2747
|
+
static isFloat(x) {
|
|
2748
|
+
return x && x.typeId === 3 /* Float */;
|
|
2749
|
+
}
|
|
2750
|
+
static isBinary(x) {
|
|
2751
|
+
return x && x.typeId === 4 /* Binary */;
|
|
2752
|
+
}
|
|
2753
|
+
static isUtf8(x) {
|
|
2754
|
+
return x && x.typeId === 5 /* Utf8 */;
|
|
2755
|
+
}
|
|
2756
|
+
static isBool(x) {
|
|
2757
|
+
return x && x.typeId === 6 /* Bool */;
|
|
2758
|
+
}
|
|
2759
|
+
static isDecimal(x) {
|
|
2760
|
+
return x && x.typeId === 7 /* Decimal */;
|
|
2761
|
+
}
|
|
2762
|
+
static isDate(x) {
|
|
2763
|
+
return x && x.typeId === 8 /* Date */;
|
|
2764
|
+
}
|
|
2765
|
+
static isTime(x) {
|
|
2766
|
+
return x && x.typeId === 9 /* Time */;
|
|
2767
|
+
}
|
|
2768
|
+
static isTimestamp(x) {
|
|
2769
|
+
return x && x.typeId === 10 /* Timestamp */;
|
|
2770
|
+
}
|
|
2771
|
+
static isInterval(x) {
|
|
2772
|
+
return x && x.typeId === 11 /* Interval */;
|
|
2773
|
+
}
|
|
2774
|
+
static isList(x) {
|
|
2775
|
+
return x && x.typeId === 12 /* List */;
|
|
2776
|
+
}
|
|
2777
|
+
static isStruct(x) {
|
|
2778
|
+
return x && x.typeId === 13 /* Struct */;
|
|
2779
|
+
}
|
|
2780
|
+
static isUnion(x) {
|
|
2781
|
+
return x && x.typeId === 14 /* Union */;
|
|
2782
|
+
}
|
|
2783
|
+
static isFixedSizeBinary(x) {
|
|
2784
|
+
return x && x.typeId === 15 /* FixedSizeBinary */;
|
|
2785
|
+
}
|
|
2786
|
+
static isFixedSizeList(x) {
|
|
2787
|
+
return x && x.typeId === 16 /* FixedSizeList */;
|
|
2788
|
+
}
|
|
2789
|
+
static isMap(x) {
|
|
2790
|
+
return x && x.typeId === 17 /* Map */;
|
|
2791
|
+
}
|
|
2792
|
+
static isDictionary(x) {
|
|
2793
|
+
return x && x.typeId === -1 /* Dictionary */;
|
|
2794
|
+
}
|
|
2795
|
+
get typeId() {
|
|
2796
|
+
return 0 /* NONE */;
|
|
2797
|
+
}
|
|
2798
|
+
// get ArrayType(): AnyArrayType {
|
|
2799
|
+
// return Int8Array;
|
|
2800
|
+
// }
|
|
2801
|
+
// get ArrayType() { return Array; }
|
|
2802
|
+
compareTo(other) {
|
|
2803
|
+
return this === other;
|
|
2804
|
+
}
|
|
2805
|
+
};
|
|
2806
|
+
|
|
2807
|
+
// src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts
|
|
2808
|
+
var arrow11 = __toESM(require("apache-arrow"), 1);
|
|
2809
|
+
var ArrowTableBuilder = class {
|
|
2810
|
+
schema;
|
|
2811
|
+
arrowSchema;
|
|
2812
|
+
arrowBuilders;
|
|
2813
|
+
length;
|
|
2814
|
+
constructor(schema, options) {
|
|
2815
|
+
this.arrowSchema = convertSchemaToArrow(schema, options);
|
|
2816
|
+
this.schema = options?.viewTypes && options.viewTypes !== "never" ? convertArrowToSchema(this.arrowSchema) : schema;
|
|
2817
|
+
this.arrowBuilders = this.arrowSchema.fields.map(
|
|
2818
|
+
(field) => arrow11.makeBuilder({ type: field.type, nullValues: [null] })
|
|
2819
|
+
);
|
|
2820
|
+
this.length = 0;
|
|
2821
|
+
}
|
|
2822
|
+
addObjectRow(row) {
|
|
2823
|
+
for (let i = 0; i < this.arrowBuilders.length; i++) {
|
|
2824
|
+
const columnName = this.schema.fields[i].name;
|
|
2825
|
+
const value = row[columnName];
|
|
2826
|
+
this.arrowBuilders[i].append(value);
|
|
2827
|
+
}
|
|
2828
|
+
this.length++;
|
|
2829
|
+
}
|
|
2830
|
+
addArrayRow(row) {
|
|
2831
|
+
for (let i = 0; i < this.arrowBuilders.length; i++) {
|
|
2832
|
+
this.arrowBuilders[i].append(row[i]);
|
|
2833
|
+
}
|
|
2834
|
+
this.length++;
|
|
2835
|
+
}
|
|
2836
|
+
/** Makes sure that a first batch with schema is sent even if no rows */
|
|
2837
|
+
firstBatch() {
|
|
2838
|
+
const arrowRecordBatch = this._getArrowRecordBatch();
|
|
2839
|
+
if (arrowRecordBatch.numCols !== 0) {
|
|
2840
|
+
return null;
|
|
2841
|
+
}
|
|
2842
|
+
return {
|
|
2843
|
+
shape: "arrow-table",
|
|
2844
|
+
batchType: "data",
|
|
2845
|
+
length: arrowRecordBatch.numRows,
|
|
2846
|
+
schema: this.schema,
|
|
2847
|
+
data: new arrow11.Table(arrowRecordBatch)
|
|
2848
|
+
};
|
|
2849
|
+
}
|
|
2850
|
+
/** Flush the current batch if conditions are right */
|
|
2851
|
+
flushBatch() {
|
|
2852
|
+
const arrowRecordBatch = this._getArrowRecordBatch();
|
|
2853
|
+
if (arrowRecordBatch.numCols === 0) {
|
|
2854
|
+
return null;
|
|
2855
|
+
}
|
|
2856
|
+
return {
|
|
2857
|
+
shape: "arrow-table",
|
|
2858
|
+
batchType: "data",
|
|
2859
|
+
length: arrowRecordBatch.numRows,
|
|
2860
|
+
schema: this.schema,
|
|
2861
|
+
data: new arrow11.Table(arrowRecordBatch)
|
|
2862
|
+
};
|
|
2863
|
+
}
|
|
2864
|
+
/** Get a last batch if any data is left */
|
|
2865
|
+
finishBatch() {
|
|
2866
|
+
const arrowRecordBatch = this._getArrowRecordBatch();
|
|
2867
|
+
this.arrowBuilders.forEach((builder) => builder.finish());
|
|
2868
|
+
if (arrowRecordBatch.numCols === 0 && arrowRecordBatch.numRows === 0) {
|
|
2869
|
+
return null;
|
|
2870
|
+
}
|
|
2871
|
+
return {
|
|
2872
|
+
shape: "arrow-table",
|
|
2873
|
+
batchType: "data",
|
|
2874
|
+
length: arrowRecordBatch.numRows,
|
|
2875
|
+
schema: this.schema,
|
|
2876
|
+
data: new arrow11.Table(arrowRecordBatch)
|
|
2877
|
+
};
|
|
2878
|
+
}
|
|
2879
|
+
/** Return a table with all the accumulated data */
|
|
2880
|
+
finishTable() {
|
|
2881
|
+
const arrowRecordBatch = this._getArrowRecordBatch();
|
|
2882
|
+
this.arrowBuilders.forEach((builder) => builder.finish());
|
|
2883
|
+
return {
|
|
2884
|
+
shape: "arrow-table",
|
|
2885
|
+
schema: this.schema,
|
|
2886
|
+
data: new arrow11.Table(arrowRecordBatch)
|
|
2887
|
+
};
|
|
2888
|
+
}
|
|
2889
|
+
/** Extract a record batch flushing the currently accumulated data in the builders */
|
|
2890
|
+
_getArrowRecordBatch() {
|
|
2891
|
+
const { arrowBuilders, arrowSchema } = this;
|
|
2892
|
+
const arrowDatas = arrowBuilders.map((builder) => builder.flush());
|
|
2893
|
+
const length = arrowDatas[0]?.length || this.length;
|
|
2894
|
+
this.length = 0;
|
|
2895
|
+
const structField = new arrow11.Struct(arrowSchema.fields);
|
|
2896
|
+
const arrowStructData = new arrow11.Data(structField, 0, length, 0, void 0, arrowDatas);
|
|
2897
|
+
const arrowRecordBatch = new arrow11.RecordBatch(arrowSchema, arrowStructData);
|
|
2898
|
+
return arrowRecordBatch;
|
|
2899
|
+
}
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
// src/schema-utils/lib/table/arrow-api/get-type-info.ts
|
|
2903
|
+
function getTypeInfo(arrowTypeLike) {
|
|
2904
|
+
return {
|
|
2905
|
+
typeId: arrowTypeLike.typeId,
|
|
2906
|
+
ArrayType: arrowTypeLike.ArrayType,
|
|
2907
|
+
typeName: arrowTypeLike.toString(),
|
|
2908
|
+
typeEnumName: getTypeKey(arrowTypeLike.typeId),
|
|
2909
|
+
precision: arrowTypeLike.precision
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
var ReverseType = null;
|
|
2913
|
+
function getTypeKey(typeKey) {
|
|
2914
|
+
if (!ReverseType) {
|
|
2915
|
+
ReverseType = {};
|
|
2916
|
+
for (const key in Type) {
|
|
2917
|
+
ReverseType[Type[key]] = key;
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
return ReverseType[typeKey];
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
// src/schema-utils/lib/utils/async-queue.ts
|
|
2924
|
+
var ArrayQueue = class extends Array {
|
|
2925
|
+
enqueue(value) {
|
|
2926
|
+
return this.push(value);
|
|
2927
|
+
}
|
|
2928
|
+
dequeue() {
|
|
2929
|
+
return this.shift();
|
|
2930
|
+
}
|
|
2931
|
+
};
|
|
2932
|
+
var AsyncQueue = class {
|
|
2933
|
+
_values;
|
|
2934
|
+
_settlers;
|
|
2935
|
+
_closed;
|
|
2936
|
+
constructor() {
|
|
2937
|
+
this._values = new ArrayQueue();
|
|
2938
|
+
this._settlers = new ArrayQueue();
|
|
2939
|
+
this._closed = false;
|
|
2940
|
+
}
|
|
2941
|
+
close() {
|
|
2942
|
+
while (this._settlers.length > 0) {
|
|
2943
|
+
this._settlers.dequeue().resolve({ done: true });
|
|
2944
|
+
}
|
|
2945
|
+
this._closed = true;
|
|
2946
|
+
}
|
|
2947
|
+
[Symbol.asyncIterator]() {
|
|
2948
|
+
return this;
|
|
2949
|
+
}
|
|
2950
|
+
enqueue(value) {
|
|
2951
|
+
if (this._closed) {
|
|
2952
|
+
throw new Error("Closed");
|
|
2953
|
+
}
|
|
2954
|
+
if (this._settlers.length > 0) {
|
|
2955
|
+
if (this._values.length > 0) {
|
|
2956
|
+
throw new Error("Illegal internal state");
|
|
2957
|
+
}
|
|
2958
|
+
const settler = this._settlers.dequeue();
|
|
2959
|
+
if (value instanceof Error) {
|
|
2960
|
+
settler.reject(value);
|
|
2961
|
+
} else {
|
|
2962
|
+
settler.resolve({ value });
|
|
2963
|
+
}
|
|
2964
|
+
} else {
|
|
2965
|
+
this._values.enqueue(value);
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
/**
|
|
2969
|
+
* @returns a Promise for an IteratorResult
|
|
2970
|
+
*/
|
|
2971
|
+
next() {
|
|
2972
|
+
if (this._values.length > 0) {
|
|
2973
|
+
const value = this._values.dequeue();
|
|
2974
|
+
if (value instanceof Error) {
|
|
2975
|
+
return Promise.reject(value);
|
|
2976
|
+
}
|
|
2977
|
+
return Promise.resolve({ value });
|
|
2978
|
+
}
|
|
2979
|
+
if (this._closed) {
|
|
2980
|
+
if (this._settlers.length > 0) {
|
|
2981
|
+
throw new Error("Illegal internal state");
|
|
2982
|
+
}
|
|
2983
|
+
return Promise.resolve({ done: true });
|
|
2984
|
+
}
|
|
2985
|
+
return new Promise((resolve, reject) => {
|
|
2986
|
+
this._settlers.enqueue({ resolve, reject });
|
|
2987
|
+
});
|
|
2988
|
+
}
|
|
2989
|
+
};
|
|
2990
|
+
|
|
2991
|
+
// src/schema-utils/lib/mesh/point-cloud-tiler.ts
|
|
2992
|
+
var PointCloudTiler = class {
|
|
2993
|
+
/** Resolves after validation, bounds calculation and root sampling. */
|
|
2994
|
+
ready;
|
|
2995
|
+
/** Exact number of validated source rows. */
|
|
2996
|
+
sourcePointCount = 0;
|
|
2997
|
+
/** Number of source point rows, available after ready. */
|
|
2998
|
+
get pointCount() {
|
|
2999
|
+
return this.sourcePointCount;
|
|
3000
|
+
}
|
|
3001
|
+
/** Lifetime cancellation, including close(). */
|
|
3002
|
+
controller = new AbortController();
|
|
3003
|
+
/** Resolved source and allocation limits. */
|
|
3004
|
+
options;
|
|
3005
|
+
/** Combined caller and lifetime cancellation. */
|
|
3006
|
+
signal;
|
|
3007
|
+
/** Source typed attributes, retained without copying Mesh inputs. */
|
|
3008
|
+
mesh = null;
|
|
3009
|
+
/** Discovered octree nodes. */
|
|
3010
|
+
nodes = /* @__PURE__ */ new Map();
|
|
3011
|
+
/** Live row-index bytes including intermediate allocations. */
|
|
3012
|
+
indexBytes = 0;
|
|
3013
|
+
/** Packed source bytes per row. */
|
|
3014
|
+
pointByteLength = 0;
|
|
3015
|
+
/** Starts indexing one decoded point dataset with explicit allocation limits. */
|
|
3016
|
+
constructor(input, options = {}) {
|
|
3017
|
+
this.options = {
|
|
3018
|
+
nodePointLimit: options.nodePointLimit ?? 5e4,
|
|
3019
|
+
maximumDepth: options.maximumDepth ?? 16,
|
|
3020
|
+
maxInputBytes: options.maxInputBytes ?? 512 * 1024 * 1024,
|
|
3021
|
+
maxIndexBytes: options.maxIndexBytes ?? 128 * 1024 * 1024,
|
|
3022
|
+
maxTileBytes: options.maxTileBytes ?? 64 * 1024 * 1024,
|
|
3023
|
+
maxNodes: options.maxNodes ?? 1e5
|
|
3024
|
+
};
|
|
3025
|
+
for (const [name, value] of Object.entries(this.options)) {
|
|
3026
|
+
if (!Number.isSafeInteger(value) || value < (name === "maximumDepth" ? 0 : 1))
|
|
3027
|
+
throw new Error(`PointCloudTiler: invalid ${name}`);
|
|
3028
|
+
}
|
|
3029
|
+
if (this.options.maximumDepth > 24 || this.options.nodePointLimit > 1e6)
|
|
3030
|
+
throw new Error("PointCloudTiler: maximumDepth must be <= 24 and nodePointLimit <= 1000000");
|
|
3031
|
+
this.signal = options.signal ? AbortSignal.any([options.signal, this.controller.signal]) : this.controller.signal;
|
|
3032
|
+
this.ready = this.initialize(input).catch((error) => {
|
|
3033
|
+
this.close();
|
|
3034
|
+
throw error;
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
/** Returns the root after indexing, without discovering its children. */
|
|
3038
|
+
async getRootNode() {
|
|
3039
|
+
await this.ready;
|
|
3040
|
+
return this.getNode("r").node;
|
|
3041
|
+
}
|
|
3042
|
+
/** Returns checked source-owned metadata for an already discovered node. */
|
|
3043
|
+
async getNodeMetadata(id) {
|
|
3044
|
+
await this.ready;
|
|
3045
|
+
return this.getNode(id).node;
|
|
3046
|
+
}
|
|
3047
|
+
/** Partitions only the requested node, in deterministic octant order. */
|
|
3048
|
+
async getChildNodes(id) {
|
|
3049
|
+
await this.ready;
|
|
3050
|
+
const state = this.getNode(id);
|
|
3051
|
+
if (!state.childrenPromise) state.childrenPromise = this.splitNode(state);
|
|
3052
|
+
return state.childrenPromise;
|
|
3053
|
+
}
|
|
3054
|
+
/** Splits one node exactly once, sharing its result with concurrent callers. */
|
|
3055
|
+
async splitNode(state) {
|
|
3056
|
+
const id = state.node.id;
|
|
3057
|
+
if (state.children) return state.children;
|
|
3058
|
+
const groups = Array.from({ length: 8 }, () => 0);
|
|
3059
|
+
const midpoint = state.node.bounds[0].map(
|
|
3060
|
+
(value, axis) => value + (state.node.bounds[1][axis] - value) / 2
|
|
3061
|
+
);
|
|
3062
|
+
for (let index = 0; index < state.remaining.length; index++) {
|
|
3063
|
+
if (index % 65536 === 0) await this.checkpoint();
|
|
3064
|
+
groups[this.getOctant(state.remaining[index], midpoint)]++;
|
|
3065
|
+
}
|
|
3066
|
+
if (this.nodes.size + groups.filter((count) => count > 0).length > this.options.maxNodes)
|
|
3067
|
+
throw new Error("PointCloudTiler: node budget exceeded");
|
|
3068
|
+
const children = [];
|
|
3069
|
+
const partitions = [];
|
|
3070
|
+
try {
|
|
3071
|
+
for (const count of groups) partitions.push(this.allocateRows(count));
|
|
3072
|
+
const offsets = new Uint32Array(8);
|
|
3073
|
+
for (let index = 0; index < state.remaining.length; index++) {
|
|
3074
|
+
if (index % 65536 === 0) await this.checkpoint();
|
|
3075
|
+
const row = state.remaining[index];
|
|
3076
|
+
const octant = this.getOctant(row, midpoint);
|
|
3077
|
+
partitions[octant][offsets[octant]++] = row;
|
|
3078
|
+
}
|
|
3079
|
+
for (let octant = 0; octant < 8; octant++) {
|
|
3080
|
+
if (!partitions[octant].length) continue;
|
|
3081
|
+
const bounds = state.node.bounds.map((corner) => [...corner]);
|
|
3082
|
+
for (let axis = 0; axis < 3; axis++)
|
|
3083
|
+
bounds[octant & 4 >> axis ? 0 : 1][axis] = midpoint[axis];
|
|
3084
|
+
const child = await this.createNode(`${id}${octant}`, bounds, partitions[octant]);
|
|
3085
|
+
partitions[octant] = new Uint32Array(0);
|
|
3086
|
+
children.push(child.node);
|
|
3087
|
+
}
|
|
3088
|
+
this.releaseRows(state.remaining);
|
|
3089
|
+
state.remaining = new Uint32Array(0);
|
|
3090
|
+
state.children = Object.freeze(children);
|
|
3091
|
+
return state.children;
|
|
3092
|
+
} catch (error) {
|
|
3093
|
+
this.close();
|
|
3094
|
+
throw error;
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
/** Gathers a fresh packed Mesh; source row IDs and attribute component widths are preserved. */
|
|
3098
|
+
async getTileMesh(id) {
|
|
3099
|
+
await this.ready;
|
|
3100
|
+
const state = this.getNode(id);
|
|
3101
|
+
const byteLength = state.rows.length * this.pointByteLength;
|
|
3102
|
+
if (byteLength > this.options.maxTileBytes)
|
|
3103
|
+
throw new Error("PointCloudTiler: tile byte budget exceeded");
|
|
3104
|
+
const attributes = {};
|
|
3105
|
+
const gatheredValues = /* @__PURE__ */ new Map();
|
|
3106
|
+
for (const [name, attribute] of Object.entries(this.mesh.attributes)) {
|
|
3107
|
+
const storageKey = getAttributeStorageKey(attribute);
|
|
3108
|
+
const sharedValue = gatheredValues.get(attribute.value.buffer)?.get(storageKey);
|
|
3109
|
+
if (sharedValue) {
|
|
3110
|
+
attributes[name] = { ...attribute, value: sharedValue, byteOffset: 0, byteStride: 0 };
|
|
3111
|
+
continue;
|
|
3112
|
+
}
|
|
3113
|
+
const Constructor = attribute.value.constructor;
|
|
3114
|
+
const value = new Constructor(state.rows.length * attribute.size);
|
|
3115
|
+
const sourceBytes = new Uint8Array(
|
|
3116
|
+
attribute.value.buffer,
|
|
3117
|
+
attribute.value.byteOffset,
|
|
3118
|
+
attribute.value.byteLength
|
|
3119
|
+
);
|
|
3120
|
+
const targetBytes = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
3121
|
+
const bytesPerElement = attribute.value.BYTES_PER_ELEMENT;
|
|
3122
|
+
const rowBytes = attribute.size * bytesPerElement;
|
|
3123
|
+
const stride = attribute.byteStride || rowBytes;
|
|
3124
|
+
for (let index = 0; index < state.rows.length; index++) {
|
|
3125
|
+
if (index % 65536 === 0) await this.checkpoint();
|
|
3126
|
+
const offset = (attribute.byteOffset || 0) + state.rows[index] * stride;
|
|
3127
|
+
targetBytes.set(sourceBytes.subarray(offset, offset + rowBytes), index * rowBytes);
|
|
3128
|
+
}
|
|
3129
|
+
const storage = gatheredValues.get(attribute.value.buffer) ?? /* @__PURE__ */ new Map();
|
|
3130
|
+
storage.set(storageKey, value);
|
|
3131
|
+
gatheredValues.set(attribute.value.buffer, storage);
|
|
3132
|
+
attributes[name] = { ...attribute, value, byteOffset: 0, byteStride: 0 };
|
|
3133
|
+
}
|
|
3134
|
+
return {
|
|
3135
|
+
...this.mesh,
|
|
3136
|
+
attributes,
|
|
3137
|
+
topology: "point-list",
|
|
3138
|
+
mode: 0,
|
|
3139
|
+
indices: void 0,
|
|
3140
|
+
header: {
|
|
3141
|
+
vertexCount: state.rows.length,
|
|
3142
|
+
boundingBox: state.node.bounds.map((corner) => [...corner])
|
|
3143
|
+
},
|
|
3144
|
+
loaderData: { ...this.mesh.loaderData, pointCloudTileId: id }
|
|
3145
|
+
};
|
|
3146
|
+
}
|
|
3147
|
+
/** Releases retained attributes and index state and cancels subsequent operations. */
|
|
3148
|
+
close() {
|
|
3149
|
+
this.controller.abort(new Error("PointCloudTiler: closed"));
|
|
3150
|
+
this.mesh = null;
|
|
3151
|
+
this.nodes.clear();
|
|
3152
|
+
this.indexBytes = 0;
|
|
3153
|
+
}
|
|
3154
|
+
/** Validates the decoded profile and creates a root cube from finite native coordinates. */
|
|
3155
|
+
async initialize(input) {
|
|
3156
|
+
this.signal.throwIfAborted();
|
|
3157
|
+
if ("shape" in input) {
|
|
3158
|
+
const buffers2 = /* @__PURE__ */ new Set();
|
|
3159
|
+
let arrowBytes = 0;
|
|
3160
|
+
const checkData = (data) => {
|
|
3161
|
+
if (data.nullCount)
|
|
3162
|
+
throw new Error("PointCloudTiler: null point attributes require an explicit mapping");
|
|
3163
|
+
for (const view of Object.values(data.buffers)) {
|
|
3164
|
+
if (view && !buffers2.has(view.buffer)) {
|
|
3165
|
+
buffers2.add(view.buffer);
|
|
3166
|
+
arrowBytes += view.buffer.byteLength;
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
for (const child of data.children) checkData(child);
|
|
3170
|
+
if (data.dictionary)
|
|
3171
|
+
for (const dictionaryData of data.dictionary.data) checkData(dictionaryData);
|
|
3172
|
+
};
|
|
3173
|
+
for (const batch of input.data.batches) checkData(batch.data);
|
|
3174
|
+
if (arrowBytes > this.options.maxInputBytes)
|
|
3175
|
+
throw new Error("PointCloudTiler: input byte budget exceeded");
|
|
3176
|
+
for (const column of input.data.schema.fields) {
|
|
3177
|
+
if (input.data.getChild(column.name)?.nullCount)
|
|
3178
|
+
throw new Error("PointCloudTiler: null point attributes require an explicit mapping");
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
const mesh = "shape" in input ? convertTableToMesh(input) : input;
|
|
3182
|
+
if (mesh.topology !== "point-list" || mesh.indices)
|
|
3183
|
+
throw new Error("PointCloudTiler: unindexed point-list input required");
|
|
3184
|
+
const position = mesh.attributes.POSITION;
|
|
3185
|
+
if (!position || position.size !== 3 || !(position.value instanceof Float32Array || position.value instanceof Float64Array) || position.transform || position.normalized || position.componentType === "float16")
|
|
3186
|
+
throw new Error("PointCloudTiler: POSITION requires decoded floating-point XYZ");
|
|
3187
|
+
if (!mesh.header && (position.byteOffset || position.byteStride))
|
|
3188
|
+
throw new Error("PointCloudTiler: strided POSITION requires vertexCount");
|
|
3189
|
+
const count = mesh.header?.vertexCount ?? position.value.length / 3;
|
|
3190
|
+
if (!Number.isSafeInteger(count) || count < 0 || count > 4294967295)
|
|
3191
|
+
throw new Error("PointCloudTiler: invalid point count");
|
|
3192
|
+
let inputBytes = 0;
|
|
3193
|
+
const storageKeys = /* @__PURE__ */ new Map();
|
|
3194
|
+
const buffers = /* @__PURE__ */ new Set();
|
|
3195
|
+
for (const attribute of Object.values(mesh.attributes)) {
|
|
3196
|
+
this.validateAttribute(attribute, count);
|
|
3197
|
+
if (!buffers.has(attribute.value.buffer)) {
|
|
3198
|
+
buffers.add(attribute.value.buffer);
|
|
3199
|
+
inputBytes += attribute.value.buffer.byteLength;
|
|
3200
|
+
}
|
|
3201
|
+
const storage = storageKeys.get(attribute.value.buffer) ?? /* @__PURE__ */ new Set();
|
|
3202
|
+
const storageKey = getAttributeStorageKey(attribute);
|
|
3203
|
+
if (!storage.has(storageKey)) {
|
|
3204
|
+
this.pointByteLength += attribute.size * attribute.value.BYTES_PER_ELEMENT;
|
|
3205
|
+
storage.add(storageKey);
|
|
3206
|
+
storageKeys.set(attribute.value.buffer, storage);
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
if (inputBytes > this.options.maxInputBytes)
|
|
3210
|
+
throw new Error("PointCloudTiler: input byte budget exceeded");
|
|
3211
|
+
this.mesh = mesh;
|
|
3212
|
+
this.sourcePointCount = count;
|
|
3213
|
+
const rows = this.allocateRows(count);
|
|
3214
|
+
const minimum = [Infinity, Infinity, Infinity];
|
|
3215
|
+
const maximum = [-Infinity, -Infinity, -Infinity];
|
|
3216
|
+
for (let row = 0; row < count; row++) {
|
|
3217
|
+
if (row % 65536 === 0) await this.checkpoint();
|
|
3218
|
+
rows[row] = row;
|
|
3219
|
+
for (let axis = 0; axis < 3; axis++) {
|
|
3220
|
+
const coordinate = this.getCoordinate(row, axis);
|
|
3221
|
+
if (!Number.isFinite(coordinate)) throw new Error("PointCloudTiler: nonfinite position");
|
|
3222
|
+
minimum[axis] = Math.min(minimum[axis], coordinate);
|
|
3223
|
+
maximum[axis] = Math.max(maximum[axis], coordinate);
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
if (!count) {
|
|
3227
|
+
minimum.fill(0);
|
|
3228
|
+
maximum.fill(0);
|
|
3229
|
+
}
|
|
3230
|
+
const width = Math.max(...minimum.map((value, axis) => maximum[axis] - value));
|
|
3231
|
+
if (!Number.isFinite(width)) throw new Error("PointCloudTiler: coordinate extent overflow");
|
|
3232
|
+
for (let axis = 0; axis < 3; axis++) maximum[axis] = minimum[axis] + width;
|
|
3233
|
+
if (!maximum.every(Number.isFinite) || !Number.isFinite(Math.hypot(width, width, width)))
|
|
3234
|
+
throw new Error("PointCloudTiler: coordinate extent overflow");
|
|
3235
|
+
await this.createNode("r", [minimum, maximum], rows);
|
|
3236
|
+
this.signal.throwIfAborted();
|
|
3237
|
+
}
|
|
3238
|
+
/** Selects at most one source row per grid cell; rejects no input rows. */
|
|
3239
|
+
async createNode(id, bounds, inputRows) {
|
|
3240
|
+
const terminal = id.length - 1 >= this.options.maximumDepth || bounds[0].every((value, axis) => value === bounds[1][axis]) || inputRows.length <= this.options.nodePointLimit;
|
|
3241
|
+
let rows = inputRows;
|
|
3242
|
+
let remaining = new Uint32Array(0);
|
|
3243
|
+
if (!terminal) {
|
|
3244
|
+
const resolution = Math.ceil(Math.cbrt(this.options.nodePointLimit));
|
|
3245
|
+
const cells = /* @__PURE__ */ new Set();
|
|
3246
|
+
const selected = this.allocateRows(Math.min(inputRows.length, this.options.nodePointLimit));
|
|
3247
|
+
const deferred = this.allocateRows(inputRows.length);
|
|
3248
|
+
let selectedCount = 0;
|
|
3249
|
+
let deferredCount = 0;
|
|
3250
|
+
for (let index = 0; index < inputRows.length; index++) {
|
|
3251
|
+
if (index % 65536 === 0) await this.checkpoint();
|
|
3252
|
+
const row = inputRows[index];
|
|
3253
|
+
let cell = 0;
|
|
3254
|
+
for (let axis = 0; axis < 3; axis++) {
|
|
3255
|
+
const component = Math.min(
|
|
3256
|
+
resolution - 1,
|
|
3257
|
+
Math.floor(
|
|
3258
|
+
(this.getCoordinate(row, axis) - bounds[0][axis]) / (bounds[1][axis] - bounds[0][axis]) * resolution
|
|
3259
|
+
)
|
|
3260
|
+
);
|
|
3261
|
+
cell = cell * resolution + component;
|
|
3262
|
+
}
|
|
3263
|
+
if (selectedCount < selected.length && !cells.has(cell)) {
|
|
3264
|
+
cells.add(cell);
|
|
3265
|
+
selected[selectedCount++] = row;
|
|
3266
|
+
} else deferred[deferredCount++] = row;
|
|
3267
|
+
}
|
|
3268
|
+
rows = selected.subarray(0, selectedCount);
|
|
3269
|
+
remaining = deferred.subarray(0, deferredCount);
|
|
3270
|
+
this.releaseRows(inputRows);
|
|
3271
|
+
}
|
|
3272
|
+
const state = {
|
|
3273
|
+
node: {
|
|
3274
|
+
id,
|
|
3275
|
+
level: id.length - 1,
|
|
3276
|
+
pointCount: rows.length,
|
|
3277
|
+
bounds,
|
|
3278
|
+
geometricError: remaining.length ? Math.hypot(...bounds[0].map((value, axis) => bounds[1][axis] - value)) : 0
|
|
3279
|
+
},
|
|
3280
|
+
rows,
|
|
3281
|
+
remaining
|
|
3282
|
+
};
|
|
3283
|
+
Object.freeze(bounds[0]);
|
|
3284
|
+
Object.freeze(bounds[1]);
|
|
3285
|
+
Object.freeze(bounds);
|
|
3286
|
+
Object.freeze(state.node);
|
|
3287
|
+
this.signal.throwIfAborted();
|
|
3288
|
+
if (this.nodes.size >= this.options.maxNodes)
|
|
3289
|
+
throw new Error("PointCloudTiler: node budget exceeded");
|
|
3290
|
+
this.nodes.set(id, state);
|
|
3291
|
+
return state;
|
|
3292
|
+
}
|
|
3293
|
+
/** Reads a floating-point coordinate from a checked packed or strided accessor. */
|
|
3294
|
+
getCoordinate(row, axis) {
|
|
3295
|
+
const attribute = this.mesh.attributes.POSITION;
|
|
3296
|
+
return Number(
|
|
3297
|
+
attribute.value[(attribute.byteOffset || 0) / attribute.value.BYTES_PER_ELEMENT + row * (attribute.byteStride || 3 * attribute.value.BYTES_PER_ELEMENT) / attribute.value.BYTES_PER_ELEMENT + axis]
|
|
3298
|
+
);
|
|
3299
|
+
}
|
|
3300
|
+
/** Validates a typed attribute's alignment and coverage before indexing or gathering. */
|
|
3301
|
+
validateAttribute(attribute, count) {
|
|
3302
|
+
const bytes = attribute.value?.BYTES_PER_ELEMENT;
|
|
3303
|
+
const offset = attribute.byteOffset ?? 0;
|
|
3304
|
+
const stride = attribute.byteStride || attribute.size * bytes;
|
|
3305
|
+
if (!bytes || !Number.isSafeInteger(attribute.size) || attribute.size < 1 || !Number.isSafeInteger(offset) || offset < 0 || offset % bytes || !Number.isSafeInteger(stride) || stride < attribute.size * bytes || stride % bytes || count && offset + (count - 1) * stride + attribute.size * bytes > attribute.value.byteLength)
|
|
3306
|
+
throw new Error("PointCloudTiler: invalid attribute layout");
|
|
3307
|
+
}
|
|
3308
|
+
/** Allocates counted row-index storage before any allocation exceeds the live budget. */
|
|
3309
|
+
allocateRows(count) {
|
|
3310
|
+
if (count * 4 > this.options.maxIndexBytes - this.indexBytes)
|
|
3311
|
+
throw new Error("PointCloudTiler: index byte budget exceeded");
|
|
3312
|
+
const rows = new Uint32Array(count);
|
|
3313
|
+
this.indexBytes += rows.byteLength;
|
|
3314
|
+
return rows;
|
|
3315
|
+
}
|
|
3316
|
+
/** Releases the allocation underlying a row subview. */
|
|
3317
|
+
releaseRows(rows) {
|
|
3318
|
+
this.indexBytes -= rows.buffer.byteLength;
|
|
3319
|
+
}
|
|
3320
|
+
/** Retrieves source-owned state, rejecting unknown or closed tiles. */
|
|
3321
|
+
getNode(id) {
|
|
3322
|
+
this.signal.throwIfAborted();
|
|
3323
|
+
const state = this.nodes.get(id);
|
|
3324
|
+
if (!state) throw new Error(`PointCloudTiler: unknown tile ${id}`);
|
|
3325
|
+
return state;
|
|
3326
|
+
}
|
|
3327
|
+
/** Resolves deterministic octant ownership, assigning midpoint boundaries to the upper child. */
|
|
3328
|
+
getOctant(row, midpoint) {
|
|
3329
|
+
let octant = 0;
|
|
3330
|
+
for (let axis = 0; axis < 3; axis++)
|
|
3331
|
+
if (this.getCoordinate(row, axis) >= midpoint[axis]) octant |= 4 >> axis;
|
|
3332
|
+
return octant;
|
|
3333
|
+
}
|
|
3334
|
+
/** Yields to the event loop and checks cancellation without public-network or platform APIs. */
|
|
3335
|
+
async checkpoint() {
|
|
3336
|
+
this.signal.throwIfAborted();
|
|
3337
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
3338
|
+
this.signal.throwIfAborted();
|
|
3339
|
+
}
|
|
3340
|
+
};
|
|
3341
|
+
function getAttributeStorageKey(attribute) {
|
|
3342
|
+
return [
|
|
3343
|
+
attribute.value.constructor.name,
|
|
3344
|
+
attribute.value.byteOffset,
|
|
3345
|
+
attribute.value.byteLength,
|
|
3346
|
+
attribute.size,
|
|
3347
|
+
attribute.byteOffset ?? 0,
|
|
3348
|
+
attribute.byteStride || attribute.size * attribute.value.BYTES_PER_ELEMENT
|
|
3349
|
+
].join(":");
|
|
3350
|
+
}
|
|
3351
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3352
|
+
0 && (module.exports = {
|
|
3353
|
+
ArrowLikeDataType,
|
|
3354
|
+
ArrowLikeField,
|
|
3355
|
+
ArrowLikeSchema,
|
|
3356
|
+
ArrowLikeTable,
|
|
3357
|
+
ArrowTableBuilder,
|
|
3358
|
+
AsyncQueue,
|
|
3359
|
+
ColumnarTableBatchAggregator,
|
|
3360
|
+
PointCloudTiler,
|
|
3361
|
+
RowTableBatchAggregator,
|
|
3362
|
+
TABLE_CONVERTERS,
|
|
3363
|
+
TableBatchBuilder,
|
|
3364
|
+
TableConverter,
|
|
3365
|
+
convert,
|
|
3366
|
+
convertArrowToSchema,
|
|
3367
|
+
convertArrowToTable,
|
|
3368
|
+
convertBatch,
|
|
3369
|
+
convertBatches,
|
|
3370
|
+
convertMeshToTable,
|
|
3371
|
+
convertSchemaToArrow,
|
|
3372
|
+
convertTable,
|
|
3373
|
+
convertTableToArrow,
|
|
3374
|
+
convertTableToMesh,
|
|
3375
|
+
convertToArrayRow,
|
|
3376
|
+
convertToObjectRow,
|
|
3377
|
+
deduceMeshField,
|
|
3378
|
+
deduceMeshSchema,
|
|
3379
|
+
deduceTableSchema,
|
|
3380
|
+
deserializeArrowField,
|
|
3381
|
+
deserializeArrowMetadata,
|
|
3382
|
+
deserializeArrowSchema,
|
|
3383
|
+
deserializeArrowType,
|
|
3384
|
+
getArrayTypeFromDataType,
|
|
3385
|
+
getArrowViewTypeSupport,
|
|
3386
|
+
getDataTypeFromArray,
|
|
3387
|
+
getMeshBoundingBox,
|
|
3388
|
+
getMeshSize,
|
|
3389
|
+
getTableCell,
|
|
3390
|
+
getTableCellAt,
|
|
3391
|
+
getTableColumnIndex,
|
|
3392
|
+
getTableColumnName,
|
|
3393
|
+
getTableLength,
|
|
3394
|
+
getTableNumCols,
|
|
3395
|
+
getTableRowAsArray,
|
|
3396
|
+
getTableRowAsObject,
|
|
3397
|
+
getTableRowShape,
|
|
3398
|
+
getTypeInfo,
|
|
3399
|
+
isArrayRowTable,
|
|
3400
|
+
isArrowTable,
|
|
3401
|
+
isColumnarTable,
|
|
3402
|
+
isGeoJSONTable,
|
|
3403
|
+
isObjectRowTable,
|
|
3404
|
+
isTable,
|
|
3405
|
+
makeArrayRowIterator,
|
|
3406
|
+
makeArrowRecordBatchIterator,
|
|
3407
|
+
makeArrowTableBatchIterator,
|
|
3408
|
+
makeBatchFromTable,
|
|
3409
|
+
makeMeshArrowTable,
|
|
3410
|
+
makeMeshAttributeMetadata,
|
|
3411
|
+
makeObjectRowIterator,
|
|
3412
|
+
makeRowIterator,
|
|
3413
|
+
makeTableBatchIterator,
|
|
3414
|
+
makeTableFromBatches,
|
|
3415
|
+
makeTableFromData,
|
|
3416
|
+
queryArrowTable,
|
|
3417
|
+
selectArrowTableRows,
|
|
3418
|
+
serializeArrowField,
|
|
3419
|
+
serializeArrowMetadata,
|
|
3420
|
+
serializeArrowSchema,
|
|
3421
|
+
serializeArrowType
|
|
3422
|
+
});
|