@loaders.gl/schema 4.4.3 → 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.
- package/dist/categories/category-gis.d.ts +1 -0
- package/dist/categories/category-gis.d.ts.map +1 -1
- package/dist/categories/category-image.d.ts +1 -1
- package/dist/categories/category-mesh.d.ts +25 -0
- package/dist/categories/category-mesh.d.ts.map +1 -1
- package/dist/categories/category-mesh.js +10 -1
- package/dist/categories/category-mesh.js.map +1 -1
- package/dist/dist.dev.js +583 -162
- package/dist/dist.min.js +4 -3
- package/dist/geometry/arrow-binary-features.d.ts +45 -0
- package/dist/geometry/arrow-binary-features.d.ts.map +1 -0
- package/dist/geometry/arrow-binary-features.js +5 -0
- package/dist/geometry/arrow-binary-features.js.map +1 -0
- package/dist/index.cjs +23 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/categories/category-gis.ts +8 -0
- package/src/categories/category-image.ts +1 -1
- package/src/categories/category-mesh.ts +44 -0
- package/src/geometry/arrow-binary-features.ts +54 -0
- package/src/index.ts +15 -2
|
@@ -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
|
|