From 0c750349b6f5b7265e23b77282d827de3b4c0a41 Mon Sep 17 00:00:00 2001 From: "dino.horvat" Date: Thu, 11 Sep 2025 12:08:18 +0200 Subject: [PATCH] Update SkySat evalscripts --- planet/skysat/ndvi/eob.js | 4 ++-- planet/skysat/ndvi/raw.js | 4 ++-- planet/skysat/ndvi/script.js | 4 ++-- planet/skysat/true_color/script.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/planet/skysat/ndvi/eob.js b/planet/skysat/ndvi/eob.js index 38b7d859..6457783d 100644 --- a/planet/skysat/ndvi/eob.js +++ b/planet/skysat/ndvi/eob.js @@ -3,7 +3,7 @@ function setup() { return { - input: ["Red", "NIR", "dataMask"], + input: ["red", "nir", "dataMask"], output: [ { id: "default", bands: 4 }, { id: "index", bands: 1, sampleType: "FLOAT32" }, @@ -14,7 +14,7 @@ function setup() { } function evaluatePixel(sample) { - let NDVI = index(sample.NIR, sample.Red); + let NDVI = index(sample.nir, sample.red); const indexVal = isFinite(NDVI) && sample.dataMask === 1 ? NDVI : NaN; let id_default = valueInterpolate(NDVI, [0, 0.2, 0.3, 0.4, 0.5, 1.0], diff --git a/planet/skysat/ndvi/raw.js b/planet/skysat/ndvi/raw.js index 87f2db3c..2112fd2f 100644 --- a/planet/skysat/ndvi/raw.js +++ b/planet/skysat/ndvi/raw.js @@ -3,7 +3,7 @@ function setup() { return { - input: ["Red", "NIR"], + input: ["red", "nir"], output: [ { id: "default", bands: 1 }, ] @@ -11,6 +11,6 @@ function setup() { } function evaluatePixel(sample) { - let NDVI = index(sample.NIR, sample.Red); + let NDVI = index(sample.nir, sample.red); return { default: [NDVI] }; } diff --git a/planet/skysat/ndvi/script.js b/planet/skysat/ndvi/script.js index 0a8f60cf..fbc59817 100644 --- a/planet/skysat/ndvi/script.js +++ b/planet/skysat/ndvi/script.js @@ -3,7 +3,7 @@ function setup() { return { - input: ["Red", "NIR", "dataMask"], + input: ["red", "nir", "dataMask"], output: [ { id: "default", bands: 4 }, ] @@ -11,7 +11,7 @@ function setup() { } function evaluatePixel(sample) { - let NDVI = index(sample.NIR, sample.Red); + let NDVI = index(sample.nir, sample.red); let id_default = valueInterpolate(NDVI, [0, 0.2, 0.3, 0.4, 0.5, 1.0], [ diff --git a/planet/skysat/true_color/script.js b/planet/skysat/true_color/script.js index cdaa5b69..edbbc23a 100644 --- a/planet/skysat/true_color/script.js +++ b/planet/skysat/true_color/script.js @@ -3,11 +3,11 @@ function setup() { return { - input: ["Blue", "Red", "Green", "dataMask"], + input: ["blue", "red", "green", "dataMask"], output: { bands: 4 }, }; } var f = 2.5 / 10000; function evaluatePixel(sample) { - return [sample.Red * f, sample.Green * f, sample.Blue * f, sample.dataMask]; + return [sample.red * f, sample.green * f, sample.blue * f, sample.dataMask]; }