Skip to content

Commit a2403c6

Browse files
authored
Update readme
1 parent 5b27a22 commit a2403c6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ function to exclude the given image(s).</p>
137137
<dt><a href="#addNdvi">addNdvi(img)</a> > <code>ee.Image</code></dt>
138138
<dd><p>Adds NDVI transformation as a band (&#39;ndvi&#39;) to the input image.</p>
139139
</dd>
140+
<dt><a href="#addTc">addTc(img)</a> > <code>ee.Image</code></dt>
141+
<dd><p>Adds Tasseled Cap indices brightness (&#39;tcb&#39;), greenness (&#39;tcg&#39;), yellowness
142+
(&#39;tcy&#39;), and angle (&#39;tca&#39;) to the input image. See <a href="https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1160&amp;context=lars_symp">Kauth and Thomas, 1976</a></p>
143+
</dd>
140144
<dt><a href="#addQaMask">addQaMask(img)</a> > <code>ee.Image</code></dt>
141145
<dd><p>Adds the &#39;BQA&#39; quality band as mask band (&#39;BQA_mask&#39;) indicating good (1) and
142146
bad (0) pixels. <a href="https://www.usgs.gov/land-resources/nli/landsat/landsat-collection-1-level-1-quality-assessment-band">Learn more about the &#39;BQA&#39; band</a>.</p>
@@ -449,6 +453,32 @@ var mssToaCol = mssDnCol.map(msslib.calcToa);
449453
// Add NDVI band to each image in a collection.
450454
var mssToaColNdvi = mssToaCol.map(msslib.addNdvi);
451455
```
456+
<a name="addTc"></a>
457+
458+
### addTc(img) > <code>ee.Image</code>
459+
Adds Tasseled Cap indices brightness ('tcb'), greenness ('tcg'), yellowness
460+
('tcy'), and angle ('tca') to the input image. See [Kauth and Thomas, 1976](https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1160&context=lars_symp)
461+
462+
**Kind**: global function
463+
464+
| Param | Type | Description |
465+
| --- | --- | --- |
466+
| img | <code>ee.Image</code> | MSS image originating from the `msslib.getCol()` function. It is recommended that the image be in units of radiance or TOA reflectance (see `msslib.calcRad()` and `msslib.calcToa()`). |
467+
468+
**Example**
469+
```js
470+
// Get an MSS image collection.
471+
var mssDnCol = msslib.getCol({
472+
aoi: ee.Geometry.Point([-122.239, 44.018]),
473+
doyRange: [170, 240]
474+
});
475+
476+
// Convert DN to TOA for all images in a collection.
477+
var mssToaCol = mssDnCol.map(msslib.calcToa);
478+
479+
// Add Tasseled Cap bands to each image in a collection.
480+
var mssToaColTc = mssToaCol.map(msslib.addTc);
481+
```
452482
<a name="addQaMask"></a>
453483

454484
### addQaMask(img) > <code>ee.Image</code>

0 commit comments

Comments
 (0)