@loaders.gl/schema 4.0.0-alpha.4 → 4.0.0-alpha.6
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/dist/bundle.d.ts +2 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +2 -2
- package/dist/dist.min.js +13589 -0
- package/dist/es5/bundle.js +6 -0
- package/dist/es5/bundle.js.map +1 -0
- package/dist/es5/index.js +406 -0
- package/dist/es5/index.js.map +1 -0
- package/dist/es5/lib/mesh/convert-mesh.js +34 -0
- package/dist/es5/lib/mesh/convert-mesh.js.map +1 -0
- package/dist/es5/lib/mesh/deduce-mesh-schema.js +56 -0
- package/dist/es5/lib/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/es5/lib/mesh/mesh-to-arrow-table.js +2 -0
- package/dist/es5/lib/mesh/mesh-to-arrow-table.js.map +1 -0
- package/dist/es5/lib/mesh/mesh-utils.js +40 -0
- package/dist/es5/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/es5/lib/table/arrow/arrow-type-utils.js +30 -0
- package/dist/es5/lib/table/arrow/arrow-type-utils.js.map +1 -0
- package/dist/es5/lib/table/arrow/convert-schema-arrow.js +179 -0
- package/dist/es5/lib/table/arrow/convert-schema-arrow.js.map +1 -0
- package/dist/es5/lib/table/arrow/convert-table-to-arrow.js +2 -0
- package/dist/es5/lib/table/arrow/convert-table-to-arrow.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-field.js +49 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-schema.js +118 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-table.js +80 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-type.js +740 -0
- package/dist/es5/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/enum.js +55 -0
- package/dist/es5/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/get-type-info.js +27 -0
- package/dist/es5/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/es5/lib/table/arrow-api/index.js +44 -0
- package/dist/es5/lib/table/arrow-api/index.js.map +1 -0
- package/dist/es5/lib/table/batches/base-table-batch-aggregator.js +78 -0
- package/dist/es5/lib/table/batches/base-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/table/batches/columnar-table-batch-aggregator.js +106 -0
- package/dist/es5/lib/table/batches/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/table/batches/row-table-batch-aggregator.js +96 -0
- package/dist/es5/lib/table/batches/row-table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/table/batches/table-batch-aggregator.js +2 -0
- package/dist/es5/lib/table/batches/table-batch-aggregator.js.map +1 -0
- package/dist/es5/lib/table/batches/table-batch-builder.js +173 -0
- package/dist/es5/lib/table/batches/table-batch-builder.js.map +1 -0
- package/dist/es5/lib/table/simple-table/convert-table.js +82 -0
- package/dist/es5/lib/table/simple-table/convert-table.js.map +1 -0
- package/dist/es5/lib/table/simple-table/data-type.js +94 -0
- package/dist/es5/lib/table/simple-table/data-type.js.map +1 -0
- package/dist/es5/lib/table/simple-table/make-table.js +60 -0
- package/dist/es5/lib/table/simple-table/make-table.js.map +1 -0
- package/dist/es5/lib/table/simple-table/row-utils.js +34 -0
- package/dist/es5/lib/table/simple-table/row-utils.js.map +1 -0
- package/dist/es5/lib/table/simple-table/table-accessors.js +343 -0
- package/dist/es5/lib/table/simple-table/table-accessors.js.map +1 -0
- package/dist/es5/lib/table/simple-table/table-column.js +12 -0
- package/dist/es5/lib/table/simple-table/table-column.js.map +1 -0
- package/dist/es5/lib/table/simple-table/table-schema.js +85 -0
- package/dist/es5/lib/table/simple-table/table-schema.js.map +1 -0
- package/dist/es5/lib/utils/assert.js +12 -0
- package/dist/es5/lib/utils/assert.js.map +1 -0
- package/dist/es5/lib/utils/async-queue.js +169 -0
- package/dist/es5/lib/utils/async-queue.js.map +1 -0
- package/dist/es5/types/category-gis.js +2 -0
- package/dist/es5/types/category-gis.js.map +1 -0
- package/dist/es5/types/category-image.js +2 -0
- package/dist/es5/types/category-image.js.map +1 -0
- package/dist/es5/types/category-mesh.js +2 -0
- package/dist/es5/types/category-mesh.js.map +1 -0
- package/dist/es5/types/category-table.js +2 -0
- package/dist/es5/types/category-table.js.map +1 -0
- package/dist/es5/types/category-texture.js +2 -0
- package/dist/es5/types/category-texture.js.map +1 -0
- package/dist/es5/types/schema.js +2 -0
- package/dist/es5/types/schema.js.map +1 -0
- package/dist/es5/types/types.js +2 -0
- package/dist/es5/types/types.js.map +1 -0
- package/dist/esm/bundle.js +4 -0
- package/dist/esm/bundle.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{category → esm/lib}/mesh/convert-mesh.js +0 -11
- package/dist/esm/lib/mesh/convert-mesh.js.map +1 -0
- package/dist/esm/lib/mesh/deduce-mesh-schema.js +48 -0
- package/dist/esm/lib/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/esm/lib/mesh/mesh-to-arrow-table.js +2 -0
- package/dist/esm/lib/mesh/mesh-to-arrow-table.js.map +1 -0
- package/dist/{category → esm/lib}/mesh/mesh-utils.js +0 -5
- package/dist/esm/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/{lib/arrow/arrow-like-type-utils.js → esm/lib/table/arrow/arrow-type-utils.js} +3 -11
- package/dist/esm/lib/table/arrow/arrow-type-utils.js.map +1 -0
- package/dist/esm/lib/table/arrow/convert-schema-arrow.js +158 -0
- package/dist/esm/lib/table/arrow/convert-schema-arrow.js.map +1 -0
- package/dist/esm/lib/table/arrow/convert-table-to-arrow.js +2 -0
- package/dist/esm/lib/table/arrow/convert-table-to-arrow.js.map +1 -0
- package/dist/{lib/schema/impl/field.js → esm/lib/table/arrow-api/arrow-like-field.js} +6 -13
- package/dist/esm/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/{lib/schema/impl/schema.js → esm/lib/table/arrow-api/arrow-like-schema.js} +22 -47
- package/dist/esm/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/esm/lib/table/arrow-api/arrow-like-table.js +51 -0
- package/dist/esm/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/{lib/schema/impl/type.js → esm/lib/table/arrow-api/arrow-like-type.js} +11 -116
- package/dist/esm/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/{lib/schema/impl → esm/lib/table/arrow-api}/enum.js +3 -4
- package/dist/esm/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/{lib/arrow → esm/lib/table/arrow-api}/get-type-info.js +1 -4
- package/dist/esm/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/esm/lib/table/arrow-api/index.js +5 -0
- package/dist/esm/lib/table/arrow-api/index.js.map +1 -0
- package/dist/{lib → esm/lib/table}/batches/base-table-batch-aggregator.js +1 -18
- package/dist/esm/lib/table/batches/base-table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib/table}/batches/columnar-table-batch-aggregator.js +1 -24
- package/dist/esm/lib/table/batches/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib/table}/batches/row-table-batch-aggregator.js +2 -22
- package/dist/esm/lib/table/batches/row-table-batch-aggregator.js.map +1 -0
- package/dist/esm/lib/table/batches/table-batch-aggregator.js.map +1 -0
- package/dist/{lib → esm/lib/table}/batches/table-batch-builder.js +6 -49
- package/dist/esm/lib/table/batches/table-batch-builder.js.map +1 -0
- package/dist/esm/lib/table/simple-table/convert-table.js +59 -0
- package/dist/esm/lib/table/simple-table/convert-table.js.map +1 -0
- package/dist/esm/lib/table/simple-table/data-type.js +85 -0
- package/dist/esm/lib/table/simple-table/data-type.js.map +1 -0
- package/dist/esm/lib/table/simple-table/make-table.js +50 -0
- package/dist/esm/lib/table/simple-table/make-table.js.map +1 -0
- package/dist/{lib/utils → esm/lib/table/simple-table}/row-utils.js +0 -8
- package/dist/esm/lib/table/simple-table/row-utils.js.map +1 -0
- package/dist/esm/lib/table/simple-table/table-accessors.js +262 -0
- package/dist/esm/lib/table/simple-table/table-accessors.js.map +1 -0
- package/dist/esm/lib/table/simple-table/table-column.js +6 -0
- package/dist/esm/lib/table/simple-table/table-column.js.map +1 -0
- package/dist/esm/lib/table/simple-table/table-schema.js +70 -0
- package/dist/esm/lib/table/simple-table/table-schema.js.map +1 -0
- package/dist/esm/lib/utils/assert.js +6 -0
- package/dist/esm/lib/utils/assert.js.map +1 -0
- package/dist/esm/lib/utils/async-queue.js +94 -0
- package/dist/esm/lib/utils/async-queue.js.map +1 -0
- package/dist/esm/types/category-gis.js +2 -0
- package/dist/esm/types/category-gis.js.map +1 -0
- package/dist/esm/types/category-image.js +2 -0
- package/dist/esm/types/category-image.js.map +1 -0
- package/dist/esm/types/category-mesh.js +2 -0
- package/dist/esm/types/category-mesh.js.map +1 -0
- package/dist/esm/types/category-table.js +2 -0
- package/dist/esm/types/category-table.js.map +1 -0
- package/dist/esm/types/category-texture.js +2 -0
- package/dist/esm/types/category-texture.js.map +1 -0
- package/dist/esm/types/schema.js +2 -0
- package/dist/esm/types/schema.js.map +1 -0
- package/dist/esm/types/types.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +92 -13
- package/dist/lib/mesh/convert-mesh.d.ts +15 -0
- package/dist/lib/mesh/convert-mesh.d.ts.map +1 -0
- package/dist/lib/mesh/convert-mesh.js +40 -0
- package/dist/lib/mesh/deduce-mesh-schema.d.ts +24 -0
- package/dist/lib/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/lib/mesh/deduce-mesh-schema.js +66 -0
- package/dist/lib/mesh/mesh-to-arrow-table.d.ts +1 -0
- package/dist/lib/mesh/mesh-to-arrow-table.d.ts.map +1 -0
- package/dist/lib/mesh/mesh-to-arrow-table.js +44 -0
- package/dist/lib/mesh/mesh-utils.d.ts +23 -0
- package/dist/lib/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/lib/mesh/mesh-utils.js +51 -0
- package/dist/lib/table/arrow/arrow-type-utils.d.ts +4 -0
- package/dist/lib/table/arrow/arrow-type-utils.d.ts.map +1 -0
- package/dist/lib/table/arrow/arrow-type-utils.js +53 -0
- package/dist/lib/table/arrow/convert-schema-arrow.d.ts +13 -0
- package/dist/lib/table/arrow/convert-schema-arrow.d.ts.map +1 -0
- package/dist/lib/table/arrow/convert-schema-arrow.js +187 -0
- package/dist/lib/table/arrow/convert-table-to-arrow.d.ts +42 -0
- package/dist/lib/table/arrow/convert-table-to-arrow.d.ts.map +1 -0
- package/dist/lib/table/arrow/convert-table-to-arrow.js +57 -0
- package/dist/lib/table/arrow-api/arrow-like-field.d.ts +19 -0
- package/dist/lib/table/arrow-api/arrow-like-field.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/arrow-like-field.js +34 -0
- package/dist/lib/table/arrow-api/arrow-like-schema.d.ts +12 -0
- package/dist/lib/table/arrow-api/arrow-like-schema.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/arrow-like-schema.js +81 -0
- package/dist/lib/table/arrow-api/arrow-like-table.d.ts +28 -0
- package/dist/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/arrow-like-table.js +53 -0
- package/dist/lib/table/arrow-api/arrow-like-type.d.ts +177 -0
- package/dist/lib/table/arrow-api/arrow-like-type.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/arrow-like-type.js +463 -0
- package/dist/lib/table/arrow-api/enum.d.ts +92 -0
- package/dist/lib/table/arrow-api/enum.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/enum.js +97 -0
- package/dist/lib/table/arrow-api/get-type-info.d.ts +13 -0
- package/dist/lib/table/arrow-api/get-type-info.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/get-type-info.js +29 -0
- package/dist/lib/table/arrow-api/index.d.ts +5 -0
- package/dist/lib/table/arrow-api/index.d.ts.map +1 -0
- package/dist/lib/table/arrow-api/index.js +25 -0
- package/dist/lib/table/batches/base-table-batch-aggregator.d.ts +19 -0
- package/dist/lib/table/batches/base-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/table/batches/base-table-batch-aggregator.js +60 -0
- package/dist/lib/table/batches/columnar-table-batch-aggregator.d.ts +23 -0
- package/dist/lib/table/batches/columnar-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/table/batches/columnar-table-batch-aggregator.js +92 -0
- package/dist/lib/table/batches/row-table-batch-aggregator.d.ts +22 -0
- package/dist/lib/table/batches/row-table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/table/batches/row-table-batch-aggregator.js +81 -0
- package/dist/lib/table/batches/table-batch-aggregator.d.ts +25 -0
- package/dist/lib/table/batches/table-batch-aggregator.d.ts.map +1 -0
- package/dist/lib/table/batches/table-batch-aggregator.js +3 -0
- package/dist/lib/table/batches/table-batch-builder.d.ts +53 -0
- package/dist/lib/table/batches/table-batch-builder.d.ts.map +1 -0
- package/dist/lib/table/batches/table-batch-builder.js +152 -0
- package/dist/lib/table/simple-table/convert-table.d.ts +8 -0
- package/dist/lib/table/simple-table/convert-table.d.ts.map +1 -0
- package/dist/lib/table/simple-table/convert-table.js +65 -0
- package/dist/lib/table/simple-table/data-type.d.ts +17 -0
- package/dist/lib/table/simple-table/data-type.d.ts.map +1 -0
- package/dist/lib/table/simple-table/data-type.js +93 -0
- package/dist/lib/table/simple-table/make-table.d.ts +65 -0
- package/dist/lib/table/simple-table/make-table.d.ts.map +1 -0
- package/dist/lib/table/simple-table/make-table.js +95 -0
- package/dist/lib/table/simple-table/row-utils.d.ts +9 -0
- package/dist/lib/table/simple-table/row-utils.d.ts.map +1 -0
- package/dist/lib/table/simple-table/row-utils.js +33 -0
- package/dist/lib/table/simple-table/table-accessors.d.ts +67 -0
- package/dist/lib/table/simple-table/table-accessors.d.ts.map +1 -0
- package/dist/lib/table/simple-table/table-accessors.js +319 -0
- package/dist/lib/table/simple-table/table-column.d.ts +7 -0
- package/dist/lib/table/simple-table/table-column.d.ts.map +1 -0
- package/dist/lib/table/simple-table/table-column.js +41 -0
- package/dist/lib/table/simple-table/table-schema.d.ts +15 -0
- package/dist/lib/table/simple-table/table-schema.d.ts.map +1 -0
- package/dist/lib/table/simple-table/table-schema.js +85 -0
- package/dist/lib/utils/assert.d.ts +2 -0
- package/dist/lib/utils/assert.d.ts.map +1 -0
- package/dist/lib/utils/assert.js +11 -5
- package/dist/lib/utils/async-queue.d.ts +18 -0
- package/dist/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/lib/utils/async-queue.js +82 -109
- package/dist/types/category-gis.d.ts +99 -0
- package/dist/types/category-gis.d.ts.map +1 -0
- package/dist/types/category-gis.js +2 -0
- package/dist/types/category-image.d.ts +18 -0
- package/dist/types/category-image.d.ts.map +1 -0
- package/dist/types/category-image.js +2 -0
- package/dist/types/category-mesh.d.ts +48 -0
- package/dist/types/category-mesh.d.ts.map +1 -0
- package/dist/types/category-mesh.js +3 -0
- package/dist/types/category-table.d.ts +86 -0
- package/dist/types/category-table.d.ts.map +1 -0
- package/dist/types/category-table.js +3 -0
- package/dist/types/category-texture.d.ts +18 -0
- package/dist/types/category-texture.d.ts.map +1 -0
- package/dist/types/category-texture.js +3 -0
- package/dist/types/schema.d.ts +77 -0
- package/dist/types/schema.d.ts.map +1 -0
- package/dist/types/schema.js +3 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/types.js +2 -0
- package/package.json +7 -8
- package/src/index.ts +82 -29
- package/src/{category → lib}/mesh/convert-mesh.ts +10 -8
- package/src/{category → lib}/mesh/deduce-mesh-schema.ts +20 -19
- package/src/{category → lib}/mesh/mesh-to-arrow-table.ts +5 -3
- package/src/{category → lib}/mesh/mesh-utils.ts +2 -2
- package/src/lib/{arrow → table/arrow}/arrow-type-utils.ts +16 -12
- package/src/lib/table/arrow/convert-schema-arrow.ts +232 -0
- package/src/lib/table/arrow/convert-table-to-arrow.ts +59 -0
- package/src/lib/{schema/impl/field.ts → table/arrow-api/arrow-like-field.ts} +6 -4
- package/src/lib/table/arrow-api/arrow-like-schema.ts +99 -0
- package/src/lib/table/arrow-api/arrow-like-table.ts +83 -0
- package/src/lib/{schema/impl/type.ts → table/arrow-api/arrow-like-type.ts} +2 -1
- package/src/lib/{arrow → table/arrow-api}/get-type-info.ts +4 -3
- package/src/lib/table/arrow-api/index.ts +6 -0
- package/src/lib/{batches → table/batches}/base-table-batch-aggregator.ts +5 -3
- package/src/lib/{batches → table/batches}/columnar-table-batch-aggregator.ts +5 -3
- package/src/lib/{batches → table/batches}/row-table-batch-aggregator.ts +6 -4
- package/src/lib/{batches → table/batches}/table-batch-aggregator.ts +4 -2
- package/src/lib/{batches → table/batches}/table-batch-builder.ts +8 -6
- package/src/lib/table/simple-table/convert-table.ts +72 -0
- package/src/lib/table/simple-table/data-type.ts +102 -0
- package/src/lib/table/simple-table/make-table.ts +108 -0
- package/src/lib/table/simple-table/table-accessors.ts +360 -0
- package/src/lib/table/simple-table/table-column.ts +47 -0
- package/src/lib/table/simple-table/table-schema.ts +97 -0
- package/src/types/category-gis.ts +136 -0
- package/src/types/category-image.ts +19 -0
- package/src/{category/mesh/mesh-types.ts → types/category-mesh.ts} +6 -4
- package/src/types/category-table.ts +104 -0
- package/src/types/category-texture.ts +30 -0
- package/src/types/schema.ts +97 -0
- package/src/types/types.ts +43 -0
- package/dist/bundle.js.map +0 -1
- package/dist/category/common.js +0 -2
- package/dist/category/common.js.map +0 -1
- package/dist/category/gis.js +0 -2
- package/dist/category/gis.js.map +0 -1
- package/dist/category/mesh/convert-mesh.js.map +0 -1
- package/dist/category/mesh/deduce-mesh-schema.js +0 -42
- package/dist/category/mesh/deduce-mesh-schema.js.map +0 -1
- package/dist/category/mesh/mesh-to-arrow-table.js +0 -31
- package/dist/category/mesh/mesh-to-arrow-table.js.map +0 -1
- package/dist/category/mesh/mesh-types.js +0 -2
- package/dist/category/mesh/mesh-types.js.map +0 -1
- package/dist/category/mesh/mesh-utils.js.map +0 -1
- package/dist/category/table/deduce-table-schema.js +0 -51
- package/dist/category/table/deduce-table-schema.js.map +0 -1
- package/dist/category/table/table-types.js +0 -2
- package/dist/category/table/table-types.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/arrow/arrow-like-type-utils.js.map +0 -1
- package/dist/lib/arrow/arrow-type-utils.js +0 -62
- package/dist/lib/arrow/arrow-type-utils.js.map +0 -1
- package/dist/lib/arrow/get-type-info.js.map +0 -1
- package/dist/lib/batches/base-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/row-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/table-batch-builder.js.map +0 -1
- package/dist/lib/schema/impl/enum.js.map +0 -1
- package/dist/lib/schema/impl/field.js.map +0 -1
- package/dist/lib/schema/impl/schema.js.map +0 -1
- package/dist/lib/schema/impl/type.js.map +0 -1
- package/dist/lib/schema/index.js +0 -5
- package/dist/lib/schema/index.js.map +0 -1
- package/dist/lib/schema-utils/deduce-column-type.js +0 -23
- package/dist/lib/schema-utils/deduce-column-type.js.map +0 -1
- package/dist/lib/utils/assert.js.map +0 -1
- package/dist/lib/utils/async-queue.js.map +0 -1
- package/dist/lib/utils/row-utils.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/src/category/common.ts +0 -30
- package/src/category/gis.ts +0 -61
- package/src/category/table/deduce-table-schema.ts +0 -123
- package/src/category/table/table-types.ts +0 -81
- package/src/lib/arrow/arrow-like-type-utils.ts +0 -25
- package/src/lib/schema/impl/schema.ts +0 -99
- package/src/lib/schema/index.ts +0 -82
- package/src/lib/schema-utils/deduce-column-type.ts +0 -92
- package/src/types.ts +0 -19
- /package/dist/{lib → esm/lib/table}/batches/table-batch-aggregator.js +0 -0
- /package/dist/{types.js → esm/types/types.js} +0 -0
- /package/src/lib/{schema/impl → table/arrow-api}/enum.ts +0 -0
- /package/src/lib/{utils → table/simple-table}/row-utils.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../src/types/schema.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {RecordBatch} from 'apache-arrow';\n\n/** For dictionary type */\nexport type KeyType = 'int8' | 'int16' | 'int32' | 'uint8' | 'uint16' | 'uint32';\n\n/** ArrowLike DataType class */\nexport type DataType =\n | 'null'\n // Primitive types\n | 'bool'\n | 'int'\n | 'int8'\n | 'int16'\n | 'int32'\n | 'int64'\n | 'uint8'\n | 'uint16'\n | 'uint32'\n | 'uint64'\n | 'float'\n | 'float16'\n | 'float32'\n | 'float64'\n | 'binary'\n | 'utf8'\n | 'date-day'\n | 'date-millisecond'\n | 'time-second'\n | 'time-millisecond'\n | 'time-microsecond'\n | 'time-nanosecond'\n | 'timestamp-second'\n | 'timestamp-millisecond'\n | 'timestamp-microsecond'\n | 'timestamp-nanosecond'\n | 'interval-daytime'\n | 'interval-yearmonth'\n // Composite types\n | {type: 'list'; children: Field[]} // one child only\n | {type: 'struct'; children: Field[]}\n | {\n type: 'sparse-union';\n typeIds: Int32Array;\n children: Field[];\n typeIdToChildIndex: {[key: number]: number};\n }\n | {\n type: 'dense-union';\n typeIds: Int32Array;\n children: Field[];\n typeIdToChildIndex: {[key: number]: number};\n }\n | {type: 'fixed-size-binary'; byteWidth: number}\n | {type: 'fixed-size-list'; listSize: number; children: Field[]}\n | {type: 'map'; keysSorted: boolean; children: Field[]} // Field is \"struct\"\n | {type: 'dictionary'; id: number; indices: KeyType; dictionary: DataType; isOrdered: boolean};\n// TODO - unions etc\n\n/**\n * SchemaMetadata\n */\nexport type SchemaMetadata = Record<string, string>;\nexport type FieldMetadata = Record<string, string>;\n\nexport type Field = {\n name: string;\n type: DataType;\n nullable?: boolean;\n metadata?: FieldMetadata;\n};\n\n/**\n * `Schema` type that that can hold all data required by an Arrow Schema\n * but is fully serializable. Helper functions make it easy to convert to and from arrow schemas\n * https://loaders.gl/arrowjs/docs/api-reference/schema\n */\nexport type Schema = {\n fields: Field[];\n metadata: SchemaMetadata;\n};\n\nexport type Batch = {\n batchType: 'data' | 'metadata' | 'partial-result' | 'final-result';\n batch?: number;\n mimeType?: string;\n shape: string;\n data: any;\n recordBatch?: RecordBatch;\n length: number;\n schema?: Schema;\n bytesUsed?: number;\n count?: number;\n cursor?: number;\n [key: string]: any;\n};\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["/** Any typed array */\nexport type TypedArray =\n | Int8Array\n | Uint8Array\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Uint8ClampedArray\n | Float32Array\n | Float64Array;\n\nexport type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;\n\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type BigTypedArrayConstructor =\n | TypedArrayConstructor\n | BigInt64ArrayConstructor\n | BigUint64ArrayConstructor;\n\n/** Any numeric array: typed array or `number[]` */\nexport type NumberArray = number[] | TypedArray;\n\nexport type NumericArray = number[] | TypedArray;\n\nexport interface ArrayType<T = unknown> {\n readonly length: number;\n [n: number]: T;\n}\n\n/** Any array: typed array or js array (`any[]`) */\nexport type AnyArray = any[] | TypedArray;\n"],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type { TypedArray, TypedArrayConstructor, NumberArray, ArrayType, AnyArray } from './types/types';
|
|
2
|
+
export type { Schema, Field, DataType, Batch, SchemaMetadata, FieldMetadata } from './types/schema';
|
|
3
|
+
export type { Table, RowTable, ArrayRowTable, ObjectRowTable, GeoJSONRowTable, ColumnarTable, ArrowTable, Tables } from './types/category-table';
|
|
4
|
+
export type { TableBatch, ArrayRowTableBatch, ObjectRowTableBatch, GeoJSONRowTableBatch, ColumnarTableBatch, ArrowTableBatch } from './types/category-table';
|
|
5
|
+
export { TableBatchBuilder } from './lib/table/batches/table-batch-builder';
|
|
6
|
+
export type { TableBatchAggregator } from './lib/table/batches/table-batch-aggregator';
|
|
7
|
+
export { RowTableBatchAggregator } from './lib/table/batches/row-table-batch-aggregator';
|
|
8
|
+
export { ColumnarTableBatchAggregator } from './lib/table/batches/columnar-table-batch-aggregator';
|
|
9
|
+
export { getTableLength, getTableNumCols, getTableCell, getTableRowShape, getTableColumnIndex, getTableColumnName, getTableRowAsObject, getTableRowAsArray, makeRowIterator, makeArrayRowIterator, makeObjectRowIterator } from './lib/table/simple-table/table-accessors';
|
|
10
|
+
export { ArrowLikeTable } from './lib/table/arrow-api/arrow-like-table';
|
|
11
|
+
export { makeTableFromData } from './lib/table/simple-table/make-table';
|
|
12
|
+
export { deduceTableSchema } from './lib/table/simple-table/table-schema';
|
|
13
|
+
export { convertToObjectRow, convertToArrayRow } from './lib/table/simple-table/row-utils';
|
|
14
|
+
export { getDataTypeFromArray } from './lib/table/simple-table/data-type';
|
|
15
|
+
export type { MeshTable, MeshArrowTable, Mesh, MeshGeometry, MeshAttribute, MeshAttributes } from './types/category-mesh';
|
|
16
|
+
export { getMeshSize, getMeshBoundingBox } from './lib/mesh/mesh-utils';
|
|
17
|
+
export { deduceMeshSchema, deduceMeshField, makeMeshAttributeMetadata } from './lib/mesh/deduce-mesh-schema';
|
|
18
|
+
export type { TextureLevel, GPUTextureFormat } from './types/category-texture';
|
|
19
|
+
export type { ImageDataType, ImageType, ImageTypeEnum } from './types/category-image';
|
|
20
|
+
export type { GeoJSON, Feature, FeatureCollection, Geometry, Position, GeoJsonProperties, Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection } from './types/category-gis';
|
|
21
|
+
export type { GeojsonGeometryInfo } from './types/category-gis';
|
|
22
|
+
export type { FlatFeature, FlatIndexedGeometry, FlatGeometry, FlatGeometryType, FlatPoint, FlatLineString, FlatPolygon } from './types/category-gis';
|
|
23
|
+
export type { BinaryGeometryType, BinaryGeometry, BinaryPointGeometry, BinaryLineGeometry, BinaryPolygonGeometry, BinaryAttribute } from './types/category-gis';
|
|
24
|
+
export type { BinaryFeatures, BinaryPointFeatures, BinaryLineFeatures, BinaryPolygonFeatures } from './types/category-gis';
|
|
25
|
+
export { Schema as ArrowLikeSchema, Field as ArrowLikeField, DataType as ArrowLikeDataType, Null, Binary, Bool, Int, Int8, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Float16, Float32, Float64, Utf8, Date, DateDay, DateMillisecond, Time, TimeMillisecond, TimeSecond, Timestamp, TimestampSecond, TimestampMillisecond, TimestampMicrosecond, TimestampNanosecond, Interval, IntervalDayTime, IntervalYearMonth, FixedSizeList, Struct } from './lib/table/arrow-api';
|
|
26
|
+
export { getTypeInfo } from './lib/table/arrow-api/get-type-info';
|
|
27
|
+
export { getArrowType } from './lib/table/arrow/arrow-type-utils';
|
|
28
|
+
export { default as AsyncQueue } from './lib/utils/async-queue';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,UAAU,EACV,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,QAAQ,EACT,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAGlG,YAAY,EACV,KAAK,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,UAAU,EACV,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAC,iBAAiB,EAAC,MAAM,yCAAyC,CAAC;AAC1E,YAAY,EAAC,oBAAoB,EAAC,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAC,uBAAuB,EAAC,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAC,4BAA4B,EAAC,MAAM,qDAAqD,CAAC;AAEjG,OAAO,EACL,cAAc,EACd,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAC,cAAc,EAAC,MAAM,wCAAwC,CAAC;AAEtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AAGxE,YAAY,EACV,SAAS,EACT,cAAc,EACd,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,cAAc,EACf,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAGtE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,YAAY,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAG7E,YAAY,EAAC,aAAa,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAIpF,YAAY,EACV,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,OAAO,EACP,YAAY,EACZ,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAG9D,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,KAAK,IAAI,cAAc,EACvB,QAAQ,IAAI,iBAAiB,EAC7B,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,eAAe,EACf,IAAI,EACJ,eAAe,EACf,UAAU,EACV,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,MAAM,EACP,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAAC,WAAW,EAAC,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TimeMillisecond = exports.Time = exports.DateMillisecond = exports.DateDay = exports.Date = exports.Utf8 = exports.Float64 = exports.Float32 = exports.Float16 = exports.Float = exports.Uint64 = exports.Uint32 = exports.Uint16 = exports.Uint8 = exports.Int64 = exports.Int32 = exports.Int16 = exports.Int8 = exports.Int = exports.Bool = exports.Binary = exports.Null = exports.ArrowLikeDataType = exports.ArrowLikeField = exports.ArrowLikeSchema = exports.makeMeshAttributeMetadata = exports.deduceMeshField = exports.deduceMeshSchema = exports.getMeshBoundingBox = exports.getMeshSize = exports.getDataTypeFromArray = exports.convertToArrayRow = exports.convertToObjectRow = exports.deduceTableSchema = exports.makeTableFromData = exports.ArrowLikeTable = exports.makeObjectRowIterator = exports.makeArrayRowIterator = exports.makeRowIterator = exports.getTableRowAsArray = exports.getTableRowAsObject = exports.getTableColumnName = exports.getTableColumnIndex = exports.getTableRowShape = exports.getTableCell = exports.getTableNumCols = exports.getTableLength = exports.ColumnarTableBatchAggregator = exports.RowTableBatchAggregator = exports.TableBatchBuilder = void 0;
|
|
7
|
+
exports.AsyncQueue = exports.getArrowType = exports.getTypeInfo = exports.Struct = exports.FixedSizeList = exports.IntervalYearMonth = exports.IntervalDayTime = exports.Interval = exports.TimestampNanosecond = exports.TimestampMicrosecond = exports.TimestampMillisecond = exports.TimestampSecond = exports.Timestamp = exports.TimeSecond = void 0;
|
|
8
|
+
// TABLE CATEGORY UTILS
|
|
9
|
+
var table_batch_builder_1 = require("./lib/table/batches/table-batch-builder");
|
|
10
|
+
Object.defineProperty(exports, "TableBatchBuilder", { enumerable: true, get: function () { return table_batch_builder_1.TableBatchBuilder; } });
|
|
11
|
+
var row_table_batch_aggregator_1 = require("./lib/table/batches/row-table-batch-aggregator");
|
|
12
|
+
Object.defineProperty(exports, "RowTableBatchAggregator", { enumerable: true, get: function () { return row_table_batch_aggregator_1.RowTableBatchAggregator; } });
|
|
13
|
+
var columnar_table_batch_aggregator_1 = require("./lib/table/batches/columnar-table-batch-aggregator");
|
|
14
|
+
Object.defineProperty(exports, "ColumnarTableBatchAggregator", { enumerable: true, get: function () { return columnar_table_batch_aggregator_1.ColumnarTableBatchAggregator; } });
|
|
15
|
+
var table_accessors_1 = require("./lib/table/simple-table/table-accessors");
|
|
16
|
+
Object.defineProperty(exports, "getTableLength", { enumerable: true, get: function () { return table_accessors_1.getTableLength; } });
|
|
17
|
+
Object.defineProperty(exports, "getTableNumCols", { enumerable: true, get: function () { return table_accessors_1.getTableNumCols; } });
|
|
18
|
+
Object.defineProperty(exports, "getTableCell", { enumerable: true, get: function () { return table_accessors_1.getTableCell; } });
|
|
19
|
+
Object.defineProperty(exports, "getTableRowShape", { enumerable: true, get: function () { return table_accessors_1.getTableRowShape; } });
|
|
20
|
+
Object.defineProperty(exports, "getTableColumnIndex", { enumerable: true, get: function () { return table_accessors_1.getTableColumnIndex; } });
|
|
21
|
+
Object.defineProperty(exports, "getTableColumnName", { enumerable: true, get: function () { return table_accessors_1.getTableColumnName; } });
|
|
22
|
+
Object.defineProperty(exports, "getTableRowAsObject", { enumerable: true, get: function () { return table_accessors_1.getTableRowAsObject; } });
|
|
23
|
+
Object.defineProperty(exports, "getTableRowAsArray", { enumerable: true, get: function () { return table_accessors_1.getTableRowAsArray; } });
|
|
24
|
+
Object.defineProperty(exports, "makeRowIterator", { enumerable: true, get: function () { return table_accessors_1.makeRowIterator; } });
|
|
25
|
+
Object.defineProperty(exports, "makeArrayRowIterator", { enumerable: true, get: function () { return table_accessors_1.makeArrayRowIterator; } });
|
|
26
|
+
Object.defineProperty(exports, "makeObjectRowIterator", { enumerable: true, get: function () { return table_accessors_1.makeObjectRowIterator; } });
|
|
27
|
+
var arrow_like_table_1 = require("./lib/table/arrow-api/arrow-like-table");
|
|
28
|
+
Object.defineProperty(exports, "ArrowLikeTable", { enumerable: true, get: function () { return arrow_like_table_1.ArrowLikeTable; } });
|
|
29
|
+
var make_table_1 = require("./lib/table/simple-table/make-table");
|
|
30
|
+
Object.defineProperty(exports, "makeTableFromData", { enumerable: true, get: function () { return make_table_1.makeTableFromData; } });
|
|
31
|
+
var table_schema_1 = require("./lib/table/simple-table/table-schema");
|
|
32
|
+
Object.defineProperty(exports, "deduceTableSchema", { enumerable: true, get: function () { return table_schema_1.deduceTableSchema; } });
|
|
33
|
+
var row_utils_1 = require("./lib/table/simple-table/row-utils");
|
|
34
|
+
Object.defineProperty(exports, "convertToObjectRow", { enumerable: true, get: function () { return row_utils_1.convertToObjectRow; } });
|
|
35
|
+
Object.defineProperty(exports, "convertToArrayRow", { enumerable: true, get: function () { return row_utils_1.convertToArrayRow; } });
|
|
36
|
+
var data_type_1 = require("./lib/table/simple-table/data-type");
|
|
37
|
+
Object.defineProperty(exports, "getDataTypeFromArray", { enumerable: true, get: function () { return data_type_1.getDataTypeFromArray; } });
|
|
38
|
+
var mesh_utils_1 = require("./lib/mesh/mesh-utils");
|
|
39
|
+
Object.defineProperty(exports, "getMeshSize", { enumerable: true, get: function () { return mesh_utils_1.getMeshSize; } });
|
|
40
|
+
Object.defineProperty(exports, "getMeshBoundingBox", { enumerable: true, get: function () { return mesh_utils_1.getMeshBoundingBox; } });
|
|
41
|
+
// Commented out due to https://github.com/visgl/deck.gl/issues/6906 and https://github.com/visgl/loaders.gl/issues/2177
|
|
42
|
+
// export {convertMesh} from './category/mesh/convert-mesh.js';
|
|
43
|
+
var deduce_mesh_schema_1 = require("./lib/mesh/deduce-mesh-schema");
|
|
44
|
+
Object.defineProperty(exports, "deduceMeshSchema", { enumerable: true, get: function () { return deduce_mesh_schema_1.deduceMeshSchema; } });
|
|
45
|
+
Object.defineProperty(exports, "deduceMeshField", { enumerable: true, get: function () { return deduce_mesh_schema_1.deduceMeshField; } });
|
|
46
|
+
Object.defineProperty(exports, "makeMeshAttributeMetadata", { enumerable: true, get: function () { return deduce_mesh_schema_1.makeMeshAttributeMetadata; } });
|
|
47
|
+
// SCHEMA
|
|
48
|
+
var arrow_api_1 = require("./lib/table/arrow-api");
|
|
49
|
+
Object.defineProperty(exports, "ArrowLikeSchema", { enumerable: true, get: function () { return arrow_api_1.Schema; } });
|
|
50
|
+
Object.defineProperty(exports, "ArrowLikeField", { enumerable: true, get: function () { return arrow_api_1.Field; } });
|
|
51
|
+
Object.defineProperty(exports, "ArrowLikeDataType", { enumerable: true, get: function () { return arrow_api_1.DataType; } });
|
|
52
|
+
Object.defineProperty(exports, "Null", { enumerable: true, get: function () { return arrow_api_1.Null; } });
|
|
53
|
+
Object.defineProperty(exports, "Binary", { enumerable: true, get: function () { return arrow_api_1.Binary; } });
|
|
54
|
+
Object.defineProperty(exports, "Bool", { enumerable: true, get: function () { return arrow_api_1.Bool; } });
|
|
55
|
+
Object.defineProperty(exports, "Int", { enumerable: true, get: function () { return arrow_api_1.Int; } });
|
|
56
|
+
Object.defineProperty(exports, "Int8", { enumerable: true, get: function () { return arrow_api_1.Int8; } });
|
|
57
|
+
Object.defineProperty(exports, "Int16", { enumerable: true, get: function () { return arrow_api_1.Int16; } });
|
|
58
|
+
Object.defineProperty(exports, "Int32", { enumerable: true, get: function () { return arrow_api_1.Int32; } });
|
|
59
|
+
Object.defineProperty(exports, "Int64", { enumerable: true, get: function () { return arrow_api_1.Int64; } });
|
|
60
|
+
Object.defineProperty(exports, "Uint8", { enumerable: true, get: function () { return arrow_api_1.Uint8; } });
|
|
61
|
+
Object.defineProperty(exports, "Uint16", { enumerable: true, get: function () { return arrow_api_1.Uint16; } });
|
|
62
|
+
Object.defineProperty(exports, "Uint32", { enumerable: true, get: function () { return arrow_api_1.Uint32; } });
|
|
63
|
+
Object.defineProperty(exports, "Uint64", { enumerable: true, get: function () { return arrow_api_1.Uint64; } });
|
|
64
|
+
Object.defineProperty(exports, "Float", { enumerable: true, get: function () { return arrow_api_1.Float; } });
|
|
65
|
+
Object.defineProperty(exports, "Float16", { enumerable: true, get: function () { return arrow_api_1.Float16; } });
|
|
66
|
+
Object.defineProperty(exports, "Float32", { enumerable: true, get: function () { return arrow_api_1.Float32; } });
|
|
67
|
+
Object.defineProperty(exports, "Float64", { enumerable: true, get: function () { return arrow_api_1.Float64; } });
|
|
68
|
+
Object.defineProperty(exports, "Utf8", { enumerable: true, get: function () { return arrow_api_1.Utf8; } });
|
|
69
|
+
Object.defineProperty(exports, "Date", { enumerable: true, get: function () { return arrow_api_1.Date; } });
|
|
70
|
+
Object.defineProperty(exports, "DateDay", { enumerable: true, get: function () { return arrow_api_1.DateDay; } });
|
|
71
|
+
Object.defineProperty(exports, "DateMillisecond", { enumerable: true, get: function () { return arrow_api_1.DateMillisecond; } });
|
|
72
|
+
Object.defineProperty(exports, "Time", { enumerable: true, get: function () { return arrow_api_1.Time; } });
|
|
73
|
+
Object.defineProperty(exports, "TimeMillisecond", { enumerable: true, get: function () { return arrow_api_1.TimeMillisecond; } });
|
|
74
|
+
Object.defineProperty(exports, "TimeSecond", { enumerable: true, get: function () { return arrow_api_1.TimeSecond; } });
|
|
75
|
+
Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return arrow_api_1.Timestamp; } });
|
|
76
|
+
Object.defineProperty(exports, "TimestampSecond", { enumerable: true, get: function () { return arrow_api_1.TimestampSecond; } });
|
|
77
|
+
Object.defineProperty(exports, "TimestampMillisecond", { enumerable: true, get: function () { return arrow_api_1.TimestampMillisecond; } });
|
|
78
|
+
Object.defineProperty(exports, "TimestampMicrosecond", { enumerable: true, get: function () { return arrow_api_1.TimestampMicrosecond; } });
|
|
79
|
+
Object.defineProperty(exports, "TimestampNanosecond", { enumerable: true, get: function () { return arrow_api_1.TimestampNanosecond; } });
|
|
80
|
+
Object.defineProperty(exports, "Interval", { enumerable: true, get: function () { return arrow_api_1.Interval; } });
|
|
81
|
+
Object.defineProperty(exports, "IntervalDayTime", { enumerable: true, get: function () { return arrow_api_1.IntervalDayTime; } });
|
|
82
|
+
Object.defineProperty(exports, "IntervalYearMonth", { enumerable: true, get: function () { return arrow_api_1.IntervalYearMonth; } });
|
|
83
|
+
Object.defineProperty(exports, "FixedSizeList", { enumerable: true, get: function () { return arrow_api_1.FixedSizeList; } });
|
|
84
|
+
Object.defineProperty(exports, "Struct", { enumerable: true, get: function () { return arrow_api_1.Struct; } });
|
|
85
|
+
// EXPERIMENTAL APIs
|
|
86
|
+
// SCHEMA UTILS
|
|
87
|
+
var get_type_info_1 = require("./lib/table/arrow-api/get-type-info");
|
|
88
|
+
Object.defineProperty(exports, "getTypeInfo", { enumerable: true, get: function () { return get_type_info_1.getTypeInfo; } });
|
|
89
|
+
var arrow_type_utils_1 = require("./lib/table/arrow/arrow-type-utils");
|
|
90
|
+
Object.defineProperty(exports, "getArrowType", { enumerable: true, get: function () { return arrow_type_utils_1.getArrowType; } });
|
|
91
|
+
var async_queue_1 = require("./lib/utils/async-queue");
|
|
92
|
+
Object.defineProperty(exports, "AsyncQueue", { enumerable: true, get: function () { return __importDefault(async_queue_1).default; } });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Mesh } from '../../types/category-mesh';
|
|
2
|
+
import type { ColumnarTable, ArrowTable } from '../../types/category-table';
|
|
3
|
+
type TargetShape = 'mesh' | 'columnar-table' | 'arrow-table';
|
|
4
|
+
/**
|
|
5
|
+
* Convert a mesh to a specific shape
|
|
6
|
+
*/
|
|
7
|
+
export declare function convertMesh(mesh: Mesh, shape: TargetShape, options?: any): Mesh | ColumnarTable | ArrowTable;
|
|
8
|
+
/**
|
|
9
|
+
* Convert a loaders.gl Mesh to a Columnar Table
|
|
10
|
+
* @param mesh
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function convertMeshToColumnarTable(mesh: Mesh): ColumnarTable;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=convert-mesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-mesh.d.ts","sourceRoot":"","sources":["../../../src/lib/mesh/convert-mesh.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,EAAC,aAAa,EAAE,UAAU,EAAC,MAAM,4BAA4B,CAAC;AAG1E,KAAK,WAAW,GAAG,MAAM,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAE7D;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,GAAG,aAAa,GAAG,UAAU,CAcnC;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa,CAYpE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// loaders.gl, MIT license
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.convertMeshToColumnarTable = exports.convertMesh = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Convert a mesh to a specific shape
|
|
7
|
+
*/
|
|
8
|
+
function convertMesh(mesh, shape, options) {
|
|
9
|
+
switch (shape || 'mesh') {
|
|
10
|
+
case 'mesh':
|
|
11
|
+
return mesh;
|
|
12
|
+
case 'columnar-table':
|
|
13
|
+
return convertMeshToColumnarTable(mesh);
|
|
14
|
+
// case 'arrow-table':
|
|
15
|
+
// return {
|
|
16
|
+
// shape: 'arrow-table',
|
|
17
|
+
// data: convertMeshToArrowTable(mesh)
|
|
18
|
+
// };
|
|
19
|
+
default:
|
|
20
|
+
throw new Error(`Unsupported shape ${options?.shape}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.convertMesh = convertMesh;
|
|
24
|
+
/**
|
|
25
|
+
* Convert a loaders.gl Mesh to a Columnar Table
|
|
26
|
+
* @param mesh
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
function convertMeshToColumnarTable(mesh) {
|
|
30
|
+
const columns = {};
|
|
31
|
+
for (const [columnName, attribute] of Object.entries(mesh.attributes)) {
|
|
32
|
+
columns[columnName] = attribute.value;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
shape: 'columnar-table',
|
|
36
|
+
schema: mesh.schema,
|
|
37
|
+
data: columns
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.convertMeshToColumnarTable = convertMeshToColumnarTable;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MeshAttribute, MeshAttributes } from '../../types/category-mesh';
|
|
2
|
+
import { Schema, Field } from '../../types/schema';
|
|
3
|
+
/**
|
|
4
|
+
* Create a schema for mesh attributes data
|
|
5
|
+
* @param attributes
|
|
6
|
+
* @param metadata
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function deduceMeshSchema(attributes: MeshAttributes, metadata?: Record<string, string>): Schema;
|
|
10
|
+
/**
|
|
11
|
+
* Create arrow-like schema field for mesh attribute
|
|
12
|
+
* @param attributeName
|
|
13
|
+
* @param attribute
|
|
14
|
+
* @param optionalMetadata
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function deduceMeshField(name: string, attribute: MeshAttribute, optionalMetadata?: Record<string, string>): Field;
|
|
18
|
+
/**
|
|
19
|
+
* Make metadata by mesh attribute properties
|
|
20
|
+
* @param attribute
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare function makeMeshAttributeMetadata(attribute: MeshAttribute): Record<string, string>;
|
|
24
|
+
//# sourceMappingURL=deduce-mesh-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deduce-mesh-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/mesh/deduce-mesh-schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAC,MAAM,EAAE,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAGjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,cAAc,EAC1B,QAAQ,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACpC,MAAM,CAGR;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,EACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,KAAK,CASP;AAgBD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAY1F"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// loaders.gl, MIT license
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.makeMeshAttributeMetadata = exports.deduceMeshField = exports.deduceMeshSchema = void 0;
|
|
5
|
+
const data_type_1 = require("../table/simple-table/data-type");
|
|
6
|
+
/**
|
|
7
|
+
* Create a schema for mesh attributes data
|
|
8
|
+
* @param attributes
|
|
9
|
+
* @param metadata
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
function deduceMeshSchema(attributes, metadata = {}) {
|
|
13
|
+
const fields = deduceMeshFields(attributes);
|
|
14
|
+
return { fields, metadata };
|
|
15
|
+
}
|
|
16
|
+
exports.deduceMeshSchema = deduceMeshSchema;
|
|
17
|
+
/**
|
|
18
|
+
* Create arrow-like schema field for mesh attribute
|
|
19
|
+
* @param attributeName
|
|
20
|
+
* @param attribute
|
|
21
|
+
* @param optionalMetadata
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
function deduceMeshField(name, attribute, optionalMetadata) {
|
|
25
|
+
const type = (0, data_type_1.getDataTypeFromTypedArray)(attribute.value);
|
|
26
|
+
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
27
|
+
return {
|
|
28
|
+
name,
|
|
29
|
+
type: { type: 'fixed-size-list', listSize: attribute.size, children: [{ name: 'value', type }] },
|
|
30
|
+
nullable: false,
|
|
31
|
+
metadata
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.deduceMeshField = deduceMeshField;
|
|
35
|
+
/**
|
|
36
|
+
* Create fields array for mesh attributes
|
|
37
|
+
* @param attributes
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
function deduceMeshFields(attributes) {
|
|
41
|
+
const fields = [];
|
|
42
|
+
for (const attributeName in attributes) {
|
|
43
|
+
const attribute = attributes[attributeName];
|
|
44
|
+
fields.push(deduceMeshField(attributeName, attribute));
|
|
45
|
+
}
|
|
46
|
+
return fields;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Make metadata by mesh attribute properties
|
|
50
|
+
* @param attribute
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
function makeMeshAttributeMetadata(attribute) {
|
|
54
|
+
const result = {};
|
|
55
|
+
if ('byteOffset' in attribute) {
|
|
56
|
+
result.byteOffset = attribute.byteOffset.toString(10);
|
|
57
|
+
}
|
|
58
|
+
if ('byteStride' in attribute) {
|
|
59
|
+
result.byteStride = attribute.byteStride.toString(10);
|
|
60
|
+
}
|
|
61
|
+
if ('normalized' in attribute) {
|
|
62
|
+
result.normalized = attribute.normalized.toString();
|
|
63
|
+
}
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
exports.makeMeshAttributeMetadata = makeMeshAttributeMetadata;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=mesh-to-arrow-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-to-arrow-table.d.ts","sourceRoot":"","sources":["../../../src/lib/mesh/mesh-to-arrow-table.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Problem with arrow dependency...
|
|
3
|
+
import {
|
|
4
|
+
Table,
|
|
5
|
+
Schema,
|
|
6
|
+
RecordBatch,
|
|
7
|
+
FixedSizeList,
|
|
8
|
+
Field,
|
|
9
|
+
Data,
|
|
10
|
+
FixedSizeListVector
|
|
11
|
+
} from 'apache-arrow';
|
|
12
|
+
import {AbstractVector} from 'apache-arrow/vector';
|
|
13
|
+
import {getArrowType, getArrowVector} from '../table/arrow/arrow-type-utils.js';
|
|
14
|
+
import type {Mesh} from './mesh-types.js';
|
|
15
|
+
import {makeMeshAttributeMetadata} from './deduce-mesh-schema.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* * Convert a loaders.gl Mesh to an Apache Arrow Table
|
|
19
|
+
* @param mesh
|
|
20
|
+
* @param metadata
|
|
21
|
+
* @param batchSize
|
|
22
|
+
* @returns
|
|
23
|
+
*
|
|
24
|
+
export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
|
|
25
|
+
const vectors: AbstractVector[] = [];
|
|
26
|
+
const fields: Field[] = [];
|
|
27
|
+
for (const attributeKey in mesh.attributes) {
|
|
28
|
+
const attribute = mesh.attributes[attributeKey];
|
|
29
|
+
const {value, size = 1} = attribute;
|
|
30
|
+
const type = getArrowType(value);
|
|
31
|
+
const vector = getArrowVector(value);
|
|
32
|
+
const listType = new FixedSizeList(size, new Field('value', type));
|
|
33
|
+
const field = new Field(attributeKey, listType, false, makeMeshAttributeMetadata(attribute));
|
|
34
|
+
const data = new Data(listType, 0, value.length / size, 0, undefined, [vector]);
|
|
35
|
+
const listVector = new FixedSizeListVector(data);
|
|
36
|
+
vectors.push(listVector);
|
|
37
|
+
fields.push(field);
|
|
38
|
+
}
|
|
39
|
+
const schema = new Schema(fields, mesh?.schema?.metadata || new Map<string, string>());
|
|
40
|
+
const recordBatch = new RecordBatch(schema, vectors[0].length, vectors);
|
|
41
|
+
const table = new Table(schema, recordBatch);
|
|
42
|
+
return table;
|
|
43
|
+
}
|
|
44
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TypedArray } from '../../types/types';
|
|
2
|
+
import { MeshAttributes } from '../../types/category-mesh';
|
|
3
|
+
type TypedArrays = {
|
|
4
|
+
[key: string]: TypedArray;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Holds an axis aligned bounding box
|
|
8
|
+
* TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)
|
|
9
|
+
*/
|
|
10
|
+
type BoundingBox = [[number, number, number], [number, number, number]];
|
|
11
|
+
/**
|
|
12
|
+
* Get number of vertices in mesh
|
|
13
|
+
* @param attributes
|
|
14
|
+
*/
|
|
15
|
+
export declare function getMeshSize(attributes: TypedArrays): number;
|
|
16
|
+
/**
|
|
17
|
+
* Get the (axis aligned) bounding box of a mesh
|
|
18
|
+
* @param attributes
|
|
19
|
+
* @returns array of two vectors representing the axis aligned bounding box
|
|
20
|
+
*/
|
|
21
|
+
export declare function getMeshBoundingBox(attributes: MeshAttributes): BoundingBox;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=mesh-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mesh-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/mesh/mesh-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAEzD,KAAK,WAAW,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAAC,CAAC;AAE/C;;;GAGG;AACH,KAAK,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAExE;;;GAGG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,CAU3D;AAED;;;;GAIG;AAEH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,WAAW,CA4B1E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMeshBoundingBox = exports.getMeshSize = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Get number of vertices in mesh
|
|
6
|
+
* @param attributes
|
|
7
|
+
*/
|
|
8
|
+
function getMeshSize(attributes) {
|
|
9
|
+
let size = 0;
|
|
10
|
+
for (const attributeName in attributes) {
|
|
11
|
+
const attribute = attributes[attributeName];
|
|
12
|
+
if (ArrayBuffer.isView(attribute)) {
|
|
13
|
+
// @ts-ignore DataView doesn't have BYTES_PER_ELEMENT
|
|
14
|
+
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return size;
|
|
18
|
+
}
|
|
19
|
+
exports.getMeshSize = getMeshSize;
|
|
20
|
+
/**
|
|
21
|
+
* Get the (axis aligned) bounding box of a mesh
|
|
22
|
+
* @param attributes
|
|
23
|
+
* @returns array of two vectors representing the axis aligned bounding box
|
|
24
|
+
*/
|
|
25
|
+
// eslint-disable-next-line complexity
|
|
26
|
+
function getMeshBoundingBox(attributes) {
|
|
27
|
+
let minX = Infinity;
|
|
28
|
+
let minY = Infinity;
|
|
29
|
+
let minZ = Infinity;
|
|
30
|
+
let maxX = -Infinity;
|
|
31
|
+
let maxY = -Infinity;
|
|
32
|
+
let maxZ = -Infinity;
|
|
33
|
+
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
34
|
+
const len = positions && positions.length;
|
|
35
|
+
for (let i = 0; i < len; i += 3) {
|
|
36
|
+
const x = positions[i];
|
|
37
|
+
const y = positions[i + 1];
|
|
38
|
+
const z = positions[i + 2];
|
|
39
|
+
minX = x < minX ? x : minX;
|
|
40
|
+
minY = y < minY ? y : minY;
|
|
41
|
+
minZ = z < minZ ? z : minZ;
|
|
42
|
+
maxX = x > maxX ? x : maxX;
|
|
43
|
+
maxY = y > maxY ? y : maxY;
|
|
44
|
+
maxZ = z > maxZ ? z : maxZ;
|
|
45
|
+
}
|
|
46
|
+
return [
|
|
47
|
+
[minX, minY, minZ],
|
|
48
|
+
[maxX, maxY, maxZ]
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
exports.getMeshBoundingBox = getMeshBoundingBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-type-utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/table/arrow/arrow-type-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,QAAQ,EAiBT,MAAM,cAAc,CAAC;AAGtB,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,CAqBxD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// loaders.gl, MIT license
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getArrowType = void 0;
|
|
5
|
+
const apache_arrow_1 = require("apache-arrow");
|
|
6
|
+
// import {AbstractVector} from 'apache-arrow/vector';
|
|
7
|
+
function getArrowType(array) {
|
|
8
|
+
switch (array.constructor) {
|
|
9
|
+
case Int8Array:
|
|
10
|
+
return new apache_arrow_1.Int8();
|
|
11
|
+
case Uint8Array:
|
|
12
|
+
return new apache_arrow_1.Uint8();
|
|
13
|
+
case Int16Array:
|
|
14
|
+
return new apache_arrow_1.Int16();
|
|
15
|
+
case Uint16Array:
|
|
16
|
+
return new apache_arrow_1.Uint16();
|
|
17
|
+
case Int32Array:
|
|
18
|
+
return new apache_arrow_1.Int32();
|
|
19
|
+
case Uint32Array:
|
|
20
|
+
return new apache_arrow_1.Uint32();
|
|
21
|
+
case Float32Array:
|
|
22
|
+
return new apache_arrow_1.Float32();
|
|
23
|
+
case Float64Array:
|
|
24
|
+
return new apache_arrow_1.Float64();
|
|
25
|
+
default:
|
|
26
|
+
throw new Error('array type not supported');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.getArrowType = getArrowType;
|
|
30
|
+
/*
|
|
31
|
+
export function getArrowVector(array: TypedArray): AbstractVector {
|
|
32
|
+
switch (array.constructor) {
|
|
33
|
+
case Int8Array:
|
|
34
|
+
return Int8Vector.from(array);
|
|
35
|
+
case Uint8Array:
|
|
36
|
+
return Uint8Vector.from(array);
|
|
37
|
+
case Int16Array:
|
|
38
|
+
return Int16Vector.from(array);
|
|
39
|
+
case Uint16Array:
|
|
40
|
+
return Uint16Vector.from(array);
|
|
41
|
+
case Int32Array:
|
|
42
|
+
return Int32Vector.from(array);
|
|
43
|
+
case Uint32Array:
|
|
44
|
+
return Uint32Vector.from(array);
|
|
45
|
+
case Float32Array:
|
|
46
|
+
return Float32Vector.from(array);
|
|
47
|
+
case Float64Array:
|
|
48
|
+
return Float64Vector.from(array);
|
|
49
|
+
default:
|
|
50
|
+
throw new Error('array type not supported');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DataType, Field, Schema, SchemaMetadata } from '../../../types/schema';
|
|
2
|
+
import { Field as ArrowField, Schema as ArrowSchema, DataType as ArrowDataType } from 'apache-arrow/Arrow.dom';
|
|
3
|
+
export declare function serializeArrowSchema(arrowSchema: ArrowSchema): Schema;
|
|
4
|
+
export declare function deserializeArrowSchema(schema: Schema): ArrowSchema;
|
|
5
|
+
export declare function serializeArrowMetadata(arrowMetadata: Map<string, string>): SchemaMetadata;
|
|
6
|
+
export declare function deserializeArrowMetadata(metadata?: SchemaMetadata): Map<string, string>;
|
|
7
|
+
export declare function serializeArrowField(field: ArrowField): Field;
|
|
8
|
+
export declare function deserializeArrowField(field: Field): ArrowField;
|
|
9
|
+
/** Converts a serializable loaders.gl data type to hydrated arrow data type */
|
|
10
|
+
export declare function serializeArrowType(arrowType: ArrowDataType): DataType;
|
|
11
|
+
/** Converts a serializable loaders.gl data type to hydrated arrow data type */
|
|
12
|
+
export declare function deserializeArrowType(dataType: DataType): ArrowDataType;
|
|
13
|
+
//# sourceMappingURL=convert-schema-arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-schema-arrow.d.ts","sourceRoot":"","sources":["../../../../src/lib/table/arrow/convert-schema-arrow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACnF,OAAO,EACL,KAAK,IAAI,UAAU,EACnB,MAAM,IAAI,WAAW,EACrB,QAAQ,IAAI,aAAa,EAkC1B,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAKrE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAKlE;AAED,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,cAAc,CAEzF;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,CAAC,EAAE,cAAc,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEvF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAO5D;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAO9D;AAED,+EAA+E;AAE/E,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,aAAa,GAAG,QAAQ,CAqErE;AAED,+EAA+E;AAE/E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,aAAa,CA0EtE"}
|