Skip to content

Commit 46b64d5

Browse files
authored
Merge pull request #358 from sentinel-hub/fix-upper-case-planetscope
fix case of nir band for PlanetScope NDVI
2 parents 5916335 + 491204e commit 46b64d5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

planet/planetscope/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: ["NIR", "red", "clear", "dataMask"],
6+
input: ["nir", "red", "clear", "dataMask"],
77
output: [
88
{ id: "default", bands: 4 },
99
{ id: "index", bands: 1, sampleType: "FLOAT32" },
@@ -276,7 +276,7 @@ const colorRamp = [
276276
let viz = new ColorRampVisualizer(colorRamp);
277277

278278
function evaluatePixel(sample) {
279-
let ndvi = index(sample.NIR, sample.red);
279+
let ndvi = index(sample.nir, sample.red);
280280
const minIndex = 0;
281281
const maxIndex = 1;
282282
let visVal = null;

planet/planetscope/ndvi/raw.js

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

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

1313
function evaluatePixel(sample) {
14-
return [index(sample.NIR, sample.red)];
14+
return [index(sample.nir, sample.red)];
1515
}

planet/planetscope/ndvi/script.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: ["NIR", "red", "dataMask"],
6+
input: ["nir", "red", "dataMask"],
77
output: {
88
bands: 4,
99
},
@@ -273,7 +273,7 @@ const colorRamp = [
273273
let viz = new ColorRampVisualizer(colorRamp);
274274

275275
function evaluatePixel(sample) {
276-
let ndvi = index(sample.NIR, sample.red);
276+
let ndvi = index(sample.nir, sample.red);
277277
const minIndex = 0;
278278
const maxIndex = 1;
279279
let visVal = null;

0 commit comments

Comments
 (0)