@loaders.gl/schema 4.4.2 → 5.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,54 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+
5
+ import type * as arrow from 'apache-arrow';
6
+ import type {BinaryFeatureCollection, BinaryProperties} from './binary-features';
7
+ import type {BinaryGeometryType} from './binary-geometries';
8
+
9
+ /** One Arrow-backed binary feature family table. */
10
+ export type ArrowBinaryFeatureTable = {
11
+ /** Geometry family stored in this table. */
12
+ type: BinaryGeometryType;
13
+ /** Arrow table wrapper for the family. */
14
+ table: arrow.Table;
15
+ /** Original feature-level properties sidecar from the binary feature collection. */
16
+ properties: BinaryProperties['properties'];
17
+ /** Optional original feature fields sidecar. */
18
+ fields?: BinaryProperties['fields'];
19
+ };
20
+
21
+ /** Arrow-backed wrapper for binary point features. */
22
+ export type ArrowBinaryPointFeature = ArrowBinaryFeatureTable & {
23
+ type: 'Point';
24
+ };
25
+
26
+ /** Arrow-backed wrapper for binary line features. */
27
+ export type ArrowBinaryLineFeature = ArrowBinaryFeatureTable & {
28
+ type: 'LineString';
29
+ };
30
+
31
+ /** Arrow-backed wrapper for binary polygon features. */
32
+ export type ArrowBinaryPolygonFeature = ArrowBinaryFeatureTable & {
33
+ type: 'Polygon';
34
+ };
35
+
36
+ /**
37
+ * Arrow-backed wrapper for a binary feature collection.
38
+ *
39
+ * This mirrors the existing `BinaryFeatureCollection` family split while exposing the
40
+ * renderable arrays through Arrow nested list columns.
41
+ */
42
+ export type ArrowBinaryFeatureCollection = {
43
+ /** Discriminator for Arrow-backed binary feature collections. */
44
+ shape: 'arrow-binary-feature-collection';
45
+ /** Optional Arrow-backed point family table. */
46
+ points?: ArrowBinaryPointFeature;
47
+ /** Optional Arrow-backed line family table. */
48
+ lines?: ArrowBinaryLineFeature;
49
+ /** Optional Arrow-backed polygon family table. */
50
+ polygons?: ArrowBinaryPolygonFeature;
51
+ };
52
+
53
+ /** Supported binary feature collection wrapper shapes. */
54
+ export type BinaryFeatureCollectionLike = BinaryFeatureCollection | ArrowBinaryFeatureCollection;
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@ export type {
15
15
 
16
16
  // SCHEMAS AND DATA TYPES
17
17
 
18
- export type {Schema, Field, DataType, SchemaMetadata, FieldMetadata} from './types/schema';
18
+ export type {Schema, Field, DataType, KeyType, SchemaMetadata, FieldMetadata} from './types/schema';
19
19
  export type {Batch} from './types/batch';
20
20
 
21
21
  // TABLE CATEGORY TYPES
@@ -42,11 +42,16 @@ export type {
42
42
  export type {
43
43
  MeshTable,
44
44
  MeshArrowTable,
45
+ MeshArrowColumns,
46
+ IndexedMeshArrowColumns,
47
+ MeshArrowTableData,
48
+ IndexedMeshArrowTableData,
45
49
  Mesh,
46
50
  MeshGeometry,
47
51
  MeshAttribute,
48
52
  MeshAttributes
49
53
  } from './categories/category-mesh';
54
+ export {meshArrowSchema, indexedMeshArrowSchema} from './categories/category-mesh';
50
55
 
51
56
  // TEXTURES
52
57
  export type {
@@ -113,8 +118,16 @@ export type {
113
118
  BinaryLineFeature,
114
119
  BinaryPolygonFeature
115
120
  } from './categories/category-gis';
121
+ export type {
122
+ ArrowBinaryFeatureTable,
123
+ ArrowBinaryPointFeature,
124
+ ArrowBinaryLineFeature,
125
+ ArrowBinaryPolygonFeature,
126
+ ArrowBinaryFeatureCollection,
127
+ BinaryFeatureCollectionLike
128
+ } from './categories/category-gis';
116
129
 
117
- // DEPRECATED
130
+ // DEPRECATED EXPORTS
118
131
 
119
132
  // MESH CATEGORY
120
133