From 59f6c7a5e1b68b9ff077753afee7feed85a29861 Mon Sep 17 00:00:00 2001 From: Daniel Thiex <60705209+dthiex@users.noreply.github.com> Date: Wed, 27 Nov 2024 08:34:19 +0100 Subject: [PATCH] fix broken scripts in PlanetScope section (#337) Co-authored-by: Daniel Thiex --- planet_scope/ndvi_difference/README.md | 2 +- planet_scope/ndwi/script.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/planet_scope/ndvi_difference/README.md b/planet_scope/ndvi_difference/README.md index 6bbdc067..7b43dd1f 100644 --- a/planet_scope/ndvi_difference/README.md +++ b/planet_scope/ndvi_difference/README.md @@ -16,7 +16,7 @@ examples: - zoom: '14' lat: '52.24714' lng: '9.20886' - datasetId: Planetscope + datasetId: 'ccb1f8f0-e5bf-4c31-afe5-d8803bcbde2a' fromTime: '2023-04-02T00:00:00.000Z' toTime: '2023-06-01T23:59:59.999Z' platform: diff --git a/planet_scope/ndwi/script.js b/planet_scope/ndwi/script.js index 3e56a725..ba9e200e 100644 --- a/planet_scope/ndwi/script.js +++ b/planet_scope/ndwi/script.js @@ -11,7 +11,7 @@ function setup() { } function evaluatePixel(sample) { - let ndwi = index(green, nir); + let ndwi = index(sample.green, sample.nir); let id_default = colorBlend(ndwi, [-1, -0.5, -0.2, 0, 0.2, 0.5, 1.0],