You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: bookdown/09-functions.Rmd
+45
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ These functions use *USGS Landsat Surface Reflectance Tier 1* data sets. They ma
15
15
## Functions
16
16
17
17
+**[buildSRcollection]** - Builds an annual cloud and cloud shadow masked medoid composite of Landsat surface reflectance TM-equivalent bands 1,2,3,4,5,7. This collection can be useful outside of use by LandTrendr, but is also the base for creating the input collection for LandTrendr.
18
+
+**[buildClearPixelCountCollection]** - `buildSRcollection` builds an annual surface reflectance collection potentially many images in a given year. It can be helpful to know how many pixels were available to generate the annual composite images. This function returns the count of unmasked pixels per year that are available for compositing for the provided years and date ranges.
18
19
+**[transformSRcollection]** - Transforms the images within an annual surface reflectance collection built by `buildSRcollection` to a list of provided indices or bands.
19
20
+**[buildLTcollection]** - Builds a collection as input to LandTrendr. It will prepare a collection where the first band is the spectral index to base temporal segmentation on, and the subsequent bands will be fitted to segmentation structure of the segmentation index.
20
21
+**[collectionToBandStack]** - Transforms an image collection into an image stack where each band of each image in the collection is concatentated as a band into a single image. Useful for mapping a function over a collection, like transforming surface reflectance to NDVI, and then transforming the resulting collection into a band sequential time series image stack.
+**startYear (Integer)**: The minimum year in the desired range of annual collection
82
+
+**endYear (Integer)**: The maximum year in the desired range of annual collection
83
+
+**startDay (String | month day formatted as 'mm-dd')**: The minimum date in the desired seasonal range over which to generate annual composite.
84
+
+**endDay (String | month day formatted as 'mm-dd')**: The maximum date in the desired seasonal range over which to generate annual composite.
85
+
+**aoi (Geometry)**: The area-of-interest over which to mosaic images
86
+
+**maskThese (List of strings | deafault: ['cloud', 'shadow', 'snow'])**: A list of CFMASK mask classes to include as masked
87
+
88
+
*Result:*
89
+
90
+
An ee.ImageCollection that includes one single band image per year in the provided year range that represents the number of unmasked pixels available for compositing given the date range and mask classes to include as masked pixels.
91
+
92
+
*Example:*
93
+
94
+
```
95
+
// load the LandTrendr.js module
96
+
var ltgee = require('users/emaprlab/public:Modules/LandTrendr.js');
97
+
98
+
// define parameters
99
+
var startYear = 1985;
100
+
var endYear = 2017;
101
+
var startDay = '06-20';
102
+
var endDay = '09-20';
103
+
var aoi = ee.Geometry.Point(-122.8848, 43.7929);
104
+
var maskThese = ['cloud', 'shadow', 'snow']
105
+
106
+
// center and zoom the display in case outputs are to be mapped
107
+
Map.centerObject(aoi,10);
108
+
Map.addLayer(aoi);
109
+
110
+
// apply LandTrendr.js functions
111
+
var nClearCollection = buildClearPixelCountCollection(startYear, endYear, startDay, endDay, aoi, maskThese);
Copy file name to clipboardexpand all lines: bookdown/14-updates.Rmd
+1-1
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ If you have questions or find that updates introduce errors, please post an issu
4
4
5
5
## 2018-10-09
6
6
7
-
+ Added the option to define the CFMASK classes to include in the image mask to functions [buildSRcollection](./shortcut-functions.html#buildsrcollection) and [runLT](./shortcut-functions.html#runlt). The default is ['cloud', 'shadow', 'snow']
7
+
+ Added the option to define the CFMASK classes to include in the image mask to functions [buildSRcollection](./shortcut-functions.html#buildsrcollection) and [runLT](./shortcut-functions.html#runlt). The default is ['cloud', 'shadow', 'snow']. Also added the function [buildClearPixelCountCollection](./shortcut-functions.html#buildclearpixelcountcollection), which returns the count of unmasked pixels per year that are available for compositing for the provided years and date ranges.
0 commit comments