@kepler.gl/types 3.1.4 → 3.1.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/index.d.ts CHANGED
@@ -9,3 +9,5 @@ export * from './types';
9
9
  export * from './components';
10
10
  export * from './effects';
11
11
  export * from './datasets';
12
+
13
+ export * as StacTypes from './stac';
package/layers.d.ts CHANGED
@@ -250,12 +250,25 @@ export type VisConfigBoolean = VisConfig & {
250
250
  defaultValue: boolean;
251
251
  };
252
252
 
253
+ export type VisConfigInput = VisConfig & {
254
+ type: 'input';
255
+ defaultValue: string | null;
256
+ };
257
+
253
258
  export type VisConfigSelection = VisConfig & {
254
259
  type: 'select';
255
260
  defaultValue: string;
256
261
  options: string[];
257
262
  };
258
263
 
264
+ export type VisConfigObjectSelection = VisConfig & {
265
+ type: 'object-select';
266
+ // the value is id of one of the options
267
+ defaultValue: string | null;
268
+ // an array of objects with ids
269
+ options: object[];
270
+ };
271
+
259
272
  export type VisConfigRange = VisConfig & {
260
273
  type: 'number';
261
274
  isRanged: boolean;
@@ -274,6 +287,16 @@ export type VisConfigColorRange = VisConfig & {
274
287
  defaultValue: ColorRange;
275
288
  };
276
289
 
290
+ export type LayerVisConfigTypes =
291
+ | VisConfigBoolean
292
+ | VisConfigNumber
293
+ | VisConfigRange
294
+ | VisConfigColorRange
295
+ | VisConfigColorSelect
296
+ | VisConfigInput
297
+ | VisConfigSelect
298
+ | VisConfigObjectSelection;
299
+
277
300
  export type LayerVisConfigSettings = {
278
301
  thickness: VisConfigNumber;
279
302
  strokeWidthRange: VisConfigRange;
@@ -318,6 +341,7 @@ export type LayerVisConfigSettings = {
318
341
  allowHover: VisConfigBoolean;
319
342
  showNeighborOnHover: VisConfigBoolean;
320
343
  showHighlightColor: VisConfigBoolean;
344
+ [key: string]: LayerVisConfigTypes;
321
345
  };
322
346
 
323
347
  // TODO: Move this to individual layers
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kepler.gl/types",
3
3
  "author": "Shan He <shan@uber.com>",
4
- "version": "3.1.4",
4
+ "version": "3.1.6",
5
5
  "description": "kepler.gl types used by kepler.gl components, actions and reducers",
6
6
  "license": "MIT",
7
7
  "types": "index.d.ts",
package/stac.d.ts ADDED
@@ -0,0 +1,830 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // Copyright contributors to the kepler.gl project
3
+
4
+ /**
5
+ * STAC EO Extension for STAC Items.
6
+ */
7
+ export type EOExtension =
8
+ | ({
9
+ type: 'Feature';
10
+ properties: Fields;
11
+ assets: {
12
+ [k: string]: Fields;
13
+ };
14
+ [k: string]: unknown;
15
+ } & StacExtensions)
16
+ | ({
17
+ type: 'Collection';
18
+ assets?: {
19
+ [k: string]: Fields;
20
+ };
21
+ item_assets?: {
22
+ [k: string]: Fields;
23
+ };
24
+ [k: string]: unknown;
25
+ } & StacExtensions);
26
+ export type CloudCover = number;
27
+ export type Bands = [Band, ...Band[]];
28
+ export type NameOfTheBand = string;
29
+ export type CommonNameOfTheBand =
30
+ | 'coastal'
31
+ | 'blue'
32
+ | 'green'
33
+ | 'red'
34
+ | 'rededge'
35
+ | 'yellow'
36
+ | 'pan'
37
+ | 'nir'
38
+ | 'nir08'
39
+ | 'nir09'
40
+ | 'cirrus'
41
+ | 'swir16'
42
+ | 'swir22'
43
+ | 'lwir'
44
+ | 'lwir11'
45
+ | 'lwir12';
46
+ export type CenterWavelength = number;
47
+ export type FullWidthHalfMaxFWHM = number;
48
+
49
+ export interface Fields {
50
+ 'eo:cloud_cover'?: CloudCover;
51
+ 'eo:bands'?: Bands;
52
+ /**
53
+ * This interface was referenced by `Fields`'s JSON-Schema definition
54
+ * via the `patternProperty` "^(?!eo:)".
55
+ */
56
+ [k: string]: unknown;
57
+ }
58
+ export interface Band {
59
+ name?: NameOfTheBand;
60
+ common_name?: CommonNameOfTheBand;
61
+ center_wavelength?: CenterWavelength;
62
+ full_width_half_max?: FullWidthHalfMaxFWHM;
63
+ [k: string]: unknown;
64
+ }
65
+ export interface StacExtensions {
66
+ stac_extensions: unknown[];
67
+ [k: string]: unknown;
68
+ }
69
+
70
+ export type STACItem = Core;
71
+ export type Core = GeoJSONFeature &
72
+ (
73
+ | {
74
+ geometry: GeoJSONGeometry;
75
+ bbox: {
76
+ [k: string]: unknown;
77
+ } & number[];
78
+ [k: string]: unknown;
79
+ }
80
+ | {
81
+ geometry: null;
82
+ bbox?: {
83
+ [k: string]: unknown;
84
+ };
85
+ [k: string]: unknown;
86
+ }
87
+ ) & {
88
+ stac_version: STACVersion;
89
+ stac_extensions?: STACExtensions;
90
+ id: ProviderID;
91
+ links: ItemLinks;
92
+ assets: AssetLinks;
93
+ properties: CommonMetadata &
94
+ (
95
+ | {
96
+ datetime: {
97
+ [k: string]: unknown;
98
+ };
99
+ [k: string]: unknown;
100
+ }
101
+ | {
102
+ [k: string]: unknown;
103
+ }
104
+ );
105
+ [k: string]: unknown;
106
+ };
107
+ export type GeoJSONGeometry =
108
+ | GeoJSONPoint2
109
+ | GeoJSONLineString2
110
+ | GeoJSONPolygon2
111
+ | GeoJSONMultiPoint2
112
+ | GeoJSONMultiLineString2
113
+ | GeoJSONMultiPolygon2;
114
+ export type STACVersion = '1.0.0';
115
+ export type ReferenceToAJSONSchema = string;
116
+ export type STACExtensions = ReferenceToAJSONSchema[];
117
+ /**
118
+ * Provider item ID
119
+ */
120
+ export type ProviderID = string;
121
+ export type LinkReference = string;
122
+ export type LinkRelationType = string;
123
+ export type LinkType = string;
124
+ export type LinkTitle = string;
125
+ /**
126
+ * Links to item relations
127
+ */
128
+ export type ItemLinks = Link[];
129
+ export type Asset = {
130
+ href: AssetReference;
131
+ title?: AssetTitle;
132
+ description?: AssetDescription;
133
+ type?: AssetType;
134
+ roles?: AssetRoles;
135
+ [k: string]: unknown;
136
+ } & CommonMetadata;
137
+ export type AssetReference = string;
138
+ export type AssetTitle = string;
139
+ export type AssetDescription = string;
140
+ export type AssetType = string;
141
+ export type AssetRoles = string[];
142
+ export type CommonMetadata = BasicDescriptiveFields &
143
+ DateAndTimeFields &
144
+ InstrumentFields &
145
+ LicensingFields &
146
+ ProviderFields;
147
+ /**
148
+ * A human-readable title describing the Item.
149
+ */
150
+ export type ItemTitle = string;
151
+ /**
152
+ * Detailed multi-line description to fully explain the Item.
153
+ */
154
+ export type ItemDescription = string;
155
+ /**
156
+ * The searchable date/time of the assets, in UTC (Formatted in RFC 3339)
157
+ */
158
+ export type DateAndTime = string | null;
159
+ /**
160
+ * The searchable start date/time of the assets, in UTC (Formatted in RFC 3339)
161
+ */
162
+ export type StartDateAndTime = string;
163
+ /**
164
+ * The searchable end date/time of the assets, in UTC (Formatted in RFC 3339)
165
+ */
166
+ export type EndDateAndTime = string;
167
+ export type CreationTime = string;
168
+ export type LastUpdateTime = string;
169
+ export type Platform = string;
170
+ export type Instruments = string[];
171
+ export type Constellation = string;
172
+ export type Mission = string;
173
+ export type GroundSampleDistance = number;
174
+ export type OrganizationName = string;
175
+ export type OrganizationDescription = string;
176
+ export type OrganizationRoles = ('producer' | 'licensor' | 'processor' | 'host')[];
177
+ export type OrganizationHomepage = string;
178
+ export type Providers = {
179
+ name: OrganizationName;
180
+ description?: OrganizationDescription;
181
+ roles?: OrganizationRoles;
182
+ url?: OrganizationHomepage;
183
+ [k: string]: unknown;
184
+ }[];
185
+
186
+ export interface GeoJSONFeature {
187
+ type: 'Feature';
188
+ id?: number | string;
189
+ properties: null | {
190
+ [k: string]: unknown;
191
+ };
192
+ geometry:
193
+ | null
194
+ | GeoJSONPoint
195
+ | GeoJSONLineString
196
+ | GeoJSONPolygon
197
+ | GeoJSONMultiPoint
198
+ | GeoJSONMultiLineString
199
+ | GeoJSONMultiPolygon
200
+ | GeoJSONGeometryCollection;
201
+ bbox?: [number, number, number, number, ...number[]];
202
+ [k: string]: unknown;
203
+ }
204
+ export interface GeoJSONPoint {
205
+ type: 'Point';
206
+ coordinates: [number, number, ...number[]];
207
+ bbox?: [number, number, number, number, ...number[]];
208
+ [k: string]: unknown;
209
+ }
210
+ export interface GeoJSONLineString {
211
+ type: 'LineString';
212
+ coordinates: [
213
+ [number, number, ...number[]],
214
+ [number, number, ...number[]],
215
+ ...[number, number, ...number[]][]
216
+ ];
217
+ bbox?: [number, number, number, number, ...number[]];
218
+ [k: string]: unknown;
219
+ }
220
+ export interface GeoJSONPolygon {
221
+ type: 'Polygon';
222
+ coordinates: [
223
+ [number, number, ...number[]],
224
+ [number, number, ...number[]],
225
+ [number, number, ...number[]],
226
+ [number, number, ...number[]],
227
+ ...[number, number, ...number[]][]
228
+ ][];
229
+ bbox?: [number, number, number, number, ...number[]];
230
+ [k: string]: unknown;
231
+ }
232
+ export interface GeoJSONMultiPoint {
233
+ type: 'MultiPoint';
234
+ coordinates: [number, number, ...number[]][];
235
+ bbox?: [number, number, number, number, ...number[]];
236
+ [k: string]: unknown;
237
+ }
238
+ export interface GeoJSONMultiLineString {
239
+ type: 'MultiLineString';
240
+ coordinates: [
241
+ [number, number, ...number[]],
242
+ [number, number, ...number[]],
243
+ ...[number, number, ...number[]][]
244
+ ][];
245
+ bbox?: [number, number, number, number, ...number[]];
246
+ [k: string]: unknown;
247
+ }
248
+ export interface GeoJSONMultiPolygon {
249
+ type: 'MultiPolygon';
250
+ coordinates: [
251
+ [number, number, ...number[]],
252
+ [number, number, ...number[]],
253
+ [number, number, ...number[]],
254
+ [number, number, ...number[]],
255
+ ...[number, number, ...number[]][]
256
+ ][][];
257
+ bbox?: [number, number, number, number, ...number[]];
258
+ [k: string]: unknown;
259
+ }
260
+ export interface GeoJSONGeometryCollection {
261
+ type: 'GeometryCollection';
262
+ geometries: (
263
+ | GeoJSONPoint1
264
+ | GeoJSONLineString1
265
+ | GeoJSONPolygon1
266
+ | GeoJSONMultiPoint1
267
+ | GeoJSONMultiLineString1
268
+ | GeoJSONMultiPolygon1
269
+ )[];
270
+ bbox?: [number, number, number, number, ...number[]];
271
+ [k: string]: unknown;
272
+ }
273
+ export interface GeoJSONPoint1 {
274
+ type: 'Point';
275
+ coordinates: [number, number, ...number[]];
276
+ bbox?: [number, number, number, number, ...number[]];
277
+ [k: string]: unknown;
278
+ }
279
+ export interface GeoJSONLineString1 {
280
+ type: 'LineString';
281
+ coordinates: [
282
+ [number, number, ...number[]],
283
+ [number, number, ...number[]],
284
+ ...[number, number, ...number[]][]
285
+ ];
286
+ bbox?: [number, number, number, number, ...number[]];
287
+ [k: string]: unknown;
288
+ }
289
+ export interface GeoJSONPolygon1 {
290
+ type: 'Polygon';
291
+ coordinates: [
292
+ [number, number, ...number[]],
293
+ [number, number, ...number[]],
294
+ [number, number, ...number[]],
295
+ [number, number, ...number[]],
296
+ ...[number, number, ...number[]][]
297
+ ][];
298
+ bbox?: [number, number, number, number, ...number[]];
299
+ [k: string]: unknown;
300
+ }
301
+ export interface GeoJSONMultiPoint1 {
302
+ type: 'MultiPoint';
303
+ coordinates: [number, number, ...number[]][];
304
+ bbox?: [number, number, number, number, ...number[]];
305
+ [k: string]: unknown;
306
+ }
307
+ export interface GeoJSONMultiLineString1 {
308
+ type: 'MultiLineString';
309
+ coordinates: [
310
+ [number, number, ...number[]],
311
+ [number, number, ...number[]],
312
+ ...[number, number, ...number[]][]
313
+ ][];
314
+ bbox?: [number, number, number, number, ...number[]];
315
+ [k: string]: unknown;
316
+ }
317
+ export interface GeoJSONMultiPolygon1 {
318
+ type: 'MultiPolygon';
319
+ coordinates: [
320
+ [number, number, ...number[]],
321
+ [number, number, ...number[]],
322
+ [number, number, ...number[]],
323
+ [number, number, ...number[]],
324
+ ...[number, number, ...number[]][]
325
+ ][][];
326
+ bbox?: [number, number, number, number, ...number[]];
327
+ [k: string]: unknown;
328
+ }
329
+ export interface GeoJSONPoint2 {
330
+ type: 'Point';
331
+ coordinates: [number, number, ...number[]];
332
+ bbox?: [number, number, number, number, ...number[]];
333
+ [k: string]: unknown;
334
+ }
335
+ export interface GeoJSONLineString2 {
336
+ type: 'LineString';
337
+ coordinates: [
338
+ [number, number, ...number[]],
339
+ [number, number, ...number[]],
340
+ ...[number, number, ...number[]][]
341
+ ];
342
+ bbox?: [number, number, number, number, ...number[]];
343
+ [k: string]: unknown;
344
+ }
345
+ export interface GeoJSONPolygon2 {
346
+ type: 'Polygon';
347
+ coordinates: [
348
+ [number, number, ...number[]],
349
+ [number, number, ...number[]],
350
+ [number, number, ...number[]],
351
+ [number, number, ...number[]],
352
+ ...[number, number, ...number[]][]
353
+ ][];
354
+ bbox?: [number, number, number, number, ...number[]];
355
+ [k: string]: unknown;
356
+ }
357
+ export interface GeoJSONMultiPoint2 {
358
+ type: 'MultiPoint';
359
+ coordinates: [number, number, ...number[]][];
360
+ bbox?: [number, number, number, number, ...number[]];
361
+ [k: string]: unknown;
362
+ }
363
+ export interface GeoJSONMultiLineString2 {
364
+ type: 'MultiLineString';
365
+ coordinates: [
366
+ [number, number, ...number[]],
367
+ [number, number, ...number[]],
368
+ ...[number, number, ...number[]][]
369
+ ][];
370
+ bbox?: [number, number, number, number, ...number[]];
371
+ [k: string]: unknown;
372
+ }
373
+ export interface GeoJSONMultiPolygon2 {
374
+ type: 'MultiPolygon';
375
+ coordinates: [
376
+ [number, number, ...number[]],
377
+ [number, number, ...number[]],
378
+ [number, number, ...number[]],
379
+ [number, number, ...number[]],
380
+ ...[number, number, ...number[]][]
381
+ ][][];
382
+ bbox?: [number, number, number, number, ...number[]];
383
+ [k: string]: unknown;
384
+ }
385
+ export interface Link {
386
+ href: LinkReference;
387
+ rel: LinkRelationType;
388
+ type?: LinkType;
389
+ title?: LinkTitle;
390
+ [k: string]: unknown;
391
+ }
392
+ /**
393
+ * Links to assets
394
+ */
395
+ export interface AssetLinks {
396
+ [k: string]: Asset;
397
+ }
398
+ export interface BasicDescriptiveFields {
399
+ title?: ItemTitle;
400
+ description?: ItemDescription;
401
+ [k: string]: unknown;
402
+ }
403
+ export interface DateAndTimeFields {
404
+ datetime?: DateAndTime;
405
+ start_datetime?: StartDateAndTime;
406
+ end_datetime?: EndDateAndTime;
407
+ created?: CreationTime;
408
+ updated?: LastUpdateTime;
409
+ [k: string]: unknown;
410
+ }
411
+ export interface InstrumentFields {
412
+ platform?: Platform;
413
+ instruments?: Instruments;
414
+ constellation?: Constellation;
415
+ mission?: Mission;
416
+ gsd?: GroundSampleDistance;
417
+ [k: string]: unknown;
418
+ }
419
+ export interface LicensingFields {
420
+ license?: string;
421
+ [k: string]: unknown;
422
+ }
423
+ export interface ProviderFields {
424
+ providers?: Providers;
425
+ [k: string]: unknown;
426
+ }
427
+
428
+ /**
429
+ * This object represents Collections in a SpatioTemporal Asset Catalog.
430
+ */
431
+ export type STACCollectionSpecification = STACCollection;
432
+ export type STACVersion = '1.0.0';
433
+ export type ReferenceToAJSONSchema = string;
434
+ export type STACExtensions = ReferenceToAJSONSchema[];
435
+ export type TypeOfSTACEntity = 'Collection';
436
+ export type Identifier = string;
437
+ export type Title = string;
438
+ export type Description = string;
439
+ export type Keywords = string[];
440
+ export type CollectionLicenseName = string;
441
+ export type OrganizationName = string;
442
+ export type OrganizationDescription = string;
443
+ export type OrganizationRoles = ('producer' | 'licensor' | 'processor' | 'host')[];
444
+ export type OrganizationHomepage = string;
445
+ export type SpatialExtents = [SpatialExtent, ...SpatialExtent3[]];
446
+ export type SpatialExtent = SpatialExtent1 & SpatialExtent2;
447
+ export type SpatialExtent1 =
448
+ | {
449
+ [k: string]: unknown;
450
+ }
451
+ | {
452
+ [k: string]: unknown;
453
+ };
454
+ export type SpatialExtent2 = number[];
455
+ export type SpatialExtent3 = SpatialExtent1 & SpatialExtent2;
456
+ export type TemporalExtents = [TemporalExtent, ...TemporalExtent[]];
457
+ export type TemporalExtent = [string | null, string | null];
458
+ export type AssetReference = string;
459
+ export type AssetTitle = string;
460
+ export type AssetDescription = string;
461
+ export type AssetType = string;
462
+ export type AssetRoles = string[];
463
+ /**
464
+ * A human-readable title describing the Item.
465
+ */
466
+ export type ItemTitle = string;
467
+ /**
468
+ * Detailed multi-line description to fully explain the Item.
469
+ */
470
+ export type ItemDescription = string;
471
+ /**
472
+ * The searchable date/time of the assets, in UTC (Formatted in RFC 3339)
473
+ */
474
+ export type DateAndTime = string | null;
475
+ /**
476
+ * The searchable start date/time of the assets, in UTC (Formatted in RFC 3339)
477
+ */
478
+ export type StartDateAndTime = string;
479
+ /**
480
+ * The searchable end date/time of the assets, in UTC (Formatted in RFC 3339)
481
+ */
482
+ export type EndDateAndTime = string;
483
+ export type CreationTime = string;
484
+ export type LastUpdateTime = string;
485
+ export type Platform = string;
486
+ export type Instruments = string[];
487
+ export type Constellation = string;
488
+ export type Mission = string;
489
+ export type GroundSampleDistance = number;
490
+ export type OrganizationName1 = string;
491
+ export type OrganizationDescription1 = string;
492
+ export type OrganizationRoles1 = ('producer' | 'licensor' | 'processor' | 'host')[];
493
+ export type OrganizationHomepage1 = string;
494
+ export type Providers = {
495
+ name: OrganizationName1;
496
+ description?: OrganizationDescription1;
497
+ roles?: OrganizationRoles1;
498
+ url?: OrganizationHomepage1;
499
+ [k: string]: unknown;
500
+ }[];
501
+ export type LinkReference = string;
502
+ export type LinkRelationType = string;
503
+ export type LinkType = string;
504
+ export type LinkTitle = string;
505
+ export type Links = Link[];
506
+ export type JSONSchema = CoreSchemaMetaSchema;
507
+ export type CoreSchemaMetaSchema =
508
+ | {
509
+ $id?: string;
510
+ $schema?: string;
511
+ $ref?: string;
512
+ $comment?: string;
513
+ title?: string;
514
+ description?: string;
515
+ default?: true;
516
+ readOnly?: boolean;
517
+ writeOnly?: boolean;
518
+ examples?: true[];
519
+ multipleOf?: number;
520
+ maximum?: number;
521
+ exclusiveMaximum?: number;
522
+ minimum?: number;
523
+ exclusiveMinimum?: number;
524
+ maxLength?: number;
525
+ minLength?: number;
526
+ pattern?: string;
527
+ additionalItems?: CoreSchemaMetaSchema;
528
+ items?: CoreSchemaMetaSchema | [CoreSchemaMetaSchema, ...CoreSchemaMetaSchema[]];
529
+ maxItems?: number;
530
+ minItems?: number;
531
+ uniqueItems?: boolean;
532
+ contains?: CoreSchemaMetaSchema;
533
+ maxProperties?: number;
534
+ minProperties?: number;
535
+ required?: string[];
536
+ additionalProperties?: CoreSchemaMetaSchema;
537
+ definitions?: {
538
+ [k: string]: CoreSchemaMetaSchema;
539
+ };
540
+ properties?: {
541
+ [k: string]: CoreSchemaMetaSchema;
542
+ };
543
+ patternProperties?: {
544
+ [k: string]: CoreSchemaMetaSchema;
545
+ };
546
+ dependencies?: {
547
+ [k: string]: CoreSchemaMetaSchema | string[];
548
+ };
549
+ propertyNames?: CoreSchemaMetaSchema;
550
+ const?: true;
551
+ enum?: [true, ...unknown[]];
552
+ type?:
553
+ | ('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string')
554
+ | [
555
+ 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string',
556
+ ...('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string')[]
557
+ ];
558
+ format?: string;
559
+ contentMediaType?: string;
560
+ contentEncoding?: string;
561
+ if?: CoreSchemaMetaSchema;
562
+ then?: CoreSchemaMetaSchema;
563
+ else?: CoreSchemaMetaSchema;
564
+ allOf?: [CoreSchemaMetaSchema, ...CoreSchemaMetaSchema[]];
565
+ anyOf?: [CoreSchemaMetaSchema, ...CoreSchemaMetaSchema[]];
566
+ oneOf?: [CoreSchemaMetaSchema, ...CoreSchemaMetaSchema[]];
567
+ not?: CoreSchemaMetaSchema;
568
+ [k: string]: unknown;
569
+ }
570
+ | boolean;
571
+ export type MinimumValue = number | string;
572
+ export type MaximumValue = number | string;
573
+ export type SetOfValues = [
574
+ {
575
+ [k: string]: unknown;
576
+ },
577
+ ...{
578
+ [k: string]: unknown;
579
+ }[]
580
+ ];
581
+
582
+ /**
583
+ * These are the fields specific to a STAC Collection. All other fields are inherited from STAC Catalog.
584
+ */
585
+ export interface STACCollection {
586
+ stac_version: STACVersion;
587
+ stac_extensions?: STACExtensions;
588
+ type: TypeOfSTACEntity;
589
+ id: Identifier;
590
+ title?: Title;
591
+ description: Description;
592
+ keywords?: Keywords;
593
+ license: CollectionLicenseName;
594
+ providers?: {
595
+ name: OrganizationName;
596
+ description?: OrganizationDescription;
597
+ roles?: OrganizationRoles;
598
+ url?: OrganizationHomepage;
599
+ [k: string]: unknown;
600
+ }[];
601
+ extent: Extents;
602
+ assets?: AssetLinks;
603
+ links: Links;
604
+ summaries?: Summaries;
605
+ [k: string]: unknown;
606
+ }
607
+ export interface Extents {
608
+ spatial: SpatialExtentObject;
609
+ temporal: TemporalExtentObject;
610
+ [k: string]: unknown;
611
+ }
612
+ export interface SpatialExtentObject {
613
+ bbox: SpatialExtents;
614
+ [k: string]: unknown;
615
+ }
616
+ export interface TemporalExtentObject {
617
+ interval: TemporalExtents;
618
+ [k: string]: unknown;
619
+ }
620
+ /**
621
+ * Links to assets
622
+ */
623
+ export interface AssetLinks {
624
+ [k: string]: {
625
+ href: AssetReference;
626
+ title?: AssetTitle;
627
+ description?: AssetDescription;
628
+ type?: AssetType;
629
+ roles?: AssetRoles;
630
+ [k: string]: unknown;
631
+ } & (BasicDescriptiveFields &
632
+ DateAndTimeFields &
633
+ InstrumentFields &
634
+ LicensingFields &
635
+ ProviderFields);
636
+ }
637
+ export interface BasicDescriptiveFields {
638
+ title?: ItemTitle;
639
+ description?: ItemDescription;
640
+ [k: string]: unknown;
641
+ }
642
+ export interface DateAndTimeFields {
643
+ datetime?: DateAndTime;
644
+ start_datetime?: StartDateAndTime;
645
+ end_datetime?: EndDateAndTime;
646
+ created?: CreationTime;
647
+ updated?: LastUpdateTime;
648
+ [k: string]: unknown;
649
+ }
650
+ export interface InstrumentFields {
651
+ platform?: Platform;
652
+ instruments?: Instruments;
653
+ constellation?: Constellation;
654
+ mission?: Mission;
655
+ gsd?: GroundSampleDistance;
656
+ [k: string]: unknown;
657
+ }
658
+ export interface LicensingFields {
659
+ license?: string;
660
+ [k: string]: unknown;
661
+ }
662
+ export interface ProviderFields {
663
+ providers?: Providers;
664
+ [k: string]: unknown;
665
+ }
666
+ export interface Link {
667
+ href: LinkReference;
668
+ rel: LinkRelationType;
669
+ type?: LinkType;
670
+ title?: LinkTitle;
671
+ [k: string]: unknown;
672
+ }
673
+ export interface Summaries {
674
+ [k: string]: JSONSchema | Range | SetOfValues;
675
+ }
676
+ export interface Range {
677
+ minimum: MinimumValue;
678
+ maximum: MaximumValue;
679
+ [k: string]: unknown;
680
+ }
681
+
682
+ export type AssetTitle = string;
683
+ export type AssetDescription = string;
684
+ export type AssetType = string;
685
+ export type AssetRoles = string[];
686
+
687
+ /**
688
+ * STAC Item Assets Definition Extension for STAC Collections.
689
+ */
690
+ export interface ItemAssetsDefinitionExtension {
691
+ stac_extensions: unknown[];
692
+ type: 'Collection';
693
+ item_assets: {
694
+ [k: string]: {
695
+ href?: DisallowHref;
696
+ title?: AssetTitle;
697
+ description?: AssetDescription;
698
+ type?: AssetType;
699
+ roles?: AssetRoles;
700
+ [k: string]: unknown;
701
+ };
702
+ };
703
+ [k: string]: unknown;
704
+ }
705
+ export interface DisallowHref {
706
+ [k: string]: unknown;
707
+ }
708
+
709
+ /**
710
+ * STAC Raster Extension for STAC Items.
711
+ */
712
+ export type RasterExtension =
713
+ | ({
714
+ type: 'Feature';
715
+ assets: {
716
+ [k: string]: Assetfields;
717
+ };
718
+ [k: string]: unknown;
719
+ } & StacExtensions)
720
+ | {
721
+ type: 'Collection';
722
+ assets?: {
723
+ [k: string]: Assetfields;
724
+ };
725
+ item_assets?: {
726
+ [k: string]: Assetfields;
727
+ };
728
+ [k: string]: unknown;
729
+ };
730
+ export type Bands = [Band, ...Band[]];
731
+ export type DataTypeOfTheBand =
732
+ | 'int8'
733
+ | 'int16'
734
+ | 'int32'
735
+ | 'int64'
736
+ | 'uint8'
737
+ | 'uint16'
738
+ | 'uint32'
739
+ | 'uint64'
740
+ | 'float16'
741
+ | 'float32'
742
+ | 'float64'
743
+ | 'cint16'
744
+ | 'cint32'
745
+ | 'cfloat32'
746
+ | 'cfloat64'
747
+ | 'other';
748
+ export type UnitDenominationOfThePixelValue = string;
749
+ export type TheActualNumberOfBitsUsedForThisBand = number;
750
+ export type PixelSamplingInTheBand = 'area' | 'point';
751
+ export type NoDataPixelValue = number | ('nan' | 'inf' | '-inf');
752
+ export type MultiplicatorFactorOfThePixelValueToTransformIntoTheValue = number;
753
+ export type NumberToBeAddedToThePixelValueToTransformIntoTheValue = number;
754
+ export type AverageSpatialResolutionInMetersOfThePixelsInTheBand = number;
755
+ export type MeanValueOfAllThePixelsInTheBand = number;
756
+ export type MinimumValueOfAllThePixelsInTheBand = number;
757
+ export type MaximumValueOfAllThePixelsInTheBand = number;
758
+ export type StandardDeviationValueOfAllThePixelsInTheBand = number;
759
+ export type PercentageOfValidNotNodataPixel = number;
760
+ export type NumberOfBuckets = number;
761
+ export type MinimumValueOfTheBuckets = number;
762
+ export type MaximumValueOfTheBuckets = number;
763
+ export type DistributionBuckets = [
764
+ NumberOfPixelsInTheBucket,
765
+ NumberOfPixelsInTheBucket,
766
+ NumberOfPixelsInTheBucket,
767
+ ...NumberOfPixelsInTheBucket[]
768
+ ];
769
+ export type NumberOfPixelsInTheBucket = number;
770
+
771
+ export interface Assetfields {
772
+ 'raster:bands'?: Bands;
773
+ /**
774
+ * This interface was referenced by `Assetfields`'s JSON-Schema definition
775
+ * via the `patternProperty` "^(?!raster:)".
776
+ */
777
+ [k: string]: {
778
+ [k: string]: unknown;
779
+ };
780
+ }
781
+ export interface Band {
782
+ data_type?: DataTypeOfTheBand;
783
+ unit?: UnitDenominationOfThePixelValue;
784
+ bits_per_sample?: TheActualNumberOfBitsUsedForThisBand;
785
+ sampling?: PixelSamplingInTheBand;
786
+ nodata?: NoDataPixelValue;
787
+ scale?: MultiplicatorFactorOfThePixelValueToTransformIntoTheValue;
788
+ offset?: NumberToBeAddedToThePixelValueToTransformIntoTheValue;
789
+ spatial_resolution?: AverageSpatialResolutionInMetersOfThePixelsInTheBand;
790
+ statistics?: Statistics;
791
+ histogram?: Histogram;
792
+ [k: string]: unknown;
793
+ }
794
+ export interface Statistics {
795
+ mean?: MeanValueOfAllThePixelsInTheBand;
796
+ minimum?: MinimumValueOfAllThePixelsInTheBand;
797
+ maximum?: MaximumValueOfAllThePixelsInTheBand;
798
+ stddev?: StandardDeviationValueOfAllThePixelsInTheBand;
799
+ valid_percent?: PercentageOfValidNotNodataPixel;
800
+ }
801
+ export interface Histogram {
802
+ count: NumberOfBuckets;
803
+ min: MinimumValueOfTheBuckets;
804
+ max: MaximumValueOfTheBuckets;
805
+ buckets: DistributionBuckets;
806
+ }
807
+ export interface StacExtensions {
808
+ stac_extensions: unknown[];
809
+ [k: string]: unknown;
810
+ }
811
+
812
+ /**
813
+ * STAC Item or Collection
814
+ */
815
+ export type STACObject = STACItem | STACCollection;
816
+
817
+ /**
818
+ * STAC Item including our required extensions: EO and Raster
819
+ */
820
+ export type CompleteSTACItem = STACItem & EOExtension & RasterExtension;
821
+
822
+ /**
823
+ * STAC Collection including our required extensions: Item Assets, EO, and Raster
824
+ */
825
+ export type CompleteSTACCollection = STACCollection &
826
+ ItemAssetsDefinitionExtension &
827
+ EOExtension &
828
+ RasterExtension;
829
+
830
+ export type CompleteSTACObject = CompleteSTACItem | CompleteSTACCollection;