forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfilter_bands.json
More file actions
82 lines (82 loc) · 4.36 KB
/
filter_bands.json
File metadata and controls
82 lines (82 loc) · 4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
"id": "filter_bands",
"summary": "Filter the bands by name",
"description": "Filters the bands in the data cube so that bands that don't match any of the criteria are dropped from the data cube. The data cube is expected to have only one dimension of type `bands`. Fails with a `DimensionMissing` error if no such dimension exists.\n\nThe following criteria can be used to select bands:\n\n* `bands`: band name or common band name (e.g. `B01`, `B8A`, `red` or `nir`)\n* `wavelengths`: ranges of wavelengths in micrometres (μm) (e.g. 0.5 - 0.6)\n\nAll these information are exposed in the band metadata of the collection. To keep algorithms interoperable it is recommended to prefer the common bands names or the wavelengths over collection and/or back-end specific band names.\n\nIf multiple criteria are specified, any of them must match and not all of them, i.e. they are combined with an OR-operation. If no criteria is specified, the `BandFilterParameterMissing` exception must be thrown.\n\n**Important:** The order of the specified array defines the order of the bands in the data cube, which can be important for subsequent processes. If multiple bands are matched by a single criterion (e.g. a range of wavelengths), they stay in the original order.",
"categories": [
"filter"
],
"parameters": [
{
"name": "data",
"description": "A data cube with bands.",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
{
"name": "bands",
"description": "A list of band names. Either the unique band name (metadata field `name` in bands) or one of the common band names (metadata field `common_name` in bands). If unique band name and common name conflict, the unique band name has higher priority.\n\nThe order of the specified array defines the order of the bands in the data cube. If multiple bands match a common name, all matched bands are included in the original order.",
"schema": {
"type": "array",
"items": {
"type": "string",
"subtype": "band-name"
}
},
"default": [],
"optional": true
},
{
"name": "wavelengths",
"description": "A list of sub-lists with each sub-list consisting of two elements. The first element is the minimum wavelength and the second element is the maximum wavelength. Wavelengths are specified in micrometres (μm).\n\nThe order of the specified array defines the order of the bands in the data cube. If multiple bands match the wavelengths, all matched bands are included in the original order.",
"schema": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": {
"type": "number"
},
"examples": [
[
[
0.45,
0.5
],
[
0.6,
0.7
]
]
]
}
},
"default": [],
"optional": true
}
],
"returns": {
"description": "A data cube limited to a subset of its original bands. Therefore, the cardinality is potentially lower, but the resolution and the number of dimensions are the same as for the original data cube.",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},
"exceptions": {
"BandFilterParameterMissing": {
"message": "The process 'filter_bands' requires any of the parameters 'bands', 'common_names' or 'wavelengths' to be set."
},
"DimensionMissing": {
"message": "A band dimension is missing."
}
},
"links": [
{
"rel": "about",
"href": "https://github.com/radiantearth/stac-spec/tree/master/extensions/eo#common-band-names",
"title": "List of common band names as specified by the STAC specification"
}
]
}