-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
477e40f
commit b2f1172
Showing
82 changed files
with
20,559 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 6c5c54cc8b9046fdec8a2676e1be8d63 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Activities | ||
|
||
This book includes remote sensing analyses in both `JavaScript` and `Python`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Javascript | ||
|
||
The purpose of this lesson is to review the change from leaf-off imagery to leaf-on imagery for a study areas of interest. | ||
|
||
In this lesson, you will: | ||
|
||
* Choose an area and Landsat collection of interest; | ||
* Filter the Landsat collection to obtain leaf-off and leaf-on imagery; and, | ||
* Display a single image from both leaf-off and leaf-on conditions. | ||
|
||
## Data Acquisition & Pre-Processing | ||
```{code-block} javascript | ||
// Define boundary for Rocky Mountain National Park, Colorado | ||
var rmnp_boundary = ee.FeatureCollection("users/calekochenour/Rocky_Mountain_National_Park__Boundary_Polygon"); | ||
// Define Landsat 8 collection | ||
var landsat8_t1_sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR'); | ||
// Filter Landsat 8 Tier 1 SR to snow-on conditions near RMNP, 2018 | ||
var co_snow_on_2018 = landsat8_t1_sr | ||
.filterDate('2018-03-01', '2018-04-30') | ||
.filterBounds(rmnp_boundary) | ||
.sort('CLOUD_COVER') | ||
.first(); | ||
// Filter Landsat 8 Tier 1 SR to snow-off conditions near RMNP, 2018 | ||
var co_snow_off_2018 = landsat8_t1_sr | ||
.filterDate('2018-07-01', '2018-08-31') | ||
.filterBounds(rmnp_boundary) | ||
.sort('CLOUD_COVER') | ||
.first(); | ||
``` | ||
|
||
## Data Processing | ||
```{code-block} javascript | ||
// No data processsing in this lab. | ||
``` | ||
|
||
## Data Visualization | ||
```{code-block} javascript | ||
// Define Landsat 8 RGB visualization parameters | ||
var l8_vis_params_rgb = { | ||
'bands': ['B4', 'B3', 'B2'], | ||
'min': 0, | ||
'max': 3000 | ||
}; | ||
// Define Landsat 8 CIR visualization parameters | ||
var l8_vis_params_cir = { | ||
'bands': ['B5', 'B4', 'B3'], | ||
'min': 0, | ||
'max': 3000 | ||
}; | ||
// Define RMNP boundary visualization parameters | ||
var empty = ee.Image().byte(); | ||
var rmnp_boundary_vis = empty.paint({ | ||
featureCollection: rmnp_boundary, | ||
color: 1, | ||
width: 3 | ||
}); | ||
``` | ||
|
||
```{code-block} javascript | ||
// Center map to Rocky Mountain National Park, Colorado | ||
Map.setCenter(-105.6836, 40.3428, 10); | ||
// Add snow-on and snow-off images to map, RGB and CIR | ||
Map.addLayer( | ||
rmnp_snow_on_2018, | ||
l8_vis_params_rgb, | ||
'Landsat 8 - RGB - 2018 - RMNP - Snow On'); | ||
Map.addLayer( | ||
rmnp_snow_on_2018, | ||
l8_vis_params_cir, | ||
'Landsat 8 - CIR - 2018 - RMNP - Snow On'); | ||
Map.addLayer( | ||
rmnp_snow_off_2018, | ||
l8_vis_params_rgb, | ||
'Landsat 8 - RGB - 2018 - RMNP - Snow Off'); | ||
Map.addLayer( | ||
rmnp_snow_off_2018, | ||
l8_vis_params_cir, | ||
'Landsat 8 - CIR - 2018 - RMNP - Snow Off'); | ||
// Add RMNP boundary to map | ||
Map.addLayer( | ||
rmnp_boundary_vis, | ||
{'palette': 'FF0000'}, | ||
'RMNP Boundary'); | ||
``` | ||
|
||
## Data Export | ||
```{code-block} javascript | ||
// No data export in this lab. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# Python | ||
|
||
The purpose of this lesson is to review the change from leaf-off imagery to leaf-on imagery for a study areas of interest. | ||
|
||
In this lesson, you will: | ||
|
||
* Choose an area and Landsat collection of interest; | ||
* Filter the Landsat collection to obtain leaf-off and leaf-on imagery; and, | ||
* Display a single image from both leaf-off and leaf-on conditions. | ||
|
||
## Environment Setup | ||
```{code-block} python | ||
# Import packages | ||
import ee | ||
import geemap as gm | ||
# Initialze GEE Python API; authenticate if necessary | ||
try: | ||
ee.Initialize() | ||
except Exception as error: | ||
ee.Authenticate() | ||
ee.Initialize() | ||
``` | ||
|
||
## Data Acquisition & Pre-Processing | ||
```{code-block} python | ||
# Define boundary for Rocky Mountain National Park, Colorado | ||
rmnp_boundary = ee.FeatureCollection( | ||
"users/calekochenour/Rocky_Mountain_National_Park__Boundary_Polygon") | ||
# Define Landsat 8 collection | ||
landsat8_t1_sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR') | ||
# Filter Landsat 8 Tier 1 SR to snow-on conditions near RMNP, 2018 | ||
co_snow_on_2018 = landsat8_t1_sr.filterDate( | ||
'2018-03-01', '2018-04-30').filterBounds( | ||
rmnp_boundary).sort('CLOUD_COVER').first() | ||
# Filter Landsat 8 Tier 1 SR to snow-off conditions near RMNP, 2018 | ||
co_snow_off_2018 = landsat8_t1_sr.filterDate( | ||
'2018-07-01', '2018-08-31').filterBounds( | ||
rmnp_boundary).sort('CLOUD_COVER').first() | ||
# Clip snow-on and snow-off imagery to RMNP boundary | ||
rmnp_snow_on_2018 = co_snow_on_2018.clip(rmnp_boundary) | ||
rmnp_snow_off_2018 = co_snow_off_2018.clip(rmnp_boundary) | ||
``` | ||
|
||
## Data Processing | ||
```{code-block} python | ||
# No data processing in this lab. | ||
``` | ||
|
||
## Data Visualization | ||
```{code-block} python | ||
# Define Landsat 8 RGB visualization parameters | ||
l8_vis_params_rgb = { | ||
'bands': ['B4', 'B3', 'B2'], | ||
'min': 0, | ||
'max': 3000 | ||
} | ||
# Define Landsat 8 CIR visualization parameters | ||
l8_vis_params_cir = { | ||
'bands': ['B5', 'B4', 'B3'], | ||
'min': 0, | ||
'max': 3000 | ||
} | ||
# Define RMNP boundary visualization parameters | ||
empty = ee.Image().byte() | ||
rmnp_boundary_vis = empty.paint( | ||
featureCollection=rmnp_boundary, color=1, width=3) | ||
``` | ||
|
||
```{code-block} python | ||
# Create map for visualization | ||
rmnp_snow_map = gm.Map() | ||
rmnp_snow_map.setOptions('SATELLITE') | ||
# Center map to Rocky Mountain National Park, Colorado | ||
rmnp_snow_map.setCenter(-105.6836, 40.3428, 10) | ||
``` | ||
|
||
```{code-block} python | ||
# Add snow-on and snow-off images to map, RGB and CIR | ||
rmnp_snow_map.addLayer( | ||
rmnp_snow_on_2018, | ||
l8_vis_params_rgb, | ||
'Landsat 8 - RGB - 2018 - Snow On') | ||
rmnp_snow_map.addLayer( | ||
rmnp_snow_on_2018, | ||
l8_vis_params_cir, | ||
'Landsat 8 - CIR - 2018 - Snow On') | ||
rmnp_snow_map.addLayer( | ||
rmnp_snow_off_2018, | ||
l8_vis_params_rgb, | ||
'Landsat 8 - RGB - 2018 - Snow Off') | ||
rmnp_snow_map.addLayer( | ||
rmnp_snow_off_2018, | ||
l8_vis_params_cir, | ||
'Landsat 8 - CIR - 2018 - Snow Off') | ||
# Add RMNP boundary to map | ||
rmnp_snow_map.addLayer( | ||
rmnp_boundary_vis, | ||
{'palette': 'FF0000'}, | ||
'RMNP Boundary') | ||
``` | ||
|
||
```{code-block} python | ||
# Display map | ||
rmnp_snow_map | ||
``` | ||
|
||
## Data Export | ||
```{code-block} python | ||
# No data export in this lab. | ||
``` |
Oops, something went wrong.