Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions planet/skysat/ndvi/eob.js
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand All @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions planet/skysat/ndvi/raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

function setup() {
return {
input: ["Red", "NIR"],
input: ["red", "nir"],
output: [
{ id: "default", bands: 1 },
]
}
}

function evaluatePixel(sample) {
let NDVI = index(sample.NIR, sample.Red);
let NDVI = index(sample.nir, sample.red);
return { default: [NDVI] };
}
4 changes: 2 additions & 2 deletions planet/skysat/ndvi/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

function setup() {
return {
input: ["Red", "NIR", "dataMask"],
input: ["red", "nir", "dataMask"],
output: [
{ id: "default", bands: 4 },
]
}
}

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],
[
Expand Down
4 changes: 2 additions & 2 deletions planet/skysat/true_color/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}