@loaders.gl/schema 4.0.0-alpha.5 → 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.js +2 -2
- package/dist/dist.min.js +11362 -13932
- 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 +27 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -13
- package/dist/{category → lib}/mesh/convert-mesh.d.ts +3 -3
- package/dist/lib/mesh/convert-mesh.d.ts.map +1 -0
- package/dist/lib/mesh/convert-mesh.js +40 -0
- package/dist/{category → lib}/mesh/deduce-mesh-schema.d.ts +5 -5
- 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/{category → lib}/mesh/mesh-utils.d.ts +4 -4
- 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/{schema/impl/field.d.ts → table/arrow-api/arrow-like-field.d.ts} +4 -4
- 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/{schema/impl/type.d.ts → table/arrow-api/arrow-like-type.d.ts} +7 -6
- 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.map +1 -0
- package/dist/lib/table/arrow-api/enum.js +97 -0
- package/dist/lib/{arrow → table/arrow-api}/get-type-info.d.ts +2 -3
- 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/{batches → table/batches}/base-table-batch-aggregator.d.ts +3 -3
- 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/{batches → table/batches}/columnar-table-batch-aggregator.d.ts +4 -4
- 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/{batches → table/batches}/row-table-batch-aggregator.d.ts +3 -3
- 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/{batches → table/batches}/table-batch-aggregator.d.ts +2 -2
- 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/{batches → table/batches}/table-batch-builder.d.ts +5 -5
- 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.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.js +11 -5
- package/dist/lib/utils/async-queue.js +82 -109
- package/dist/{category/gis.d.ts → types/category-gis.d.ts} +26 -26
- package/dist/types/category-gis.d.ts.map +1 -0
- package/dist/types/category-gis.js +2 -0
- package/dist/{category/image/image.d.ts → types/category-image.d.ts} +4 -4
- package/dist/types/category-image.d.ts.map +1 -0
- package/dist/types/category-image.js +2 -0
- package/dist/{category/mesh/mesh-types.d.ts → types/category-mesh.d.ts} +8 -10
- package/dist/types/category-mesh.d.ts.map +1 -0
- package/dist/types/category-mesh.js +3 -0
- package/dist/{category/table/table-types.d.ts → types/category-table.d.ts} +44 -34
- 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 +5 -6
- package/src/index.ts +65 -31
- 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/{category/gis.ts → types/category-gis.ts} +9 -2
- package/src/{category/mesh/mesh-types.ts → types/category-mesh.ts} +6 -4
- package/src/types/category-table.ts +104 -0
- package/src/{category/texture/texture.ts → types/category-texture.ts} +3 -1
- 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.d.ts +0 -19
- package/dist/category/common.d.ts.map +0 -1
- package/dist/category/common.js +0 -2
- package/dist/category/common.js.map +0 -1
- package/dist/category/gis.d.ts.map +0 -1
- package/dist/category/gis.js +0 -2
- package/dist/category/gis.js.map +0 -1
- package/dist/category/image/image.d.ts.map +0 -1
- package/dist/category/image/image.js +0 -2
- package/dist/category/image/image.js.map +0 -1
- package/dist/category/mesh/convert-mesh.d.ts.map +0 -1
- package/dist/category/mesh/convert-mesh.js.map +0 -1
- package/dist/category/mesh/deduce-mesh-schema.d.ts.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.d.ts +0 -11
- package/dist/category/mesh/mesh-to-arrow-table.d.ts.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.d.ts.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.d.ts.map +0 -1
- package/dist/category/mesh/mesh-utils.js.map +0 -1
- package/dist/category/table/deduce-table-schema.d.ts +0 -9
- package/dist/category/table/deduce-table-schema.d.ts.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.d.ts.map +0 -1
- package/dist/category/table/table-types.js +0 -2
- package/dist/category/table/table-types.js.map +0 -1
- package/dist/category/texture/texture.d.ts +0 -18
- package/dist/category/texture/texture.d.ts.map +0 -1
- package/dist/category/texture/texture.js +0 -2
- package/dist/category/texture/texture.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/arrow/arrow-like-type-utils.d.ts +0 -4
- package/dist/lib/arrow/arrow-like-type-utils.d.ts.map +0 -1
- package/dist/lib/arrow/arrow-like-type-utils.js.map +0 -1
- package/dist/lib/arrow/arrow-type-utils.d.ts +0 -6
- package/dist/lib/arrow/arrow-type-utils.d.ts.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.d.ts.map +0 -1
- package/dist/lib/arrow/get-type-info.js.map +0 -1
- package/dist/lib/batches/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/lib/batches/base-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/lib/batches/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/lib/batches/row-table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/table-batch-aggregator.d.ts.map +0 -1
- package/dist/lib/batches/table-batch-aggregator.js.map +0 -1
- package/dist/lib/batches/table-batch-builder.d.ts.map +0 -1
- package/dist/lib/batches/table-batch-builder.js.map +0 -1
- package/dist/lib/schema/impl/enum.d.ts.map +0 -1
- package/dist/lib/schema/impl/enum.js.map +0 -1
- package/dist/lib/schema/impl/field.d.ts.map +0 -1
- package/dist/lib/schema/impl/field.js.map +0 -1
- package/dist/lib/schema/impl/schema.d.ts +0 -16
- package/dist/lib/schema/impl/schema.d.ts.map +0 -1
- package/dist/lib/schema/impl/schema.js.map +0 -1
- package/dist/lib/schema/impl/type.d.ts.map +0 -1
- package/dist/lib/schema/impl/type.js.map +0 -1
- package/dist/lib/schema/schema.d.ts +0 -5
- package/dist/lib/schema/schema.d.ts.map +0 -1
- package/dist/lib/schema/schema.js +0 -5
- package/dist/lib/schema/schema.js.map +0 -1
- package/dist/lib/schema-utils/deduce-column-type.d.ts +0 -3
- package/dist/lib/schema-utils/deduce-column-type.d.ts.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.d.ts.map +0 -1
- package/dist/lib/utils/row-utils.js.map +0 -1
- package/dist/types.d.ts +0 -8
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/src/category/common.ts +0 -30
- 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 -35
- package/src/lib/schema/impl/schema.ts +0 -99
- package/src/lib/schema/schema.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/dist/lib/{schema/impl → table/arrow-api}/enum.d.ts +0 -0
- /package/dist/lib/{utils → table/simple-table}/row-utils.d.ts +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
- /package/src/{category/image/image.ts → types/category-image.ts} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ImageType } from './category-image';
|
|
2
|
+
/**
|
|
3
|
+
* These represent the main compressed texture formats
|
|
4
|
+
* Each format typically has a number of more specific subformats
|
|
5
|
+
*/
|
|
6
|
+
export type GPUTextureFormat = 'dxt' | 'dxt-srgb' | 'etc1' | 'etc2' | 'pvrtc' | 'atc' | 'astc' | 'rgtc';
|
|
7
|
+
/** One mip level */
|
|
8
|
+
export type TextureLevel = {
|
|
9
|
+
compressed: boolean;
|
|
10
|
+
format?: number;
|
|
11
|
+
data: Uint8Array;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
levelSize?: number;
|
|
15
|
+
hasAlpha?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type TextureOrImage = ImageType | (TextureLevel | ImageType);
|
|
18
|
+
//# sourceMappingURL=category-texture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category-texture.d.ts","sourceRoot":"","sources":["../../src/types/category-texture.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,GACL,MAAM,GACN,MAAM,CAAC;AAEX,oBAAoB;AACpB,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { RecordBatch } from 'apache-arrow';
|
|
2
|
+
/** For dictionary type */
|
|
3
|
+
export type KeyType = 'int8' | 'int16' | 'int32' | 'uint8' | 'uint16' | 'uint32';
|
|
4
|
+
/** ArrowLike DataType class */
|
|
5
|
+
export type DataType = 'null' | 'bool' | 'int' | 'int8' | 'int16' | 'int32' | 'int64' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'float' | 'float16' | 'float32' | 'float64' | 'binary' | 'utf8' | 'date-day' | 'date-millisecond' | 'time-second' | 'time-millisecond' | 'time-microsecond' | 'time-nanosecond' | 'timestamp-second' | 'timestamp-millisecond' | 'timestamp-microsecond' | 'timestamp-nanosecond' | 'interval-daytime' | 'interval-yearmonth' | {
|
|
6
|
+
type: 'list';
|
|
7
|
+
children: Field[];
|
|
8
|
+
} | {
|
|
9
|
+
type: 'struct';
|
|
10
|
+
children: Field[];
|
|
11
|
+
} | {
|
|
12
|
+
type: 'sparse-union';
|
|
13
|
+
typeIds: Int32Array;
|
|
14
|
+
children: Field[];
|
|
15
|
+
typeIdToChildIndex: {
|
|
16
|
+
[key: number]: number;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
type: 'dense-union';
|
|
20
|
+
typeIds: Int32Array;
|
|
21
|
+
children: Field[];
|
|
22
|
+
typeIdToChildIndex: {
|
|
23
|
+
[key: number]: number;
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
type: 'fixed-size-binary';
|
|
27
|
+
byteWidth: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'fixed-size-list';
|
|
30
|
+
listSize: number;
|
|
31
|
+
children: Field[];
|
|
32
|
+
} | {
|
|
33
|
+
type: 'map';
|
|
34
|
+
keysSorted: boolean;
|
|
35
|
+
children: Field[];
|
|
36
|
+
} | {
|
|
37
|
+
type: 'dictionary';
|
|
38
|
+
id: number;
|
|
39
|
+
indices: KeyType;
|
|
40
|
+
dictionary: DataType;
|
|
41
|
+
isOrdered: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* SchemaMetadata
|
|
45
|
+
*/
|
|
46
|
+
export type SchemaMetadata = Record<string, string>;
|
|
47
|
+
export type FieldMetadata = Record<string, string>;
|
|
48
|
+
export type Field = {
|
|
49
|
+
name: string;
|
|
50
|
+
type: DataType;
|
|
51
|
+
nullable?: boolean;
|
|
52
|
+
metadata?: FieldMetadata;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* `Schema` type that that can hold all data required by an Arrow Schema
|
|
56
|
+
* but is fully serializable. Helper functions make it easy to convert to and from arrow schemas
|
|
57
|
+
* https://loaders.gl/arrowjs/docs/api-reference/schema
|
|
58
|
+
*/
|
|
59
|
+
export type Schema = {
|
|
60
|
+
fields: Field[];
|
|
61
|
+
metadata: SchemaMetadata;
|
|
62
|
+
};
|
|
63
|
+
export type Batch = {
|
|
64
|
+
batchType: 'data' | 'metadata' | 'partial-result' | 'final-result';
|
|
65
|
+
batch?: number;
|
|
66
|
+
mimeType?: string;
|
|
67
|
+
shape: string;
|
|
68
|
+
data: any;
|
|
69
|
+
recordBatch?: RecordBatch;
|
|
70
|
+
length: number;
|
|
71
|
+
schema?: Schema;
|
|
72
|
+
bytesUsed?: number;
|
|
73
|
+
count?: number;
|
|
74
|
+
cursor?: number;
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Any typed array */
|
|
2
|
+
export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
|
|
3
|
+
export type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;
|
|
4
|
+
export type TypedArrayConstructor = Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
|
|
5
|
+
export type BigTypedArrayConstructor = TypedArrayConstructor | BigInt64ArrayConstructor | BigUint64ArrayConstructor;
|
|
6
|
+
/** Any numeric array: typed array or `number[]` */
|
|
7
|
+
export type NumberArray = number[] | TypedArray;
|
|
8
|
+
export type NumericArray = number[] | TypedArray;
|
|
9
|
+
export interface ArrayType<T = unknown> {
|
|
10
|
+
readonly length: number;
|
|
11
|
+
[n: number]: T;
|
|
12
|
+
}
|
|
13
|
+
/** Any array: typed array or js array (`any[]`) */
|
|
14
|
+
export type AnyArray = any[] | TypedArray;
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAC7B,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,GACtB,uBAAuB,GACvB,uBAAuB,CAAC;AAE5B,MAAM,MAAM,wBAAwB,GAChC,qBAAqB,GACrB,wBAAwB,GACxB,yBAAyB,CAAC;AAE9B,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC;AAEjD,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;CAChB;AAED,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG,GAAG,EAAE,GAAG,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/schema",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.6",
|
|
4
4
|
"description": "Table format APIs for JSON, CSV, etc...",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"PLY"
|
|
20
20
|
],
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
|
-
"main": "dist/index.js",
|
|
23
|
-
"module": "dist/index.js",
|
|
22
|
+
"main": "dist/es5/index.js",
|
|
23
|
+
"module": "dist/esm/index.js",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"src",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@types/geojson": "^7946.0.7"
|
|
36
|
-
"apache-arrow": "^4.0.0"
|
|
35
|
+
"@types/geojson": "^7946.0.7"
|
|
37
36
|
},
|
|
38
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "acc1985050dfaa0f1f0c066f8da5bce7454a046c"
|
|
39
38
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,31 +1,60 @@
|
|
|
1
1
|
// COMMON CATEGORY
|
|
2
|
-
export type {
|
|
2
|
+
export type {
|
|
3
|
+
TypedArray,
|
|
4
|
+
TypedArrayConstructor,
|
|
5
|
+
NumberArray,
|
|
6
|
+
ArrayType,
|
|
7
|
+
AnyArray
|
|
8
|
+
} from './types/types';
|
|
3
9
|
|
|
4
|
-
export type {Batch} from './
|
|
10
|
+
export type {Schema, Field, DataType, Batch, SchemaMetadata, FieldMetadata} from './types/schema';
|
|
5
11
|
|
|
6
12
|
// TABLE CATEGORY TYPES
|
|
7
13
|
export type {
|
|
8
14
|
Table,
|
|
15
|
+
RowTable,
|
|
9
16
|
ArrayRowTable,
|
|
10
17
|
ObjectRowTable,
|
|
18
|
+
GeoJSONRowTable,
|
|
11
19
|
ColumnarTable,
|
|
12
|
-
ArrowTable
|
|
13
|
-
|
|
20
|
+
ArrowTable,
|
|
21
|
+
Tables
|
|
22
|
+
} from './types/category-table';
|
|
14
23
|
export type {
|
|
15
24
|
TableBatch,
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
ArrayRowTableBatch,
|
|
26
|
+
ObjectRowTableBatch,
|
|
27
|
+
GeoJSONRowTableBatch,
|
|
18
28
|
ColumnarTableBatch,
|
|
19
29
|
ArrowTableBatch
|
|
20
|
-
} from './category
|
|
30
|
+
} from './types/category-table';
|
|
21
31
|
|
|
22
32
|
// TABLE CATEGORY UTILS
|
|
23
|
-
export {
|
|
24
|
-
export type {TableBatchAggregator} from './lib/batches/table-batch-aggregator';
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
33
|
+
export {TableBatchBuilder} from './lib/table/batches/table-batch-builder';
|
|
34
|
+
export type {TableBatchAggregator} from './lib/table/batches/table-batch-aggregator';
|
|
35
|
+
export {RowTableBatchAggregator} from './lib/table/batches/row-table-batch-aggregator';
|
|
36
|
+
export {ColumnarTableBatchAggregator} from './lib/table/batches/columnar-table-batch-aggregator';
|
|
27
37
|
|
|
28
|
-
export {
|
|
38
|
+
export {
|
|
39
|
+
getTableLength,
|
|
40
|
+
getTableNumCols,
|
|
41
|
+
getTableCell,
|
|
42
|
+
getTableRowShape,
|
|
43
|
+
getTableColumnIndex,
|
|
44
|
+
getTableColumnName,
|
|
45
|
+
getTableRowAsObject,
|
|
46
|
+
getTableRowAsArray,
|
|
47
|
+
makeRowIterator,
|
|
48
|
+
makeArrayRowIterator,
|
|
49
|
+
makeObjectRowIterator
|
|
50
|
+
} from './lib/table/simple-table/table-accessors';
|
|
51
|
+
|
|
52
|
+
export {ArrowLikeTable} from './lib/table/arrow-api/arrow-like-table';
|
|
53
|
+
|
|
54
|
+
export {makeTableFromData} from './lib/table/simple-table/make-table';
|
|
55
|
+
export {deduceTableSchema} from './lib/table/simple-table/table-schema';
|
|
56
|
+
export {convertToObjectRow, convertToArrayRow} from './lib/table/simple-table/row-utils';
|
|
57
|
+
export {getDataTypeFromArray} from './lib/table/simple-table/data-type';
|
|
29
58
|
|
|
30
59
|
// MESH CATEGORY
|
|
31
60
|
export type {
|
|
@@ -35,26 +64,32 @@ export type {
|
|
|
35
64
|
MeshGeometry,
|
|
36
65
|
MeshAttribute,
|
|
37
66
|
MeshAttributes
|
|
38
|
-
} from './category
|
|
67
|
+
} from './types/category-mesh';
|
|
39
68
|
|
|
40
|
-
export {getMeshSize, getMeshBoundingBox} from './
|
|
41
|
-
|
|
69
|
+
export {getMeshSize, getMeshBoundingBox} from './lib/mesh/mesh-utils';
|
|
70
|
+
// Commented out due to https://github.com/visgl/deck.gl/issues/6906 and https://github.com/visgl/loaders.gl/issues/2177
|
|
71
|
+
// export {convertMesh} from './category/mesh/convert-mesh';
|
|
42
72
|
export {
|
|
43
73
|
deduceMeshSchema,
|
|
44
74
|
deduceMeshField,
|
|
45
75
|
makeMeshAttributeMetadata
|
|
46
|
-
} from './
|
|
76
|
+
} from './lib/mesh/deduce-mesh-schema';
|
|
47
77
|
|
|
48
78
|
// TEXTURES
|
|
49
|
-
export type {TextureLevel, GPUTextureFormat} from './category
|
|
79
|
+
export type {TextureLevel, GPUTextureFormat} from './types/category-texture';
|
|
50
80
|
|
|
51
81
|
// IMAGES
|
|
52
|
-
export type {ImageDataType, ImageType, ImageTypeEnum} from './category
|
|
82
|
+
export type {ImageDataType, ImageType, ImageTypeEnum} from './types/category-image';
|
|
53
83
|
|
|
54
84
|
// TYPES
|
|
55
85
|
// GIS CATEGORY - GEOJSON
|
|
56
|
-
export type {GeoJSON, Feature, Geometry, Position, GeoJsonProperties} from './category/gis';
|
|
57
86
|
export type {
|
|
87
|
+
GeoJSON,
|
|
88
|
+
Feature,
|
|
89
|
+
FeatureCollection,
|
|
90
|
+
Geometry,
|
|
91
|
+
Position,
|
|
92
|
+
GeoJsonProperties,
|
|
58
93
|
Point,
|
|
59
94
|
MultiPoint,
|
|
60
95
|
LineString,
|
|
@@ -62,9 +97,9 @@ export type {
|
|
|
62
97
|
Polygon,
|
|
63
98
|
MultiPolygon,
|
|
64
99
|
GeometryCollection
|
|
65
|
-
} from './category
|
|
100
|
+
} from './types/category-gis';
|
|
66
101
|
|
|
67
|
-
export type {GeojsonGeometryInfo} from './category
|
|
102
|
+
export type {GeojsonGeometryInfo} from './types/category-gis';
|
|
68
103
|
|
|
69
104
|
// GIS CATEGORY - FLAT GEOJSON
|
|
70
105
|
export type {
|
|
@@ -75,7 +110,7 @@ export type {
|
|
|
75
110
|
FlatPoint,
|
|
76
111
|
FlatLineString,
|
|
77
112
|
FlatPolygon
|
|
78
|
-
} from './category
|
|
113
|
+
} from './types/category-gis';
|
|
79
114
|
|
|
80
115
|
// GIS CATEGORY - BINARY
|
|
81
116
|
export type {
|
|
@@ -85,19 +120,19 @@ export type {
|
|
|
85
120
|
BinaryLineGeometry,
|
|
86
121
|
BinaryPolygonGeometry,
|
|
87
122
|
BinaryAttribute
|
|
88
|
-
} from './category
|
|
123
|
+
} from './types/category-gis';
|
|
89
124
|
export type {
|
|
90
125
|
BinaryFeatures,
|
|
91
126
|
BinaryPointFeatures,
|
|
92
127
|
BinaryLineFeatures,
|
|
93
128
|
BinaryPolygonFeatures
|
|
94
|
-
} from './category
|
|
129
|
+
} from './types/category-gis';
|
|
95
130
|
|
|
96
131
|
// SCHEMA
|
|
97
132
|
export {
|
|
98
|
-
Schema,
|
|
99
|
-
Field,
|
|
100
|
-
DataType,
|
|
133
|
+
Schema as ArrowLikeSchema,
|
|
134
|
+
Field as ArrowLikeField,
|
|
135
|
+
DataType as ArrowLikeDataType,
|
|
101
136
|
Null,
|
|
102
137
|
Binary,
|
|
103
138
|
Bool,
|
|
@@ -131,13 +166,12 @@ export {
|
|
|
131
166
|
IntervalYearMonth,
|
|
132
167
|
FixedSizeList,
|
|
133
168
|
Struct
|
|
134
|
-
} from './lib/
|
|
169
|
+
} from './lib/table/arrow-api';
|
|
135
170
|
|
|
136
171
|
// EXPERIMENTAL APIs
|
|
137
172
|
|
|
138
173
|
// SCHEMA UTILS
|
|
139
|
-
export {
|
|
140
|
-
export {
|
|
141
|
-
export {getArrowTypeFromTypedArray} from './lib/arrow/arrow-like-type-utils';
|
|
174
|
+
export {getTypeInfo} from './lib/table/arrow-api/get-type-info';
|
|
175
|
+
export {getArrowType} from './lib/table/arrow/arrow-type-utils';
|
|
142
176
|
|
|
143
177
|
export {default as AsyncQueue} from './lib/utils/async-queue';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
// loaders.gl, MIT license
|
|
2
|
+
|
|
3
|
+
import type {Mesh} from '../../types/category-mesh';
|
|
4
|
+
import type {ColumnarTable, ArrowTable} from '../../types/category-table';
|
|
5
|
+
// import {convertMeshToArrowTable} from './mesh-to-arrow-table';
|
|
4
6
|
|
|
5
7
|
type TargetShape = 'mesh' | 'columnar-table' | 'arrow-table';
|
|
6
8
|
|
|
@@ -17,11 +19,11 @@ export function convertMesh(
|
|
|
17
19
|
return mesh;
|
|
18
20
|
case 'columnar-table':
|
|
19
21
|
return convertMeshToColumnarTable(mesh);
|
|
20
|
-
case 'arrow-table':
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
// case 'arrow-table':
|
|
23
|
+
// return {
|
|
24
|
+
// shape: 'arrow-table',
|
|
25
|
+
// data: convertMeshToArrowTable(mesh)
|
|
26
|
+
// };
|
|
25
27
|
default:
|
|
26
28
|
throw new Error(`Unsupported shape ${options?.shape}`);
|
|
27
29
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
// loaders.gl, MIT license
|
|
2
|
+
|
|
3
|
+
import {MeshAttribute, MeshAttributes} from '../../types/category-mesh';
|
|
4
|
+
import {Schema, Field} from '../../types/schema';
|
|
5
|
+
import {getDataTypeFromTypedArray} from '../table/simple-table/data-type';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Create a schema for mesh attributes data
|
|
@@ -10,10 +12,10 @@ import {getArrowTypeFromTypedArray} from '../../lib/arrow/arrow-like-type-utils'
|
|
|
10
12
|
*/
|
|
11
13
|
export function deduceMeshSchema(
|
|
12
14
|
attributes: MeshAttributes,
|
|
13
|
-
metadata
|
|
15
|
+
metadata: Record<string, string> = {}
|
|
14
16
|
): Schema {
|
|
15
17
|
const fields = deduceMeshFields(attributes);
|
|
16
|
-
return
|
|
18
|
+
return {fields, metadata};
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
/**
|
|
@@ -24,19 +26,18 @@ export function deduceMeshSchema(
|
|
|
24
26
|
* @returns
|
|
25
27
|
*/
|
|
26
28
|
export function deduceMeshField(
|
|
27
|
-
|
|
29
|
+
name: string,
|
|
28
30
|
attribute: MeshAttribute,
|
|
29
|
-
optionalMetadata?:
|
|
31
|
+
optionalMetadata?: Record<string, string>
|
|
30
32
|
): Field {
|
|
31
|
-
const type =
|
|
33
|
+
const type = getDataTypeFromTypedArray(attribute.value);
|
|
32
34
|
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
false,
|
|
35
|
+
return {
|
|
36
|
+
name,
|
|
37
|
+
type: {type: 'fixed-size-list', listSize: attribute.size, children: [{name: 'value', type}]},
|
|
38
|
+
nullable: false,
|
|
37
39
|
metadata
|
|
38
|
-
|
|
39
|
-
return field;
|
|
40
|
+
};
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
/**
|
|
@@ -58,16 +59,16 @@ function deduceMeshFields(attributes: MeshAttributes): Field[] {
|
|
|
58
59
|
* @param attribute
|
|
59
60
|
* @returns
|
|
60
61
|
*/
|
|
61
|
-
export function makeMeshAttributeMetadata(attribute: MeshAttribute):
|
|
62
|
-
const result =
|
|
62
|
+
export function makeMeshAttributeMetadata(attribute: MeshAttribute): Record<string, string> {
|
|
63
|
+
const result: Record<string, string> = {};
|
|
63
64
|
if ('byteOffset' in attribute) {
|
|
64
|
-
result.
|
|
65
|
+
result.byteOffset = attribute.byteOffset!.toString(10);
|
|
65
66
|
}
|
|
66
67
|
if ('byteStride' in attribute) {
|
|
67
|
-
result.
|
|
68
|
+
result.byteStride = attribute.byteStride!.toString(10);
|
|
68
69
|
}
|
|
69
70
|
if ('normalized' in attribute) {
|
|
70
|
-
result.
|
|
71
|
+
result.normalized = attribute.normalized!.toString();
|
|
71
72
|
}
|
|
72
73
|
return result;
|
|
73
74
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Problem with arrow dependency...
|
|
1
2
|
import {
|
|
2
3
|
Table,
|
|
3
4
|
Schema,
|
|
@@ -6,9 +7,9 @@ import {
|
|
|
6
7
|
Field,
|
|
7
8
|
Data,
|
|
8
9
|
FixedSizeListVector
|
|
9
|
-
} from 'apache-arrow
|
|
10
|
+
} from 'apache-arrow';
|
|
10
11
|
import {AbstractVector} from 'apache-arrow/vector';
|
|
11
|
-
import {getArrowType, getArrowVector} from '
|
|
12
|
+
import {getArrowType, getArrowVector} from '../table/arrow/arrow-type-utils';
|
|
12
13
|
import type {Mesh} from './mesh-types';
|
|
13
14
|
import {makeMeshAttributeMetadata} from './deduce-mesh-schema';
|
|
14
15
|
|
|
@@ -18,7 +19,7 @@ import {makeMeshAttributeMetadata} from './deduce-mesh-schema';
|
|
|
18
19
|
* @param metadata
|
|
19
20
|
* @param batchSize
|
|
20
21
|
* @returns
|
|
21
|
-
|
|
22
|
+
*
|
|
22
23
|
export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
|
|
23
24
|
const vectors: AbstractVector[] = [];
|
|
24
25
|
const fields: Field[] = [];
|
|
@@ -39,3 +40,4 @@ export function convertMeshToArrowTable(mesh: Mesh, batchSize?: number): Table {
|
|
|
39
40
|
const table = new Table(schema, recordBatch);
|
|
40
41
|
return table;
|
|
41
42
|
}
|
|
43
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Mesh category utilities
|
|
2
2
|
// TODO - move to mesh category module, or to math.gl/geometry module
|
|
3
|
-
import {TypedArray} from '../../types';
|
|
4
|
-
import {MeshAttributes} from '
|
|
3
|
+
import {TypedArray} from '../../types/types';
|
|
4
|
+
import {MeshAttributes} from '../../types/category-mesh';
|
|
5
5
|
|
|
6
6
|
type TypedArrays = {[key: string]: TypedArray};
|
|
7
7
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// loaders.gl, MIT license
|
|
2
|
+
|
|
3
|
+
import type {TypedArray} from '../../../types/types';
|
|
2
4
|
import {
|
|
3
5
|
DataType,
|
|
4
6
|
Float32,
|
|
@@ -8,17 +10,17 @@ import {
|
|
|
8
10
|
Int8,
|
|
9
11
|
Uint16,
|
|
10
12
|
Uint32,
|
|
11
|
-
Uint8
|
|
12
|
-
Int8Vector,
|
|
13
|
-
Uint8Vector,
|
|
14
|
-
Int16Vector,
|
|
15
|
-
Uint16Vector,
|
|
16
|
-
Int32Vector,
|
|
17
|
-
Uint32Vector,
|
|
18
|
-
Float32Vector,
|
|
19
|
-
Float64Vector
|
|
20
|
-
} from 'apache-arrow
|
|
21
|
-
import {AbstractVector} from 'apache-arrow/vector';
|
|
13
|
+
Uint8
|
|
14
|
+
// Int8Vector,
|
|
15
|
+
// Uint8Vector,
|
|
16
|
+
// Int16Vector,
|
|
17
|
+
// Uint16Vector,
|
|
18
|
+
// Int32Vector,
|
|
19
|
+
// Uint32Vector,
|
|
20
|
+
// Float32Vector,
|
|
21
|
+
// Float64Vector
|
|
22
|
+
} from 'apache-arrow';
|
|
23
|
+
// import {AbstractVector} from 'apache-arrow/vector';
|
|
22
24
|
|
|
23
25
|
export function getArrowType(array: TypedArray): DataType {
|
|
24
26
|
switch (array.constructor) {
|
|
@@ -43,6 +45,7 @@ export function getArrowType(array: TypedArray): DataType {
|
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
|
|
48
|
+
/*
|
|
46
49
|
export function getArrowVector(array: TypedArray): AbstractVector {
|
|
47
50
|
switch (array.constructor) {
|
|
48
51
|
case Int8Array:
|
|
@@ -65,3 +68,4 @@ export function getArrowVector(array: TypedArray): AbstractVector {
|
|
|
65
68
|
throw new Error('array type not supported');
|
|
66
69
|
}
|
|
67
70
|
}
|
|
71
|
+
*/
|