Skip to content

Commit

Permalink
Merge pull request #328 from sentinel-hub/antoineDuc-patch-1
Browse files Browse the repository at this point in the history
Remove outdated script + fixing top nav
  • Loading branch information
jonasViehweger authored Nov 27, 2024
2 parents 59f6c7a + 6d5493d commit 83ee105
Show file tree
Hide file tree
Showing 86 changed files with 1,056 additions and 219 deletions.
15 changes: 0 additions & 15 deletions analysis_ready_planetscope/ndvi/raw.js

This file was deleted.

19 changes: 0 additions & 19 deletions analysis_ready_planetscope/true_color/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@ parent: Analysis Ready Planetscope
grand_parent: Planet
layout: script
nav_exclude: true
permalink: /analysis_ready_planetscope/cloud_mask_classification/
scripts:
- [Visualization, script.js]
- [Raw Value, raw.js]
examples:
- zoom: '16'
lat: '-31.95291'
lng: '116.17321'
datasetId: '3f605f75-86c4-411a-b4ae-01c896f0e54e'
fromTime: '2023-04-29T00:00:00.000Z'
toTime: '2023-04-29T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/analysis_ready_planetscope/cloud_mask_classification/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
---

The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see [here](https://community.planet.com/sentinel-hub-81/access-new-tools-for-analyzing-your-planet-data-on-sentinel-hub-732) on how to get access.

## General description
Analysis-Ready PlanetScope has several classifications within QA Band 1, “Cloud and shadow mask”. A value of 1 is clear, meaning that the surface is clearly visible. If it’s not clear, that means it’s classified as having some other type of contamination. In the script, each of the non-clear pixels in QA Band 1 are classified with a unique color, and the pixels that are clear are returned transparent.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@ parent: Analysis Ready Planetscope
grand_parent: Planet
layout: script
nav_exclude: true
permalink: /analysis_ready_planetscope/false_color/
scripts:
- [Visualization, script.js]
examples:
- zoom: '16'
lat: '-31.95291'
lng: '116.17321'
datasetId: '3f605f75-86c4-411a-b4ae-01c896f0e54e'
fromTime: '2023-04-29T00:00:00.000Z'
toTime: '2023-04-29T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/analysis_ready_planetscope/false_color/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
---

The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see [here](https://community.planet.com/sentinel-hub-81/access-new-tools-for-analyzing-your-planet-data-on-sentinel-hub-732) on how to get access.

## General description
The False color infrared composite maps near-infrared spectral band nir with red and green bands to sRGB components directly. It is most commonly used to assess plant density and health, 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ layout: default
title: Analysis Ready PlanetScope
nav_order: 2
parent: Planet
permalink: /planet/analysis_ready_planetscope/
---

# Analysis Ready PlanetScope
Analysis-Ready PlanetScope combines the monitoring benefits of daily 3 m spatial imagery, while enhancing temporal and spatial consistency with trusted, third-party data sources (Landsat, Sentinel-2, MODIS, VIIRS). This is accomplished with a proprietary algorithm that creates pre-processed, harmonized, and spatially consistent daily stacks of images that enable time-series analysis and machine learning applications. The resulting 4-band data is exceedingly radiometrically and geometrically accurate thanks to vast amounts of reference data in the Planet Archive. With deeper and more extensive pre-processing, data is more precise and pre-formatted for time-series analysis and machine learning applications. Draw on the powerful, cloud-based visualization and analytical tools in Sentinel Hub to work with data that's tailored to your specific area and time of interest. Limit storage and compute costs by working with only the data you need before delivering data to your preferred GIS, data science, remote sensing, or software environments via API or OGC streaming services.

### Indices

- [True Color](/analysis_ready_planetscope/true_color)
- [False Color](/analysis_ready_planetscope/false_color)
- [NDVI](/analysis_ready_planetscope/ndvi)
- [Cloud Classification](/analysis_ready_planetscope/cloud_mask_classification)
- [Cloud Masked True Color](/analysis_ready_planetscope/true_color_cloud_masked)
- [True Color]({% link planet/analysis_ready_planetscope/true_color/index.md %})
- [False Color]({% link planet/analysis_ready_planetscope/false_color/index.md %})
- [NDVI]({% link planet/analysis_ready_planetscope/ndvi/index.md %})
- [Cloud Classification]({% link planet/analysis_ready_planetscope/cloud_mask_classification/index.md %})
- [Cloud Masked True Color]({% link planet/analysis_ready_planetscope/true_color_cloud_masked/index.md %})
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@ parent: Analysis Ready Planetscope
grand_parent: Planet
layout: script
nav_exclude: true
permalink: /analysis_ready_planetscope/ndvi/
scripts:
- [Visualization, script.js]
- [EO Browser, eob.js]
- [Raw Values, raw.js]
examples:
- zoom: '16'
lat: '-31.95291'
lng: '116.17321'
datasetId: '3f605f75-86c4-411a-b4ae-01c896f0e54e'
fromTime: '2023-04-29T00:00:00.000Z'
toTime: '2023-04-29T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/analysis_ready_planetscope/nvdi/eob.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
---

The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see [here](https://community.planet.com/sentinel-hub-81/access-new-tools-for-analyzing-your-planet-data-on-sentinel-hub-732) on how to get access.

## General description
The well known and widely used NDVI is a simple, but effective index for quantifying green vegetation. It normalizes green leaf scattering in Near Infra-red wavelengths with chlorophyll absorption in red wavelengths. The value range of the NDVI is -1 to 1. Negative values of NDVI (values approaching -1) correspond to water. Values close to zero (-0.1 to 0.1) generally correspond to barren areas of rock, sand, or snow. Low, positive values represent shrub and grassland (approximately 0.2 to 0.4), while high values indicate temperate and tropical rainforests (values approaching 1).

Expand Down
15 changes: 15 additions & 0 deletions planet/analysis_ready_planetscope/ndvi/raw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//VERSION=3
// ndvi

function setup() {
return {
input: ["nir", "red", "dataMask"],
output: {
bands: 4,
},
};
}

function evaluatePixel(sample) {
return [(sample.nir - sample.red) / (sample.nir + sample.red)];
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

function setup() {
return {
input: ["nir", "red", "cloud_mask", "dataMask"],
input: ["nir", "red", "dataMask"],
output: {
bands: 4
}
Expand Down
33 changes: 33 additions & 0 deletions planet/analysis_ready_planetscope/true_color/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: True Color, Analysis Ready Planetscope
parent: Analysis Ready Planetscope
grand_parent: Planet
layout: script
nav_exclude: true
scripts:
- [Visualization, script.js]
examples:
- zoom: '16'
lat: '-31.95291'
lng: '116.17321'
datasetId: '3f605f75-86c4-411a-b4ae-01c896f0e54e'
fromTime: '2023-04-29T00:00:00.000Z'
toTime: '2023-04-29T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/analysis_ready_planetscope/true_color/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
---

The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see [here](https://community.planet.com/sentinel-hub-81/access-new-tools-for-analyzing-your-planet-data-on-sentinel-hub-732) on how to get access.

## General description
The true color product maps Analysis-Ready 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 image

A true color visualization of Des Moines, United States (April 2023)

![True Color of Des Moines](fig/fig1.png)
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@ parent: Analysis Ready Planetscope
grand_parent: Planet
layout: script
nav_exclude: true
permalink: /analysis_ready_planetscope/true_color_cloud_masked/
scripts:
- [Visualization, script.js]
examples:
- zoom: '16'
lat: '-31.95291'
lng: '116.17321'
datasetId: '3f605f75-86c4-411a-b4ae-01c896f0e54e'
fromTime: '2023-04-29T00:00:00.000Z'
toTime: '2023-04-29T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/analysis_ready_planetscope/true_color_cloud_masked/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
---

The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see [here](https://community.planet.com/sentinel-hub-81/access-new-tools-for-analyzing-your-planet-data-on-sentinel-hub-732) on how to get access.

## General description
The first QA Band, Cloud and shadow mask 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 bright cloud, shadow, haze, adjacent clouds, additional cloud shadow or haze, or other. The script masks out all pixels where band QA1 does not have a value of 1 or “clear”. The resulting image has values of zero set for all four surface reflectance bands where clouds, cloud contamination, shadows, snow, etc. have been detected.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: UDM2 Mask Classification, PlanetScope
parent: PlanetScope
grand_parent: Planet
layout: script
permalink: /planet_scope/cloud_classification/
nav_exclude: true
---

Expand Down
35 changes: 35 additions & 0 deletions planet/planetscope/cloud_classification/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//VERSION=3
//UDM2 Classification

function setup() {
return {
input: [
{
bands: ["clear", "snow", "shadow", "haze_light", "haze_heavy", "cloud"],
},
],
output: {
bands: 4,
},
};
}

function evaluatePixel(samples) {
if (samples.snow == 1) {
return [0, 0.5, 1, 1]; // blue
}
if (samples.shadow == 1) {
return [0.4, 0.4, 0.4, 1]; //grey
}
if (samples.haze_light == 1) {
return [0, 0.9, 1, 1]; //sky blue
}
if (samples.haze_heavy == 1) {
return [1, 0.7, 1, 1]; //light pink
}
if (samples.cloud == 1) {
return [0.7, 0.7, 0.7, 1]; //white
} else {
return [0, 0, 0, 0];
}
}
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Cloudless Mosaic, PlanetScope
parent: PlanetScope
grand_parent: Planet
layout: script
permalink: /planet_scope/cloudless_mosaic/
nav_exclude: true
scripts:
- [Visualization, script.js]
Expand Down
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: False color infrared product, PlanetScope
parent: PlanetScope
grand_parent: Planet
layout: script
permalink: /planet_scope/false_color/
nav_exclude: true
examples:
- zoom: '16'
Expand All @@ -14,7 +13,7 @@ examples:
toTime: '2023-04-19T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet_scope/false_color/script.js
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/planetscope/false_color/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
Expand Down
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Green City Script, PlanetScope
parent: PlanetScope
grand_parent: Planet
layout: script
permalink: /planet_scope/green_city/
nav_exclude: true
examples:
- zoom: '16'
Expand All @@ -14,7 +13,7 @@ examples:
toTime: '2023-04-19T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet_scope/green_city/script.js
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/planetscope/green_city/script.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions planet_scope/planet_scope.md → planet/planetscope/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ The spectral bands of PlanetScope data are the following if you order a 8-band p

### Indices

- [True Color](/planet_scope/true_color)
- [False Color](/planet_scope/false_color)
- [Cloudless Mosaic](/planet_scope/cloudless_mosaic)
- [NDVI](/planet_scope/ndvi)
- [Maximum NDVI](/planet_scope/max_ndvi)
- [NDVI Difference](/planet_scope/ndvi_difference)
- [NDWI](/planet_scope/ndwi)
- [NDCI - Normalized Difference Chlorophyll Index](/planet_scope/ndci)
- [NDRE - Normalized Difference Red Edge Index](/planet_scope/ndre)
- [Green City](/planet_scope/green_city)
- [UDM2 Cloud/Snow Classification](/planet_scope/cloud_classification)
- [True Color]({% link planet/planetscope/true_color/index.md %})
- [False Color]({% link planet/planetscope/false_color/index.md %})
- [Cloudless Mosaic]({% link planet/planetscope/cloudless_mosaic/index.md %})
- [NDVI]({% link planet/planetscope/ndvi/index.md %})
- [Maximum NDVI]({% link planet/planetscope/max_ndvi/index.md %})
- [NDVI Difference]({% link planet/planetscope/ndvi_difference/index.md %})
- [NDWI]({% link planet/planetscope/ndwi/index.md %})
- [NDCI - Normalized Difference Chlorophyll Index]({% link planet/planetscope/ndci/index.md %})
- [NDRE - Normalized Difference Red Edge Index]({% link planet/planetscope/ndre/index.md %})
- [Green City]({% link planet/planetscope/green_city/index.md %})
- [UDM2 Cloud/Snow Classification]({% link planet/planetscope/cloud_classification/index.md %})
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: 'Max Multitemporal NDVI'
parent: Planetscope
grand_parent: Planet
layout: script
permalink: /planet_scope/max_ndvi/
nav_exclude: true
scripts:
- - Visualization
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Normalized difference chlorophyll index, PlanetScope
parent: PlanetScope
grand_parent: Planet
layout: script
permalink: /planet_scope/ndci/
nav_exclude: true
scripts:
- [Visualization, script.js]
Expand All @@ -17,7 +16,7 @@ examples:
toTime: '2023-04-19T23:59:59.999Z'
platform:
- EOB
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet_scope/ndci/eob.js
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/planet/planetscope/ndci/eob.js
additionalQueryParams:
- - themeId
- PLANET_SANDBOX
Expand Down
18 changes: 18 additions & 0 deletions planet/planetscope/ndci/raw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//VERSION=3
//PlanetScope NDRE

function setup() {
return {
input: [
{
bands: ["red", "rededge", "dataMask"],
},
],
output: { id: "default", bands: 1, sampleType: "FLOAT32" },
};
}

function evaluatePixel(sample) {
let ndci = index(sample.rededge, sample.red);
return [ndci];
}
Loading

0 comments on commit 83ee105

Please sign in to comment.