[
{
"name": "discrete-None",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "discrete",
"domain": "data",
"breaks": [
0,
10,
20
],
"colors": [
"#ff0000",
"#0000ff"
]
}
}
},
"input": {
"values": [
10
]
},
"expected": {
"rgba": [
0,
0,
255,
255
]
}
},
{
"name": "discrete-right_closed",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "discrete",
"domain": "data",
"breaks": [
0,
10,
20
],
"colors": [
"#ff0000",
"#0000ff"
],
"boundary": "right_closed"
}
}
},
"input": {
"values": [
10
]
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "continuous-None",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "data",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 1,
"color": "#ffffff"
}
]
}
}
},
"input": {
"values": [
0.5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "continuous-linear_rgb",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "data",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 1,
"color": "#ffffff"
}
],
"interpolation": "linear_rgb"
}
}
},
"input": {
"values": [
0.5
]
},
"expected": {
"rgba": [
188,
188,
188,
255
]
}
},
{
"name": "premultiplied-alpha",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "data",
"stops": [
{
"value": 0,
"color": "#ff000000"
},
{
"value": 1,
"color": "#0000ffff"
}
]
}
}
},
"input": {
"values": [
0.5
]
},
"expected": {
"rgba": [
0,
0,
255,
128
]
}
},
{
"name": "reverse-keeps-stop-positions",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "data",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 0.25,
"color": "#ff0000"
},
{
"value": 1,
"color": "#ffffff"
}
],
"reverse": true,
"under": "#ff0000"
}
}
},
"input": {
"values": [
0.25
]
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "reverse-keeps-under-color",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "data",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 0.25,
"color": "#ff0000"
},
{
"value": 1,
"color": "#ffffff"
}
],
"reverse": true,
"under": "#ff0000"
}
}
},
"input": {
"values": [
-1
]
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "normalized-none-byte-range",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "normalized",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 1,
"color": "#ffffff"
}
]
}
}
},
"input": {
"values": [
127.5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "native-data-domain",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"colormap": [
[
[
0,
100
],
[
255,
0,
0,
255
]
],
[
[
100,
200
],
[
0,
0,
255,
255
]
]
]
}
},
"input": {
"values": [
90
]
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "native-display-domain",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"colormap": [
[
[
0,
100
],
[
255,
0,
0,
255
]
],
[
[
100,
200
],
[
0,
0,
255,
255
]
]
]
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
200
]
]
}
},
"input": {
"values": [
90
]
},
"expected": {
"rgba": [
0,
0,
255,
255
]
}
},
{
"name": "native-final-upper-exclusive",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"colormap": [
[
[
0,
100
],
[
255,
0,
0,
255
]
],
[
[
100,
200
],
[
0,
0,
255,
255
]
]
]
}
},
"input": {
"values": [
200
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "named-none-index",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"colormap_name": "test_gray"
}
},
"input": {
"values": [
127.5
],
"palette": {
"0": [
0,
0,
0,
255
],
"1": [
1,
1,
1,
255
],
"2": [
2,
2,
2,
255
],
"3": [
3,
3,
3,
255
],
"4": [
4,
4,
4,
255
],
"5": [
5,
5,
5,
255
],
"6": [
6,
6,
6,
255
],
"7": [
7,
7,
7,
255
],
"8": [
8,
8,
8,
255
],
"9": [
9,
9,
9,
255
],
"10": [
10,
10,
10,
255
],
"11": [
11,
11,
11,
255
],
"12": [
12,
12,
12,
255
],
"13": [
13,
13,
13,
255
],
"14": [
14,
14,
14,
255
],
"15": [
15,
15,
15,
255
],
"16": [
16,
16,
16,
255
],
"17": [
17,
17,
17,
255
],
"18": [
18,
18,
18,
255
],
"19": [
19,
19,
19,
255
],
"20": [
20,
20,
20,
255
],
"21": [
21,
21,
21,
255
],
"22": [
22,
22,
22,
255
],
"23": [
23,
23,
23,
255
],
"24": [
24,
24,
24,
255
],
"25": [
25,
25,
25,
255
],
"26": [
26,
26,
26,
255
],
"27": [
27,
27,
27,
255
],
"28": [
28,
28,
28,
255
],
"29": [
29,
29,
29,
255
],
"30": [
30,
30,
30,
255
],
"31": [
31,
31,
31,
255
],
"32": [
32,
32,
32,
255
],
"33": [
33,
33,
33,
255
],
"34": [
34,
34,
34,
255
],
"35": [
35,
35,
35,
255
],
"36": [
36,
36,
36,
255
],
"37": [
37,
37,
37,
255
],
"38": [
38,
38,
38,
255
],
"39": [
39,
39,
39,
255
],
"40": [
40,
40,
40,
255
],
"41": [
41,
41,
41,
255
],
"42": [
42,
42,
42,
255
],
"43": [
43,
43,
43,
255
],
"44": [
44,
44,
44,
255
],
"45": [
45,
45,
45,
255
],
"46": [
46,
46,
46,
255
],
"47": [
47,
47,
47,
255
],
"48": [
48,
48,
48,
255
],
"49": [
49,
49,
49,
255
],
"50": [
50,
50,
50,
255
],
"51": [
51,
51,
51,
255
],
"52": [
52,
52,
52,
255
],
"53": [
53,
53,
53,
255
],
"54": [
54,
54,
54,
255
],
"55": [
55,
55,
55,
255
],
"56": [
56,
56,
56,
255
],
"57": [
57,
57,
57,
255
],
"58": [
58,
58,
58,
255
],
"59": [
59,
59,
59,
255
],
"60": [
60,
60,
60,
255
],
"61": [
61,
61,
61,
255
],
"62": [
62,
62,
62,
255
],
"63": [
63,
63,
63,
255
],
"64": [
64,
64,
64,
255
],
"65": [
65,
65,
65,
255
],
"66": [
66,
66,
66,
255
],
"67": [
67,
67,
67,
255
],
"68": [
68,
68,
68,
255
],
"69": [
69,
69,
69,
255
],
"70": [
70,
70,
70,
255
],
"71": [
71,
71,
71,
255
],
"72": [
72,
72,
72,
255
],
"73": [
73,
73,
73,
255
],
"74": [
74,
74,
74,
255
],
"75": [
75,
75,
75,
255
],
"76": [
76,
76,
76,
255
],
"77": [
77,
77,
77,
255
],
"78": [
78,
78,
78,
255
],
"79": [
79,
79,
79,
255
],
"80": [
80,
80,
80,
255
],
"81": [
81,
81,
81,
255
],
"82": [
82,
82,
82,
255
],
"83": [
83,
83,
83,
255
],
"84": [
84,
84,
84,
255
],
"85": [
85,
85,
85,
255
],
"86": [
86,
86,
86,
255
],
"87": [
87,
87,
87,
255
],
"88": [
88,
88,
88,
255
],
"89": [
89,
89,
89,
255
],
"90": [
90,
90,
90,
255
],
"91": [
91,
91,
91,
255
],
"92": [
92,
92,
92,
255
],
"93": [
93,
93,
93,
255
],
"94": [
94,
94,
94,
255
],
"95": [
95,
95,
95,
255
],
"96": [
96,
96,
96,
255
],
"97": [
97,
97,
97,
255
],
"98": [
98,
98,
98,
255
],
"99": [
99,
99,
99,
255
],
"100": [
100,
100,
100,
255
],
"101": [
101,
101,
101,
255
],
"102": [
102,
102,
102,
255
],
"103": [
103,
103,
103,
255
],
"104": [
104,
104,
104,
255
],
"105": [
105,
105,
105,
255
],
"106": [
106,
106,
106,
255
],
"107": [
107,
107,
107,
255
],
"108": [
108,
108,
108,
255
],
"109": [
109,
109,
109,
255
],
"110": [
110,
110,
110,
255
],
"111": [
111,
111,
111,
255
],
"112": [
112,
112,
112,
255
],
"113": [
113,
113,
113,
255
],
"114": [
114,
114,
114,
255
],
"115": [
115,
115,
115,
255
],
"116": [
116,
116,
116,
255
],
"117": [
117,
117,
117,
255
],
"118": [
118,
118,
118,
255
],
"119": [
119,
119,
119,
255
],
"120": [
120,
120,
120,
255
],
"121": [
121,
121,
121,
255
],
"122": [
122,
122,
122,
255
],
"123": [
123,
123,
123,
255
],
"124": [
124,
124,
124,
255
],
"125": [
125,
125,
125,
255
],
"126": [
126,
126,
126,
255
],
"127": [
127,
127,
127,
255
],
"128": [
128,
128,
128,
255
],
"129": [
129,
129,
129,
255
],
"130": [
130,
130,
130,
255
],
"131": [
131,
131,
131,
255
],
"132": [
132,
132,
132,
255
],
"133": [
133,
133,
133,
255
],
"134": [
134,
134,
134,
255
],
"135": [
135,
135,
135,
255
],
"136": [
136,
136,
136,
255
],
"137": [
137,
137,
137,
255
],
"138": [
138,
138,
138,
255
],
"139": [
139,
139,
139,
255
],
"140": [
140,
140,
140,
255
],
"141": [
141,
141,
141,
255
],
"142": [
142,
142,
142,
255
],
"143": [
143,
143,
143,
255
],
"144": [
144,
144,
144,
255
],
"145": [
145,
145,
145,
255
],
"146": [
146,
146,
146,
255
],
"147": [
147,
147,
147,
255
],
"148": [
148,
148,
148,
255
],
"149": [
149,
149,
149,
255
],
"150": [
150,
150,
150,
255
],
"151": [
151,
151,
151,
255
],
"152": [
152,
152,
152,
255
],
"153": [
153,
153,
153,
255
],
"154": [
154,
154,
154,
255
],
"155": [
155,
155,
155,
255
],
"156": [
156,
156,
156,
255
],
"157": [
157,
157,
157,
255
],
"158": [
158,
158,
158,
255
],
"159": [
159,
159,
159,
255
],
"160": [
160,
160,
160,
255
],
"161": [
161,
161,
161,
255
],
"162": [
162,
162,
162,
255
],
"163": [
163,
163,
163,
255
],
"164": [
164,
164,
164,
255
],
"165": [
165,
165,
165,
255
],
"166": [
166,
166,
166,
255
],
"167": [
167,
167,
167,
255
],
"168": [
168,
168,
168,
255
],
"169": [
169,
169,
169,
255
],
"170": [
170,
170,
170,
255
],
"171": [
171,
171,
171,
255
],
"172": [
172,
172,
172,
255
],
"173": [
173,
173,
173,
255
],
"174": [
174,
174,
174,
255
],
"175": [
175,
175,
175,
255
],
"176": [
176,
176,
176,
255
],
"177": [
177,
177,
177,
255
],
"178": [
178,
178,
178,
255
],
"179": [
179,
179,
179,
255
],
"180": [
180,
180,
180,
255
],
"181": [
181,
181,
181,
255
],
"182": [
182,
182,
182,
255
],
"183": [
183,
183,
183,
255
],
"184": [
184,
184,
184,
255
],
"185": [
185,
185,
185,
255
],
"186": [
186,
186,
186,
255
],
"187": [
187,
187,
187,
255
],
"188": [
188,
188,
188,
255
],
"189": [
189,
189,
189,
255
],
"190": [
190,
190,
190,
255
],
"191": [
191,
191,
191,
255
],
"192": [
192,
192,
192,
255
],
"193": [
193,
193,
193,
255
],
"194": [
194,
194,
194,
255
],
"195": [
195,
195,
195,
255
],
"196": [
196,
196,
196,
255
],
"197": [
197,
197,
197,
255
],
"198": [
198,
198,
198,
255
],
"199": [
199,
199,
199,
255
],
"200": [
200,
200,
200,
255
],
"201": [
201,
201,
201,
255
],
"202": [
202,
202,
202,
255
],
"203": [
203,
203,
203,
255
],
"204": [
204,
204,
204,
255
],
"205": [
205,
205,
205,
255
],
"206": [
206,
206,
206,
255
],
"207": [
207,
207,
207,
255
],
"208": [
208,
208,
208,
255
],
"209": [
209,
209,
209,
255
],
"210": [
210,
210,
210,
255
],
"211": [
211,
211,
211,
255
],
"212": [
212,
212,
212,
255
],
"213": [
213,
213,
213,
255
],
"214": [
214,
214,
214,
255
],
"215": [
215,
215,
215,
255
],
"216": [
216,
216,
216,
255
],
"217": [
217,
217,
217,
255
],
"218": [
218,
218,
218,
255
],
"219": [
219,
219,
219,
255
],
"220": [
220,
220,
220,
255
],
"221": [
221,
221,
221,
255
],
"222": [
222,
222,
222,
255
],
"223": [
223,
223,
223,
255
],
"224": [
224,
224,
224,
255
],
"225": [
225,
225,
225,
255
],
"226": [
226,
226,
226,
255
],
"227": [
227,
227,
227,
255
],
"228": [
228,
228,
228,
255
],
"229": [
229,
229,
229,
255
],
"230": [
230,
230,
230,
255
],
"231": [
231,
231,
231,
255
],
"232": [
232,
232,
232,
255
],
"233": [
233,
233,
233,
255
],
"234": [
234,
234,
234,
255
],
"235": [
235,
235,
235,
255
],
"236": [
236,
236,
236,
255
],
"237": [
237,
237,
237,
255
],
"238": [
238,
238,
238,
255
],
"239": [
239,
239,
239,
255
],
"240": [
240,
240,
240,
255
],
"241": [
241,
241,
241,
255
],
"242": [
242,
242,
242,
255
],
"243": [
243,
243,
243,
255
],
"244": [
244,
244,
244,
255
],
"245": [
245,
245,
245,
255
],
"246": [
246,
246,
246,
255
],
"247": [
247,
247,
247,
255
],
"248": [
248,
248,
248,
255
],
"249": [
249,
249,
249,
255
],
"250": [
250,
250,
250,
255
],
"251": [
251,
251,
251,
255
],
"252": [
252,
252,
252,
255
],
"253": [
253,
253,
253,
255
],
"254": [
254,
254,
254,
255
],
"255": [
255,
255,
255,
255
]
}
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "range-transparent-precedes-over",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "normalized",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 1,
"color": "#ffffff"
}
],
"under": "#ff0000",
"over": "#ff0000"
}
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
1
]
],
"range_policy": "transparent"
}
},
"input": {
"values": [
2
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "range-clamp-precedes-over",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "pseudocolor",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "normalized",
"stops": [
{
"value": 0,
"color": "#000000"
},
{
"value": 1,
"color": "#ffffff"
}
],
"under": "#ff0000",
"over": "#ff0000"
}
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
1
]
]
}
},
"input": {
"values": [
2
]
},
"expected": {
"rgba": [
255,
255,
255,
255
]
}
},
{
"name": "constant-minmax",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
}
},
"input": {
"values": [
5
],
"samples": [
5,
5,
5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "constant-percentile",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "percentile",
"percentiles": [
2,
98
]
}
},
"input": {
"values": [
5
],
"samples": [
5,
5,
5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "constant-stddev",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "stddev",
"stddev": 2
}
},
"input": {
"values": [
5
],
"samples": [
5,
5,
5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "constant-histogram_equalization",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "histogram_equalization"
}
},
"input": {
"values": [
5
],
"samples": [
5,
5,
5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "empty-statistics",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
}
},
"input": {
"values": [
5
],
"samples": [
null,
null
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "constant-clamp-above",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
}
},
"input": {
"values": [
6
],
"samples": [
5,
5
]
},
"expected": {
"rgba": [
255,
255,
255,
255
]
}
},
{
"name": "constant-transparent-above",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax",
"range_policy": "transparent"
}
},
"input": {
"values": [
6
],
"samples": [
5,
5
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "cdf-counts-and-interpolation",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "histogram_equalization"
}
},
"input": {
"values": [
15
],
"samples": [
0,
0,
10,
20
]
},
"expected": {
"rgba": [
191,
191,
191,
255
]
}
},
{
"name": "curve-clamp-actual-endpoint",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "curve",
"curves": [
[
[
0,
0.25
],
[
1,
0.75
]
]
]
}
},
"input": {
"values": [
-1
]
},
"expected": {
"rgba": [
64,
64,
64,
255
]
}
},
{
"name": "finite-extreme-range",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "linear",
"rescale": [
[
-1e+308,
1e+308
]
]
}
},
"input": {
"values": [
0
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "sigmoid-tiny-contrast",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"effects": {
"post_color_formula": [
{
"op": "sigmoidal",
"contrast": 1e-20,
"midpoint": 0.5
}
]
}
},
"input": {
"values": [
127.5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "sigmoid-huge-contrast",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"effects": {
"post_color_formula": [
{
"op": "sigmoidal",
"contrast": 1e+308,
"midpoint": 0.5
}
]
}
},
"input": {
"values": [
127.5
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "invert-after-gamma",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
],
"renderer_invert": true
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
1
]
]
},
"effects": {
"color_formula": [
{
"op": "gamma",
"value": 2
}
]
}
},
"input": {
"values": [
0.25
]
},
"expected": {
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "rgb-one-invalid",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
1,
2,
3
]
}
},
"input": {
"values": [
255,
null,
255
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "single-color-valid-zero",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "single_color",
"bidx": [
1
],
"color": "#ff0000"
}
},
"input": {
"values": [
0
]
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "alpha-multiplied-once",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "single_color",
"bidx": [
1
],
"color": "#ff000080"
},
"opacity": 0.5
},
"input": {
"values": [
0
],
"alpha": 0.5
},
"expected": {
"rgba": [
255,
0,
0,
32
]
}
},
{
"name": "zero-alpha-canonical-rgb",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "single_color",
"bidx": [
1
],
"color": "#ff0000"
},
"opacity": 0
},
"input": {
"values": [
1
]
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "jpeg-linear-composite",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "single_color",
"bidx": [
1
],
"color": "#ffffff"
},
"opacity": 0.5,
"raster:tile": {
"format": "jpeg"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/tile/v1.0.0/schema.json"
]
},
"input": {
"values": [
1
]
},
"expected": {
"rgba": [
188,
188,
188,
255
]
}
},
{
"name": "palette-source",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "categorized",
"bidx": [
1
],
"color_mapping": {
"mode": "source"
}
}
},
"input": {
"values": [
1
],
"palette": {
"1": [
255,
0,
0,
255
]
}
},
"expected": {
"rgba": [
255,
0,
0,
255
]
}
},
{
"name": "alpha-weighted-resampling",
"kind": "resample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"resampling": {
"read": "bilinear"
}
},
"input": {
"samples": [
{
"value": 0,
"weight": 0.5,
"alpha": 0.5
},
{
"value": 100,
"weight": 0.5,
"alpha": 1
}
]
},
"expected": {
"value": 66.66666666666667,
"alpha": 0.75,
"rgba": [
67,
67,
67,
191
]
}
},
{
"name": "resample-skips-invalid",
"kind": "resample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"resampling": {
"read": "bilinear"
}
},
"input": {
"samples": [
{
"value": null,
"weight": 0.5
},
{
"value": 100,
"weight": 0.5
}
]
},
"expected": {
"value": 100,
"alpha": 1,
"rgba": [
100,
100,
100,
255
]
}
},
{
"name": "resample-empty",
"kind": "resample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"resampling": {
"read": "bilinear"
}
},
"input": {
"samples": [
{
"value": null,
"weight": 1
}
]
},
"expected": {
"value": null,
"alpha": 0,
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "mosaic-mean",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
2
],
"alpha": 0.5
},
{
"values": [
4
],
"alpha": 1
}
]
},
"expected": {
"values": [
3
],
"alpha": 0.75,
"rgba": [
3,
3,
3,
191
]
}
},
{
"name": "mosaic-median",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"raster:mosaic": {
"pixel_selection": "median",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
2
],
"alpha": 0.5
},
{
"values": [
4
],
"alpha": 1
}
]
},
"expected": {
"values": [
3
],
"alpha": 0.75,
"rgba": [
3,
3,
3,
191
]
}
},
{
"name": "mosaic-first",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"raster:mosaic": {
"pixel_selection": "first",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
2
],
"alpha": 0.5
},
{
"values": [
4
],
"alpha": 1
}
]
},
"expected": {
"values": [
2
],
"alpha": 0.5,
"rgba": [
2,
2,
2,
128
]
}
},
{
"name": "mosaic-whole-tuples",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
1,
2,
3
]
},
"raster:mosaic": {
"pixel_selection": "first",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1,
2,
3
],
"sources": [
{
"values": [
255,
null,
0
]
},
{
"values": [
0,
255,
0
]
}
]
},
"expected": {
"values": [
0,
255,
0
],
"alpha": 1,
"rgba": [
0,
255,
0,
255
]
}
},
{
"name": "rank-before-uses-sorted-dependencies",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
4,
3,
2
]
},
"raster:mosaic": {
"pixel_selection": "highest",
"stage": "before_channels",
"rank_channel": 1
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
2,
3,
4
],
"sources": [
{
"values": [
9,
0,
1
]
},
{
"values": [
2,
0,
8
]
}
]
},
"expected": {
"values": [
1,
0,
9
],
"alpha": 1,
"rgba": [
1,
0,
9,
255
]
}
},
{
"name": "rank-after-uses-output-order",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
4,
3,
2
]
},
"raster:mosaic": {
"pixel_selection": "highest",
"stage": "after_channels",
"rank_channel": 1
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
2,
3,
4
],
"sources": [
{
"values": [
9,
0,
1
]
},
{
"values": [
2,
0,
8
]
}
]
},
"expected": {
"values": [
8,
0,
2
],
"alpha": 1,
"rgba": [
8,
0,
2,
255
]
}
},
{
"name": "extension-order-before_channels",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"extensions": [
"https://example.test/extensions/mapseek.test.square/v1.0.0/schema.json",
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
],
"test:square": {
"stage": "after_channels"
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "before_channels"
}
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
2
]
},
{
"values": [
4
]
}
]
},
"expected": {
"values": [
9
],
"alpha": 1,
"rgba": [
9,
9,
9,
255
]
}
},
{
"name": "extension-order-after_channels",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"extensions": [
"https://example.test/extensions/mapseek.test.square/v1.0.0/schema.json",
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
],
"test:square": {
"stage": "after_channels"
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "after_channels"
}
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
2
]
},
{
"values": [
4
]
}
]
},
"expected": {
"values": [
10
],
"alpha": 1,
"rgba": [
10,
10,
10,
255
]
}
},
{
"name": "flat-hillshade",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "hillshade",
"bidx": [
1
],
"terrain": {
"method": "single"
}
}
},
"input": {
"grid": [
[
0,
0,
0
],
[
0,
0,
0
],
[
0,
0,
0
]
]
},
"expected": {
"h": 0.7071067811865476,
"rgba": [
180,
180,
180,
255
]
}
},
{
"name": "north-light-on-east-slope",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "hillshade",
"bidx": [
1
],
"terrain": {
"method": "single",
"azimuth": 0
}
}
},
"input": {
"grid": [
[
499,
500,
501
],
[
499,
500,
501
],
[
499,
500,
501
]
]
},
"expected": {
"h": 0.5,
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "terrain-invalid-neighbor",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "hillshade",
"bidx": [
1
],
"terrain": {
"method": "single"
}
}
},
"input": {
"grid": [
[
null,
0,
0
],
[
0,
0,
0
],
[
0,
0,
0
]
]
},
"expected": {
"h": null,
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "relief-preserves-height-gamma-1",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "shaded_relief",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "normalized",
"stops": [
{
"value": 0,
"color": "#ffffff"
},
{
"value": 1,
"color": "#ffffff"
}
]
},
"terrain": {
"method": "single",
"azimuth": 0
},
"strength": 1
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
1000
]
]
},
"effects": {
"color_formula": [
{
"op": "gamma",
"value": 1
}
]
}
},
"input": {
"grid": [
[
499,
500,
501
],
[
499,
500,
501
],
[
499,
500,
501
]
]
},
"expected": {
"h": 0.5,
"rgba": [
188,
188,
188,
255
]
}
},
{
"name": "relief-preserves-height-gamma-2",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "shaded_relief",
"bidx": [
1
],
"color_mapping": {
"mode": "continuous",
"domain": "normalized",
"stops": [
{
"value": 0,
"color": "#ffffff"
},
{
"value": 1,
"color": "#ffffff"
}
]
},
"terrain": {
"method": "single",
"azimuth": 0
},
"strength": 1
},
"stretch": {
"method": "linear",
"rescale": [
[
0,
1000
]
]
},
"effects": {
"color_formula": [
{
"op": "gamma",
"value": 2
}
]
}
},
"input": {
"grid": [
[
499,
500,
501
],
[
499,
500,
501
],
[
499,
500,
501
]
]
},
"expected": {
"h": 0.5,
"rgba": [
188,
188,
188,
255
]
}
},
{
"name": "post-saturation-red-zero",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
1,
2,
3
]
},
"effects": {
"post_color_formula": [
{
"op": "saturation",
"value": 0
}
]
}
},
"input": {
"values": [
255,
0,
0
]
},
"expected": {
"rgba": [
54,
54,
54,
255
]
}
},
{
"name": "pre-lab-saturation-red-zero",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
1,
2,
3
]
},
"effects": {
"color_formula": [
{
"op": "saturation",
"value": 0
}
]
}
},
"input": {
"values": [
255,
0,
0
]
},
"expected": {
"rgba": [
127,
127,
127,
255
]
}
},
{
"name": "sample-uniform-discard-invalid",
"kind": "sample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
},
"statistics": {
"scope": "dataset",
"accuracy": "sample",
"sample_size": 3
}
},
"input": {
"grid": [
0,
1,
null,
3,
4,
5
],
"values": [
2
]
},
"expected": {
"indices": [
0,
2,
5
],
"samples": [
0,
5
],
"rgba": [
102,
102,
102,
255
]
}
},
{
"name": "sample-one-center-no-replacement",
"kind": "sample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
},
"statistics": {
"scope": "dataset",
"accuracy": "sample",
"sample_size": 1
}
},
"input": {
"grid": [
0,
1,
null,
3,
4,
5
],
"values": [
2
]
},
"expected": {
"indices": [
2
],
"samples": [],
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "sample-default-limit",
"kind": "sample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
},
"statistics": {
"scope": "dataset",
"accuracy": "sample"
}
},
"input": {
"grid": [
0,
1,
2
],
"values": [
1
]
},
"expected": {
"indices": [
0,
1,
2
],
"samples": [
0,
1,
2
],
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "statistics-exact-full-grid",
"kind": "sample",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "minmax"
},
"statistics": {
"scope": "dataset",
"accuracy": "exact"
}
},
"input": {
"grid": [
0,
1,
null,
3
],
"values": [
1.5
]
},
"expected": {
"indices": [
0,
1,
2,
3
],
"samples": [
0,
1,
3
],
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "foot-elevation-in-metric-grid",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "hillshade",
"bidx": [
1
],
"terrain": {
"method": "single",
"vertical_unit": "foot",
"azimuth": 0
}
}
},
"input": {
"grid": [
[
0,
1,
2
],
[
0,
1,
2
],
[
0,
1,
2
]
],
"dx": 0.3048
},
"expected": {
"h": 0.5,
"rgba": [
128,
128,
128,
255
]
}
},
{
"name": "multidirectional-per-light-average",
"kind": "terrain",
"style": {
"version": "3.0",
"renderer": {
"type": "hillshade",
"bidx": [
1
],
"terrain": {
"method": "multidirectional"
}
}
},
"input": {
"grid": [
[
0,
1,
2
],
[
0,
1,
2
],
[
0,
1,
2
]
]
},
"expected": {
"h": 0.8017766952966369,
"rgba": [
204,
204,
204,
255
]
}
},
{
"name": "post-each-step-clips",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"effects": {
"post_color_formula": [
{
"op": "brightness",
"value": 1
},
{
"op": "brightness",
"value": -1
}
]
}
},
"input": {
"values": [
127.5
]
},
"expected": {
"rgba": [
0,
0,
0,
255
]
}
},
{
"name": "source-noninteger-no-rounding",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "categorized",
"bidx": [
1
],
"color_mapping": {
"mode": "source"
}
}
},
"input": {
"values": [
1.2
],
"palette": {
"1": [
255,
0,
0,
255
]
}
},
"expected": {
"rgba": [
0,
0,
0,
0
]
}
},
{
"name": "mosaic-tie-stable-source-order",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "rgb",
"bidx": [
1,
2,
3
]
},
"raster:mosaic": {
"pixel_selection": "highest",
"stage": "after_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1,
2,
3
],
"sources": [
{
"values": [
3,
1,
1
],
"alpha": 0.5
},
{
"values": [
3,
2,
2
],
"alpha": 1
}
]
},
"expected": {
"values": [
3,
1,
1
],
"alpha": 0.5,
"rgba": [
3,
1,
1,
128
]
}
},
{
"name": "jpeg-invalid-pixel-background",
"kind": "pixel",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"raster:tile": {
"format": "jpeg",
"background": "#ffffff"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/tile/v1.0.0/schema.json"
]
},
"input": {
"values": [
null
]
},
"expected": {
"rgba": [
255,
255,
255,
255
]
}
},
{
"name": "mosaic-mean-large-positive",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "linear",
"rescale": [
[
-1e+308,
1e+308
]
]
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
1e+308
]
},
{
"values": [
1e+308
]
}
]
},
"expected": {
"values": [
1e+308
],
"alpha": 1,
"rgba": [
255,
255,
255,
255
]
}
},
{
"name": "mosaic-mean-large-negative",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "linear",
"rescale": [
[
-1e+308,
1e+308
]
]
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "after_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
-1e+308
]
},
{
"values": [
-1e+308
]
}
]
},
"expected": {
"values": [
-1e+308
],
"alpha": 1,
"rgba": [
0,
0,
0,
255
]
}
},
{
"name": "mosaic-mean-large-mixed",
"kind": "mosaic",
"style": {
"version": "3.0",
"renderer": {
"type": "gray",
"bidx": [
1
]
},
"stretch": {
"method": "linear",
"rescale": [
[
-1e+308,
1e+308
]
]
},
"raster:mosaic": {
"pixel_selection": "mean",
"stage": "before_channels"
},
"extensions": [
"https://mapseekai.github.io/raster-style/extensions/raster/mosaic/v1.0.0/schema.json"
]
},
"input": {
"dependency_bands": [
1
],
"sources": [
{
"values": [
1e+308
]
},
{
"values": [
-1e+308
]
},
{
"values": [
1e+308
]
},
{
"values": [
1e+308
]
}
]
},
"expected": {
"values": [
5e+307
],
"alpha": 1,
"rgba": [
191,
191,
191,
255
]
}
}
]