From 7ab34b37dc496d528d305e1f7a4a45dbde98aca5 Mon Sep 17 00:00:00 2001 From: pdrobnic Date: Thu, 7 Mar 2024 13:22:10 +0100 Subject: [PATCH] renaming of planet scope and sky sat bands --- planet_scope/cloud_classification/README.md | 16 +++++++------- planet_scope/cloud_classification/script.js | 22 +++++++++---------- planet_scope/false_color/README.md | 4 ++-- planet_scope/false_color/script.js | 4 ++-- planet_scope/green_city/README.md | 2 +- planet_scope/green_city/script.js | 8 +++---- planet_scope/ndvi/README.md | 4 ++-- planet_scope/ndvi/eob.js | 12 +++++------ planet_scope/ndvi/script.js | 2 +- planet_scope/ndwi/README.md | 4 ++-- planet_scope/ndwi/script.js | 2 +- planet_scope/planet_scope.md | 24 ++++++++++----------- planet_scope/true_color/README.md | 4 ++-- planet_scope/true_color/script.js | 4 ++-- skysat/ndvi/README.md | 4 ++-- skysat/ndvi/script.js | 4 ++-- skysat/panchromatic/script.js | 4 ++-- skysat/skysat.md | 10 ++++----- skysat/true_color/README.md | 2 +- skysat/true_color/script.js | 4 ++-- 20 files changed, 70 insertions(+), 70 deletions(-) diff --git a/planet_scope/cloud_classification/README.md b/planet_scope/cloud_classification/README.md index 29a6a6f8..852a1ccb 100644 --- a/planet_scope/cloud_classification/README.md +++ b/planet_scope/cloud_classification/README.md @@ -10,19 +10,19 @@ nav_exclude: true ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description -PlanetScope has several usable data mask (UDM2) bands. The `UDM2_Clear` band gives information on whether the pixel is clear, meaning that the surface is clearly visible. If it's not clear, that means it's classified as either shadow, snow, light haze, heavy haze or cloud. Each of these is a separate UDM2 mask band: +PlanetScope has several usable data mask (UDM2) bands. The `clear` band gives information on whether the pixel is clear, meaning that the surface is clearly visible. If it's not clear, that means it's classified as either shadow, snow, light haze, heavy haze or cloud. Each of these is a separate UDM2 mask band: -- UDM2_Snow -- UDM2_Shadow -- UDM2_LightHaze -- UDM2_HeavyHaze -- UDM2_Cloud +- snow +- shadow +- haze_light +- haze_heavy +- cloud -When the mask band == 1, the pixel belongs to the mask (for example, when UDM2_Snow == 1, the pixel was recognized as snow). The bands are mutually exclusive - if a pixel belongs to one mask class, it cannot belong to any other. +When the mask band == 1, the pixel belongs to the mask (for example, when `snow` == 1, the pixel was recognized as snow). The bands are mutually exclusive - if a pixel belongs to one mask class, it cannot belong to any other. In the script, each of the UDM2 mask bands is classified with a unique color, and the pixels that do not belong to any class, are returned transparent. diff --git a/planet_scope/cloud_classification/script.js b/planet_scope/cloud_classification/script.js index 8c0b22fa..1b86db8c 100644 --- a/planet_scope/cloud_classification/script.js +++ b/planet_scope/cloud_classification/script.js @@ -5,12 +5,12 @@ function setup() { return { input: [{ bands: [ - "UDM2_Clear", - "UDM2_Snow", - "UDM2_Shadow", - "UDM2_LightHaze", - "UDM2_HeavyHaze", - "UDM2_Cloud" + "clear", + "snow", + "shadow", + "haze_light", + "haze_heavy", + "cloud" ] }], output: { @@ -20,19 +20,19 @@ function setup() { } function evaluatePixel(samples) { - if (samples.UDM2_Snow == 1) { + if (samples.snow == 1) { return [0, 0.5, 1, 1] // blue } - if (samples.UDM2_Shadow == 1) { + if (samples.shadow == 1) { return [0.4, 0.4, 0.4, 1] //grey } - if (samples.UDM2_LightHaze == 1) { + if (samples.haze_light == 1) { return [0, 0.9, 1, 1] //sky blue } - if (samples.UDM2_HeavyHaze == 1) { + if (samples.haze_heavy == 1) { return [1, 0.7, 1, 1] //light pink } - if (samples.UDM2_Cloud == 1) { + if (samples.cloud == 1) { return [0.7, 0.7, 0.7, 1] //white } else { diff --git a/planet_scope/false_color/README.md b/planet_scope/false_color/README.md index fe4e0f10..62899745 100644 --- a/planet_scope/false_color/README.md +++ b/planet_scope/false_color/README.md @@ -10,11 +10,11 @@ nav_exclude: true ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description -The [False color](https://en.wikipedia.org/wiki/False_color) infrared composite maps near-infrared spectral band B4 with red and green bands, B3 and B2, to [sRGB](https://en.wikipedia.org/wiki/SRGB) components directly. It is most commonly used to assess plant density and healht, as plants reflect near infrared and green light, while absorbing red. Since they reflect more near infrared than green, plant-covered land appears deep red. Denser plant growth is darker red. Cities and exposed ground are gray or tan, and water appears blue or black. +The [False color](https://en.wikipedia.org/wiki/False_color) infrared composite maps near-infrared spectral band `nir` with `red` and `green` bands to [sRGB](https://en.wikipedia.org/wiki/SRGB) components directly. It is most commonly used to assess plant density and healht, as plants reflect near infrared and green light, while absorbing red. Since they reflect more near infrared than green, plant-covered land appears deep red. Denser plant growth is darker red. Cities and exposed ground are gray or tan, and water appears blue or black. ## Description of representative images diff --git a/planet_scope/false_color/script.js b/planet_scope/false_color/script.js index d5ab860b..45fa6fee 100644 --- a/planet_scope/false_color/script.js +++ b/planet_scope/false_color/script.js @@ -3,11 +3,11 @@ function setup() { return { - input: ["NIR", "Green", "Blue"], + input: ["nir", "green", "blue"], output: { bands: 3 } }; } function evaluatePixel(sample) { - return [sample.NIR / 3000, sample.Green / 3000, sample.Blue / 3000]; + return [sample.nir / 3000, sample.green / 3000, sample.blue / 3000]; } \ No newline at end of file diff --git a/planet_scope/green_city/README.md b/planet_scope/green_city/README.md index 6264fbe2..ff8b6f23 100644 --- a/planet_scope/green_city/README.md +++ b/planet_scope/green_city/README.md @@ -10,7 +10,7 @@ nav_exclude: true ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description of the script diff --git a/planet_scope/green_city/script.js b/planet_scope/green_city/script.js index 45bb0ac7..8b4b1036 100644 --- a/planet_scope/green_city/script.js +++ b/planet_scope/green_city/script.js @@ -3,15 +3,15 @@ Author of the script: Carlos Bentes */ // Normalized Difference Vegetation Index -var ndvi = (NIR - Red) / (NIR + Red); +var ndvi = (nir - red) / (nir + red); // Threshold for vegetation var veg_th = 0.4; // Simple RGB -var R = Red / 3000; -var G = Green / 3000; -var B = Blue / 3000; +var R = red / 3000; +var G = green / 3000; +var B = blue / 3000; // Transform to Black and White var Y = 0.2 * R + 0.7 * G + 0.1 * B; diff --git a/planet_scope/ndvi/README.md b/planet_scope/ndvi/README.md index ae3edf22..2d2026df 100644 --- a/planet_scope/ndvi/README.md +++ b/planet_scope/ndvi/README.md @@ -12,7 +12,7 @@ scripts: ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description @@ -22,7 +22,7 @@ The value range of the NDVI is -1 to 1. Negative values of NDVI (values approach The normalized difference vegetation index, abbreviated NDVI, is defined as -$$NDVI := \mathtt{Index}(NIR,RED) = \frac{NIR-RED}{NIR+RED}.$$ +$$NDVI := \mathtt{Index}(nir,red) = \frac{nir-red}{nir+red}.$$ This is an example script which can be used with EO Browser and is configured to return statistics in a format which can be used with the statistical info chart. For more information, see How Can I Configure My Layers For Statistical Information In EO Browser? diff --git a/planet_scope/ndvi/eob.js b/planet_scope/ndvi/eob.js index 7ef0ec1a..526a66fe 100644 --- a/planet_scope/ndvi/eob.js +++ b/planet_scope/ndvi/eob.js @@ -5,10 +5,10 @@ function setup() { return { input: [{ bands: [ - "Red", - "NIR", + "red", + "nir", "dataMask", - "UDM2_Clear" + "clear" ] }], output: [ @@ -21,9 +21,9 @@ function setup() { } function evaluatePixel(samples) { - let ndvi = (samples.NIR - samples.Red) / (samples.NIR + samples.Red); + let ndvi = (samples.nir - samples.red) / (samples.nir + samples.red); const indexVal = samples.dataMask === 1 ? ndvi : NaN; - const clear = samples.dataMask * samples.UDM2_Clear; + const clear = samples.dataMask * samples.clear; let id_default = colorBlend(ndvi, [0.0, 0.5, 1.0], [ @@ -35,7 +35,7 @@ function evaluatePixel(samples) { return { default: id_default, index: [indexVal], - eobrowserStats: [indexVal, samples.UDM2_Clear], + eobrowserStats: [indexVal, samples.clear], dataMask: [samples.dataMask], }; } diff --git a/planet_scope/ndvi/script.js b/planet_scope/ndvi/script.js index a5b5b18f..9c6e2247 100644 --- a/planet_scope/ndvi/script.js +++ b/planet_scope/ndvi/script.js @@ -1,5 +1,5 @@ //NDVI -var val = (NIR - Red) / (NIR + Red); +var val = (nir - red) / (nir + red); return colorBlend(val, [0.0, 0.5, 1.0], diff --git a/planet_scope/ndwi/README.md b/planet_scope/ndwi/README.md index d43b9439..2bec61ec 100644 --- a/planet_scope/ndwi/README.md +++ b/planet_scope/ndwi/README.md @@ -10,13 +10,13 @@ nav_exclude: true ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description of the script The NDWI is useful for water body mapping, as water bodies strongly absorb light in visible to infrared electromagnetic spectrum. NDWI uses green and near infrared bands to highlight water bodies. It is sensitive to built-up land and can result in over-estimation of water bodies. -$$NDWI = \frac{Green-NIR}{Green+NIR}.$$ +$$NDWI = \frac{green-nir}{green+nir}.$$ Values description: Index values greater than 0.5 usually correspond to water bodies. Vegetation usually corresponds to much smaller values and built-up areas to values between zero and 0.2. diff --git a/planet_scope/ndwi/script.js b/planet_scope/ndwi/script.js index e4ce59a8..dcc0e2d3 100644 --- a/planet_scope/ndwi/script.js +++ b/planet_scope/ndwi/script.js @@ -1,6 +1,6 @@ //NDWI -var val = (Green / 3000 - NIR / 3000) / (Green / 3000 + NIR / 3000); +var val = (green / 3000 - nir / 3000) / (green / 3000 + nir / 3000); return colorBlend(val, [-1, -0.5, -0.2, 0, 0.2, 0.5, 1.0], diff --git a/planet_scope/planet_scope.md b/planet_scope/planet_scope.md index 6143ead3..a20aec1c 100644 --- a/planet_scope/planet_scope.md +++ b/planet_scope/planet_scope.md @@ -15,31 +15,31 @@ permalink: /planet/planetscope/ The spectral bands of PlanetScope data are the following if you order a 4-band product bundle: -- *B1 - Blue, resolution 3m* +- *blue - Blue, resolution 3m* -- *B2 - Green, resolution 3m* +- *green - Green, resolution 3m* -- *B3 - Red, resolution 3m* +- *red - Red, resolution 3m* -- *B4 - Near Infrared, resolution 3m* +- *nir - Near Infrared, resolution 3m* The spectral bands of PlanetScope data are the following if you order a 8-band product bundle: -- *B1 - Coastal Blue, resolution 3m* +- *coastal_blue - Coastal Blue, resolution 3m* -- *B2 - Blue, resolution 3m* +- *blue - Blue, resolution 3m* -- *B3 - Green I, resolution 3m* +- *green_i - Green I, resolution 3m* -- *B4 - Green, resolution 3m* +- *green - Green, resolution 3m* -- *B5 - Yellow, resolution 3m* +- *yellow - Yellow, resolution 3m* -- *B6 - Red, resolution 3m* +- *red - Red, resolution 3m* -- *B7 - Red Edge, resolution 3m* +- *rededge - Red Edge, resolution 3m* -- *B8 - Near-infrared, resolution 3m* +- *nir - Near-infrared, resolution 3m* diff --git a/planet_scope/true_color/README.md b/planet_scope/true_color/README.md index f6b32cb6..96cc7052 100644 --- a/planet_scope/true_color/README.md +++ b/planet_scope/true_color/README.md @@ -10,11 +10,11 @@ nav_exclude: true ## Evaluate and visualize -As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As PlanetScope is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description -The true color product maps PlanetScope band values B3, B2, and B1 which roughly correspond to red, green, and blue part of the spectrum, respectively, to R, G, and B components. +The true color product maps PlanetScope band values `red`, `green`, and `blue` which roughly correspond to red, green, and blue part of the spectrum, respectively, to R, G, and B components. ## Description of representative images diff --git a/planet_scope/true_color/script.js b/planet_scope/true_color/script.js index 4b5a63c3..21592466 100644 --- a/planet_scope/true_color/script.js +++ b/planet_scope/true_color/script.js @@ -3,11 +3,11 @@ function setup() { return { - input: ["Blue", "Green", "Red"], + input: ["blue", "green", "red"], output: { bands: 3 } }; } function evaluatePixel(sample) { - return [sample.Red / 3000, sample.Green / 3000, sample.Blue / 3000]; + return [sample.red / 3000, sample.green / 3000, sample.blue / 3000]; } diff --git a/skysat/ndvi/README.md b/skysat/ndvi/README.md index 678202c8..9a5abb65 100644 --- a/skysat/ndvi/README.md +++ b/skysat/ndvi/README.md @@ -10,7 +10,7 @@ nav_exclude: true ## Evaluate and visualize -As SkySat is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials. +As SkySat is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. ## General description @@ -20,7 +20,7 @@ The value range of the NDVI is -1 to 1. Negative values of NDVI (values approach The normalized difference vegetation index, abbreviated NDVI, is defined as -$$NDVI := \mathtt{Index}(NIR,Red) = \frac{NIR-RED}{NIR+Red}.$$ +$$NDVI := \mathtt{Index}(nir,red) = \frac{nir-red}{nir+red}.$$ The result is visualized using the `valueInterpolate` function. It maps the values of the NDVI in certain intervals to RGBA (RGB+Alpha) values for visualization. diff --git a/skysat/ndvi/script.js b/skysat/ndvi/script.js index 59879ac7..d3ddf517 100644 --- a/skysat/ndvi/script.js +++ b/skysat/ndvi/script.js @@ -1,13 +1,13 @@ //VERSION=3 function setup() { return { - input: ["Red", "NIR", "dataMask"], + input: ["red", "nir", "dataMask"], output: { bands: 4 } } } var f = 10000 function evaluatePixel(sample) { - var NDVI = index(sample.NIR, sample.Red) + var NDVI = index(sample.nir, sample.red) return valueInterpolate(NDVI, [0, 0.2, 0.3, 0.4, 0.5, 1.0], [ diff --git a/skysat/panchromatic/script.js b/skysat/panchromatic/script.js index 3022ea80..56068038 100644 --- a/skysat/panchromatic/script.js +++ b/skysat/panchromatic/script.js @@ -3,11 +3,11 @@ function setup() { return { - input: ["PAN", "dataMask"], + input: ["pan", "dataMask"], output: { bands: 4 } } } var f = 10000 function evaluatePixel(sample) { - return [sample.PAN / f, sample.PAN / f, sample.PAN / f, sample.dataMask] + return [sample.pan / f, sample.pan / f, sample.pan / f, sample.dataMask] } diff --git a/skysat/skysat.md b/skysat/skysat.md index 6120f523..f346c6f4 100644 --- a/skysat/skysat.md +++ b/skysat/skysat.md @@ -12,15 +12,15 @@ permalink: /planet/skysat/ The spectral bands of SkySat data are the following: -*Blue - 450-515 nm, resolution 0.5m* +*blue - 450-515 nm, resolution 0.5m* -*Green - 515-595 nm, resolution 0.5m* +*green - 515-595 nm, resolution 0.5m* -*Red - 605-695 nm, resolution 0.5m* +*red - 605-695 nm, resolution 0.5m* -*NIR - 740-900 nm Near Infrared, resolution 0.5m* +*nir - 740-900 nm Near Infrared, resolution 0.5m* -*Pan - 450-900nm Panchromatic, resolution 0.5* +*pan - 450-900nm Panchromatic, resolution 0.5* - [True Color](/skysat/true_color) - [Panchromatic](/skysat/panchromatic) diff --git a/skysat/true_color/README.md b/skysat/true_color/README.md index d2deac7f..0df24668 100644 --- a/skysat/true_color/README.md +++ b/skysat/true_color/README.md @@ -14,7 +14,7 @@ As SkySat is commercial data, brought into Sentinel Hub as Bring Your Own Data, ## General description -The true color product combines Skysat band values Red, Blue, and Green to create a true color image. +The true color product combines Skysat band values `red`, `blue`, and `green` to create a true color image. ## Description of representative images diff --git a/skysat/true_color/script.js b/skysat/true_color/script.js index dcd97551..0f76e540 100644 --- a/skysat/true_color/script.js +++ b/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] }