Skip to content

Commit 71d75d8

Browse files
authored
Merge pull request #359 from sentinel-hub/fix/skysat-scripts
Update SkySat evalscripts
2 parents 46b64d5 + 0c75034 commit 71d75d8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

planet/skysat/ndvi/eob.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
function setup() {
55
return {
6-
input: ["Red", "NIR", "dataMask"],
6+
input: ["red", "nir", "dataMask"],
77
output: [
88
{ id: "default", bands: 4 },
99
{ id: "index", bands: 1, sampleType: "FLOAT32" },
@@ -14,7 +14,7 @@ function setup() {
1414
}
1515

1616
function evaluatePixel(sample) {
17-
let NDVI = index(sample.NIR, sample.Red);
17+
let NDVI = index(sample.nir, sample.red);
1818
const indexVal = isFinite(NDVI) && sample.dataMask === 1 ? NDVI : NaN;
1919
let id_default = valueInterpolate(NDVI,
2020
[0, 0.2, 0.3, 0.4, 0.5, 1.0],

planet/skysat/ndvi/raw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
function setup() {
55
return {
6-
input: ["Red", "NIR"],
6+
input: ["red", "nir"],
77
output: [
88
{ id: "default", bands: 1 },
99
]
1010
}
1111
}
1212

1313
function evaluatePixel(sample) {
14-
let NDVI = index(sample.NIR, sample.Red);
14+
let NDVI = index(sample.nir, sample.red);
1515
return { default: [NDVI] };
1616
}

planet/skysat/ndvi/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
function setup() {
55
return {
6-
input: ["Red", "NIR", "dataMask"],
6+
input: ["red", "nir", "dataMask"],
77
output: [
88
{ id: "default", bands: 4 },
99
]
1010
}
1111
}
1212

1313
function evaluatePixel(sample) {
14-
let NDVI = index(sample.NIR, sample.Red);
14+
let NDVI = index(sample.nir, sample.red);
1515
let id_default = valueInterpolate(NDVI,
1616
[0, 0.2, 0.3, 0.4, 0.5, 1.0],
1717
[

planet/skysat/true_color/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
function setup() {
55
return {
6-
input: ["Blue", "Red", "Green", "dataMask"],
6+
input: ["blue", "red", "green", "dataMask"],
77
output: { bands: 4 },
88
};
99
}
1010
var f = 2.5 / 10000;
1111
function evaluatePixel(sample) {
12-
return [sample.Red * f, sample.Green * f, sample.Blue * f, sample.dataMask];
12+
return [sample.red * f, sample.green * f, sample.blue * f, sample.dataMask];
1313
}

0 commit comments

Comments
 (0)