-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy path07-example-scripts.Rmd
94 lines (54 loc) · 3.95 KB
/
07-example-scripts.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Example Scripts {#example-scripts}
These example scripts rely on the [LT-GEE API](./api.html), which needs to be added to your Google Earth Engine
script library before running the scripts. To add the API, click this [link](https://code.earthengine.google.com/?accept_repo=users/emaprlab/public).
See the [API reference](./api.html#functions) to find more functionality for building image collections and dealing
with LandTrendr outputs.
## Change mapping
Change events can be extracted and mapped from LandTrendr's segmented line vertices.
Information regarding the year of change event detection, magnitude of change, duration
of change, and pre-change event spectral data can all be mapped. These change mapping
script examples use the same LT-GEE API functions as the GEE APP [UI LandTrendr Change Mapper](https://emaprlab.users.earthengine.app/view/lt-gee-change-mapper). Use it to help parameterize
the script and explore outputs before committing to downloading data to Google Drive.
<img src='imgs/yod_mapped.png'>
### Map vegetation loss
In this example we'll map the greatest vegetation loss segment and display the year of change detection
and the magnitude of the change. Additionally, we'll write the change attributes as GeoTiff files to
your Google Drive account.
[Example script](https://code.earthengine.google.com/3bf818e88952e4f84c4fac90c3ea3672)
*GEE path*: users/emaprlab/public:Scripts/LandTrendr Examples/LandTrendr Greatest Disturbance Mapping
### Map vegetation gain
In this example we'll map the greatest vegetation gain segment and display the year of change detection
and the magnitude of the change. Additionally, we'll write the change attributes as GeoTiff files to
your Google Drive account.
[Example script](https://code.earthengine.google.com/f03606979139787c0c18f4efeeed76d6)
*GEE path*: users/emaprlab/public:Scripts/LandTrendr Examples/LandTrendr Greatest Growth Mapping
<!--
## Build an annual segmented time series stack of a spectral index
## Short-form
###
## Long-form
## Exploration and parameterization
LandTrendr can be run in point mode to visualize the segmentation for a pixel.
This is really useful for quickly testing the performance of various parameter
settings and spectral indices, as well as simply viewing and interpreting change
in the x-y space of time and spectral value for both the source and LandTrendr
trajectory-fitted data. We recommend starting here to understand how best to set parameters for your mapping project.
<img src='imgs/time_series.png'>
[Example script](https://code.earthengine.google.com/b9f49519ae005158849b1b4fef5d8cc2)
*GEE path*: users/emaprlab/public:Scripts/LandTrendr Examples/LandTrendr Pixel Time Series Plotter
## Data generation
LandTrendr can be run in a data generation mode where every pixel time series
within the bounds of a given region is segmented and a data cube containing
the segmented line structure and trajectory-fitted time series stack is returned.
The results are the basic building blocks for historical landscape state and change mapping. Before generating data cubes, it is best to explore and parameterize LT-GEE using the 1st example script.
<img src='imgs/stack.gif'>
[Example script](https://code.earthengine.google.com/558d02b2fb53b1cdc8089a2084e11678)
*GEE path*: users/emaprlab/public:Scripts/LandTrendr Examples/LandTrendr Vertex and Fitted Data Generation
## Change mapping
Change events can be extracted and mapped from LandTrendr's segmented line vertices.
Information regarding the year of change event detection, magnitude of change, duration
of change, and pre-change event spectral data can all be mapped. In this example we take the data cube generated in the previous example and extract the greatest disturbance per pixel in a region.
<img src='imgs/yod_mapped.png'>
[Example script](https://code.earthengine.google.com/03eed078311c86e1c3b311150fe11780)
*GEE path*: users/emaprlab/public:Scripts/LandTrendr Examples/LandTrendr Greatest Disturbance Mapping
-->