ship detection

This commit is contained in:
Ollie Ballinger
2022-12-27 11:59:44 +00:00
parent 7082872429
commit ad74d1fef0
106 changed files with 7423 additions and 5642 deletions

View File

@@ -290,69 +290,44 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#programming-basics" id="toc-programming-basics" class="nav-link active" data-scroll-target="#programming-basics"><span class="toc-section-number">4</span> Programming Basics</a>
<li><a href="#programming-basics" id="toc-programming-basics" class="nav-link active" data-scroll-target="#programming-basics"><span class="toc-section-number">3.1</span> Programming Basics</a>
<ul class="collapse">
<li><a href="#getting-started-in-the-code-editor" id="toc-getting-started-in-the-code-editor" class="nav-link" data-scroll-target="#getting-started-in-the-code-editor"><span class="toc-section-number">4.1</span> Getting Started in&nbsp;the Code Editor</a></li>
<li><a href="#javascript-basics" id="toc-javascript-basics" class="nav-link" data-scroll-target="#javascript-basics"><span class="toc-section-number">4.2</span> JavaScript Basics</a>
<ul class="collapse">
<li><a href="#variables" id="toc-variables" class="nav-link" data-scroll-target="#variables">Variables</a></li>
<li><a href="#lists" id="toc-lists" class="nav-link" data-scroll-target="#lists">Lists</a></li>
<li><a href="#objects" id="toc-objects" class="nav-link" data-scroll-target="#objects">Objects</a></li>
<li><a href="#functions" id="toc-functions" class="nav-link" data-scroll-target="#functions">Functions</a></li>
<li><a href="#comments" id="toc-comments" class="nav-link" data-scroll-target="#comments"><span class="toc-section-number">4.2.1</span> Comments</a></li>
</ul></li>
<li><a href="#earth-engine-api-basics" id="toc-earth-engine-api-basics" class="nav-link" data-scroll-target="#earth-engine-api-basics"><span class="toc-section-number">4.3</span> Earth Engine API Basics</a></li>
<li><a href="#getting-started-in-the-code-editor" id="toc-getting-started-in-the-code-editor" class="nav-link" data-scroll-target="#getting-started-in-the-code-editor"><span class="toc-section-number">3.1.1</span> Getting Started in&nbsp;the Code Editor</a></li>
<li><a href="#javascript-basics" id="toc-javascript-basics" class="nav-link" data-scroll-target="#javascript-basics"><span class="toc-section-number">3.1.2</span> JavaScript Basics</a></li>
<li><a href="#earth-engine-api-basics" id="toc-earth-engine-api-basics" class="nav-link" data-scroll-target="#earth-engine-api-basics"><span class="toc-section-number">3.1.3</span> Earth Engine API Basics</a></li>
<li><a href="#conclusion" id="toc-conclusion" class="nav-link" data-scroll-target="#conclusion">Conclusion</a></li>
</ul></li>
<li><a href="#exploring-images" id="toc-exploring-images" class="nav-link" data-scroll-target="#exploring-images"><span class="toc-section-number">5</span> Exploring Images</a>
<li><a href="#exploring-images" id="toc-exploring-images" class="nav-link" data-scroll-target="#exploring-images"><span class="toc-section-number">3.2</span> Exploring Images</a>
<ul class="collapse">
<li><a href="#accessing-an-image" id="toc-accessing-an-image" class="nav-link" data-scroll-target="#accessing-an-image"><span class="toc-section-number">5.1</span> Accessing&nbsp;an Image</a></li>
<li><a href="#visualizing-an-image" id="toc-visualizing-an-image" class="nav-link" data-scroll-target="#visualizing-an-image"><span class="toc-section-number">5.2</span> Visualizing an Image</a></li>
<li><a href="#true-color-composites" id="toc-true-color-composites" class="nav-link" data-scroll-target="#true-color-composites"><span class="toc-section-number">5.3</span> True-Color Composites</a></li>
<li><a href="#false-color-composites" id="toc-false-color-composites" class="nav-link" data-scroll-target="#false-color-composites"><span class="toc-section-number">5.4</span> False-Color Composites</a></li>
<li><a href="#attributes-of-locations" id="toc-attributes-of-locations" class="nav-link" data-scroll-target="#attributes-of-locations"><span class="toc-section-number">5.5</span> Attributes of Locations</a></li>
<li><a href="#abstract-rgb-composites" id="toc-abstract-rgb-composites" class="nav-link" data-scroll-target="#abstract-rgb-composites"><span class="toc-section-number">5.6</span> Abstract RGB Composites &nbsp;</a></li>
<li><a href="#accessing-an-image" id="toc-accessing-an-image" class="nav-link" data-scroll-target="#accessing-an-image"><span class="toc-section-number">3.2.1</span> Accessing&nbsp;an Image</a></li>
<li><a href="#visualizing-an-image" id="toc-visualizing-an-image" class="nav-link" data-scroll-target="#visualizing-an-image"><span class="toc-section-number">3.2.2</span> Visualizing an Image</a></li>
<li><a href="#true-color-composites" id="toc-true-color-composites" class="nav-link" data-scroll-target="#true-color-composites"><span class="toc-section-number">3.2.3</span> True-Color Composites</a></li>
<li><a href="#false-color-composites" id="toc-false-color-composites" class="nav-link" data-scroll-target="#false-color-composites"><span class="toc-section-number">3.2.4</span> False-Color Composites</a></li>
<li><a href="#attributes-of-locations" id="toc-attributes-of-locations" class="nav-link" data-scroll-target="#attributes-of-locations"><span class="toc-section-number">3.2.5</span> Attributes of Locations</a></li>
<li><a href="#abstract-rgb-composites" id="toc-abstract-rgb-composites" class="nav-link" data-scroll-target="#abstract-rgb-composites"><span class="toc-section-number">3.2.6</span> Abstract RGB Composites &nbsp;</a></li>
<li><a href="#conclusion-1" id="toc-conclusion-1" class="nav-link" data-scroll-target="#conclusion-1">Conclusion</a></li>
</ul></li>
<li><a href="#survey-of-raster-datasets" id="toc-survey-of-raster-datasets" class="nav-link" data-scroll-target="#survey-of-raster-datasets"><span class="toc-section-number">6</span> Survey&nbsp;of Raster Datasets</a>
<li><a href="#survey-of-raster-datasets" id="toc-survey-of-raster-datasets" class="nav-link" data-scroll-target="#survey-of-raster-datasets"><span class="toc-section-number">3.3</span> Survey&nbsp;of Raster Datasets</a>
<ul class="collapse">
<li><a href="#image-collections-an-organized-set-of-images" id="toc-image-collections-an-organized-set-of-images" class="nav-link" data-scroll-target="#image-collections-an-organized-set-of-images"><span class="toc-section-number">6.1</span> Image Collections: An Organized Set of Images</a></li>
<li><a href="#view-an-image-collection" id="toc-view-an-image-collection" class="nav-link" data-scroll-target="#view-an-image-collection"><span class="toc-section-number">6.2</span> View an Image Collection</a></li>
<li><a href="#filtering-image-collections" id="toc-filtering-image-collections" class="nav-link" data-scroll-target="#filtering-image-collections"><span class="toc-section-number">6.3</span> Filtering Image Collections</a>
<ul class="collapse">
<li><a href="#filter-by-date" id="toc-filter-by-date" class="nav-link" data-scroll-target="#filter-by-date"><span class="toc-section-number">6.3.1</span> Filter by Date</a></li>
<li><a href="#filter-by-location" id="toc-filter-by-location" class="nav-link" data-scroll-target="#filter-by-location"><span class="toc-section-number">6.3.2</span> Filter by Location</a></li>
<li><a href="#selecting-the-first-image" id="toc-selecting-the-first-image" class="nav-link" data-scroll-target="#selecting-the-first-image"><span class="toc-section-number">6.3.3</span> Selecting the First Image</a></li>
</ul></li>
<li><a href="#collections-of-single-images" id="toc-collections-of-single-images" class="nav-link" data-scroll-target="#collections-of-single-images"><span class="toc-section-number">6.4</span> Collections of Single Images</a></li>
<li><a href="#modis-monthly-burned-areas" id="toc-modis-monthly-burned-areas" class="nav-link" data-scroll-target="#modis-monthly-burned-areas"><span class="toc-section-number">6.5</span> MODIS Monthly Burned Areas</a></li>
<li><a href="#methane" id="toc-methane" class="nav-link" data-scroll-target="#methane"><span class="toc-section-number">6.6</span> Methane</a></li>
<li><a href="#global-forest-change" id="toc-global-forest-change" class="nav-link" data-scroll-target="#global-forest-change"><span class="toc-section-number">6.7</span> Global&nbsp;Forest Change</a></li>
<li><a href="#digital-elevation-models" id="toc-digital-elevation-models" class="nav-link" data-scroll-target="#digital-elevation-models"><span class="toc-section-number">6.8</span> Digital Elevation Models</a></li>
<li><a href="#image-collections-an-organized-set-of-images" id="toc-image-collections-an-organized-set-of-images" class="nav-link" data-scroll-target="#image-collections-an-organized-set-of-images"><span class="toc-section-number">3.3.1</span> Image Collections: An Organized Set of Images</a></li>
<li><a href="#view-an-image-collection" id="toc-view-an-image-collection" class="nav-link" data-scroll-target="#view-an-image-collection"><span class="toc-section-number">3.3.2</span> View an Image Collection</a></li>
<li><a href="#filtering-image-collections" id="toc-filtering-image-collections" class="nav-link" data-scroll-target="#filtering-image-collections"><span class="toc-section-number">3.3.3</span> Filtering Image Collections</a></li>
<li><a href="#collections-of-single-images" id="toc-collections-of-single-images" class="nav-link" data-scroll-target="#collections-of-single-images"><span class="toc-section-number">3.3.4</span> Collections of Single Images</a></li>
<li><a href="#modis-monthly-burned-areas" id="toc-modis-monthly-burned-areas" class="nav-link" data-scroll-target="#modis-monthly-burned-areas"><span class="toc-section-number">3.3.5</span> MODIS Monthly Burned Areas</a></li>
<li><a href="#methane" id="toc-methane" class="nav-link" data-scroll-target="#methane"><span class="toc-section-number">3.3.6</span> Methane</a></li>
<li><a href="#global-forest-change" id="toc-global-forest-change" class="nav-link" data-scroll-target="#global-forest-change"><span class="toc-section-number">3.3.7</span> Global&nbsp;Forest Change</a></li>
<li><a href="#digital-elevation-models" id="toc-digital-elevation-models" class="nav-link" data-scroll-target="#digital-elevation-models"><span class="toc-section-number">3.3.8</span> Digital Elevation Models</a></li>
<li><a href="#conclusion-2" id="toc-conclusion-2" class="nav-link" data-scroll-target="#conclusion-2">Conclusion</a></li>
<li><a href="#references" id="toc-references" class="nav-link" data-scroll-target="#references">References</a></li>
</ul></li>
<li><a href="#the-remote-sensing-vocabulary" id="toc-the-remote-sensing-vocabulary" class="nav-link" data-scroll-target="#the-remote-sensing-vocabulary"><span class="toc-section-number">7</span> The Remote&nbsp;Sensing Vocabulary</a>
<li><a href="#the-remote-sensing-vocabulary" id="toc-the-remote-sensing-vocabulary" class="nav-link" data-scroll-target="#the-remote-sensing-vocabulary"><span class="toc-section-number">3.4</span> The Remote&nbsp;Sensing Vocabulary</a>
<ul class="collapse">
<li><a href="#searching-for-and-viewing-image-collection-information" id="toc-searching-for-and-viewing-image-collection-information" class="nav-link" data-scroll-target="#searching-for-and-viewing-image-collection-information"><span class="toc-section-number">7.1</span> Searching&nbsp;for and Viewing Image Collection Information</a></li>
<li><a href="#spatial-resolution" id="toc-spatial-resolution" class="nav-link" data-scroll-target="#spatial-resolution"><span class="toc-section-number">7.2</span> Spatial Resolution</a>
<ul class="collapse">
<li><a href="#landsat-thematic-mapper" id="toc-landsat-thematic-mapper" class="nav-link" data-scroll-target="#landsat-thematic-mapper"><span class="toc-section-number">7.2.1</span> Landsat Thematic Mapper</a></li>
<li><a href="#sentinel-2-multispectral-instrument" id="toc-sentinel-2-multispectral-instrument" class="nav-link" data-scroll-target="#sentinel-2-multispectral-instrument"><span class="toc-section-number">7.2.2</span> Sentinel-2 MultiSpectral Instrument</a></li>
<li><a href="#national-agriculture-imagery-program-naip" id="toc-national-agriculture-imagery-program-naip" class="nav-link" data-scroll-target="#national-agriculture-imagery-program-naip"><span class="toc-section-number">7.2.3</span> National Agriculture Imagery Program (NAIP)</a></li>
</ul></li>
<li><a href="#temporal-resolution" id="toc-temporal-resolution" class="nav-link" data-scroll-target="#temporal-resolution"><span class="toc-section-number">7.3</span> Temporal Resolution</a>
<ul class="collapse">
<li><a href="#landsat" id="toc-landsat" class="nav-link" data-scroll-target="#landsat"><span class="toc-section-number">7.3.1</span> Landsat</a></li>
<li><a href="#sentinel-2" id="toc-sentinel-2" class="nav-link" data-scroll-target="#sentinel-2"><span class="toc-section-number">7.3.2</span> Sentinel-2</a></li>
</ul></li>
<li><a href="#spectral-resolution" id="toc-spectral-resolution" class="nav-link" data-scroll-target="#spectral-resolution"><span class="toc-section-number">7.4</span> Spectral Resolution</a>
<ul class="collapse">
<li><a href="#modis" id="toc-modis" class="nav-link" data-scroll-target="#modis"><span class="toc-section-number">7.4.1</span> MODIS</a></li>
<li><a href="#eo-1" id="toc-eo-1" class="nav-link" data-scroll-target="#eo-1"><span class="toc-section-number">7.4.2</span> EO-1</a></li>
</ul></li>
<li><a href="#per-pixel-quality" id="toc-per-pixel-quality" class="nav-link" data-scroll-target="#per-pixel-quality"><span class="toc-section-number">7.5</span> Per-Pixel Quality</a></li>
<li><a href="#metadata" id="toc-metadata" class="nav-link" data-scroll-target="#metadata"><span class="toc-section-number">7.6</span> Metadata</a></li>
<li><a href="#searching-for-and-viewing-image-collection-information" id="toc-searching-for-and-viewing-image-collection-information" class="nav-link" data-scroll-target="#searching-for-and-viewing-image-collection-information"><span class="toc-section-number">3.4.1</span> Searching&nbsp;for and Viewing Image Collection Information</a></li>
<li><a href="#spatial-resolution" id="toc-spatial-resolution" class="nav-link" data-scroll-target="#spatial-resolution"><span class="toc-section-number">3.4.2</span> Spatial Resolution</a></li>
<li><a href="#temporal-resolution" id="toc-temporal-resolution" class="nav-link" data-scroll-target="#temporal-resolution"><span class="toc-section-number">3.4.3</span> Temporal Resolution</a></li>
<li><a href="#spectral-resolution" id="toc-spectral-resolution" class="nav-link" data-scroll-target="#spectral-resolution"><span class="toc-section-number">3.4.4</span> Spectral Resolution</a></li>
<li><a href="#per-pixel-quality" id="toc-per-pixel-quality" class="nav-link" data-scroll-target="#per-pixel-quality"><span class="toc-section-number">3.4.5</span> Per-Pixel Quality</a></li>
<li><a href="#metadata" id="toc-metadata" class="nav-link" data-scroll-target="#metadata"><span class="toc-section-number">3.4.6</span> Metadata</a></li>
<li><a href="#conclusion-3" id="toc-conclusion-3" class="nav-link" data-scroll-target="#conclusion-3">Conclusion</a></li>
<li><a href="#references-1" id="toc-references-1" class="nav-link" data-scroll-target="#references-1">References</a></li>
</ul></li>
@@ -379,8 +354,8 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</header>
<section id="programming-basics" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Programming Basics</h1>
<section id="programming-basics" class="level2" data-number="3.1">
<h2 data-number="3.1" class="anchored" data-anchor-id="programming-basics"><span class="header-section-number">3.1</span> Programming Basics</h2>
<div class="callout-tip callout callout-style-default callout-captioned">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
@@ -391,24 +366,24 @@ Chapter Information
</div>
</div>
<div class="callout-body-container callout-body">
<section id="author" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="author">Author</h2>
<section id="author" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="author">Author</h3>
<p>Ujaval Gandhi</p>
</section>
<section id="overview" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="overview">Overview</h2>
<section id="overview" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="overview">Overview</h3>
<p>This chapter introduces the Google Earth Engine application programming interface (API) and the JavaScript syntax needed to use it. You will learn about the Code Editor environment and get comfortable typing, running, and saving scripts. You will also learn the basics of JavaScript language, such as variables, data structures, and functions.</p>
</section>
<section id="learning-outcomes" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes">Learning Outcomes</h2>
<section id="learning-outcomes" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes">Learning Outcomes</h3>
<ul>
<li>Familiarity with the Earth Engine Code Editor.</li>
<li>Familiarity with the JavaScript syntax.</li>
<li>Ability to use the Earth Engine API functions from the Code Editor.</li>
</ul>
</section>
<section id="assumes-you-know-how-to" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to">Assumes you know how to:</h2>
<section id="assumes-you-know-how-to" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to">Assumes you know how to:</h3>
<ul>
<li>Sign up for an Earth Engine account (See the Google documentation for details).</li>
<li>Access the Earth Engine Code Editor (See the Google documentation for details).</li>
@@ -416,15 +391,15 @@ Chapter Information
</section>
</div>
</div>
<section id="introduction" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="introduction">Introduction</h2>
<section id="introduction" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="introduction">Introduction</h3>
<p>In order to use Earth Engine well, you will need to develop basic skills in remote sensing and programming. The language of this book is JavaScript, and you will begin by learning how to manipulate variables using it. With that base, youll learn about viewing individual satellite images, viewing collections of images in Earth Engine, and how common remote sensing terms are referenced and used in Earth Engine.</p>
<p>Google Earth Engine is a cloud-based platform for scientific data analysis. It provides ready-to-use, cloud-hosted datasets and a large pool of servers. One feature that makes Earth Engine particularly attractive is the ability to run large computations very fast by distributing them across a large pool of servers. The ability to efficiently use cloud-hosted datasets and computation is enabled by the Earth Engine API.</p>
<p>An API is a way to communicate with Earth Engine servers. It allows you to specify what computation you would like to do, and then to receive the results. The API is designed so that users do not need to worry about how&nbsp;the computation is distributed across a cluster of machines and the results are assembled. Users of the API simply specify what needs to be done. This greatly simplifies the code by hiding the implementation detail from the users. It also makes Earth Engine very approachable for users who are not familiar with writing code.</p>
<p>The Earth Engine platform comes with a web-based Code Editor that allows you to start using the Earth Engine JavaScript API without any installation. It also provides additional functionality to display your results on a map, save your scripts, access documentation, manage tasks, and more. It has a one-click mechanism to share your code with other users—allowing for easy reproducibility and collaboration. In addition, the JavaScript API comes with a user interface library, which allows you to create charts and web-based applications with little effort.</p>
</section>
<section id="getting-started-in-the-code-editor" class="level2" data-number="4.1">
<h2 data-number="4.1" class="anchored" data-anchor-id="getting-started-in-the-code-editor"><span class="header-section-number">4.1</span> Getting Started in&nbsp;the Code Editor</h2>
<section id="getting-started-in-the-code-editor" class="level3" data-number="3.1.1">
<h3 data-number="3.1.1" class="anchored" data-anchor-id="getting-started-in-the-code-editor"><span class="header-section-number">3.1.1</span> Getting Started in&nbsp;the Code Editor</h3>
<p>If you have not already done so, be sure to add the books code repository to the Code Editor by entering&nbsp;<a href="https://www.google.com/url?q=https://code.earthengine.google.com/?accept_repo%3Dprojects/gee-edu/book&amp;sa=D&amp;source=editors&amp;ust=1670414092101269&amp;usg=AOvVaw2sJyDO_fhq1tcjG77pri7V"></a><a href="https://www.google.com/url?q=https://code.earthengine.google.com/?accept_repo%3Dprojects/gee-edu/book&amp;sa=D&amp;source=editors&amp;ust=1670414092101852&amp;usg=AOvVaw088kfXu4o_Mp4b8DJBPYjH">https://code.earthengine.google.com/?accept_repo=projects/gee-edu/book</a>&nbsp;into your browser. The books scripts will then be available in the script manager panel. If you have trouble finding the repo, you can visit <a href="https://www.google.com/url?q=https://docs.google.com/presentation/d/1Kt6wGNoesYm__Cu3k3bnlbbyPN6m9SF4hQHK-pIDHfc/edit%23slide%3Did.g18a7b4b055d_0_624&amp;sa=D&amp;source=editors&amp;ust=1670414092102526&amp;usg=AOvVaw3ZCmkCOjrZEWqxfjRZPOCn">this link</a>&nbsp;for help.</p>
<p>The Code Editor is an integrated development&nbsp;environment for the Earth Engine JavaScript API. It offers an easy way to type, debug, run, and manage code. Once you have followed Googles documentation on registering for an Earth Engine account, you should follow the documentation to open the Code Editor. When you first visit the Code Editor, you will see a screen such as the one shown in Fig. F1.0.1.</p>
<div class="quarto-figure quarto-figure-center">
@@ -479,11 +454,11 @@ Chapter Information
</div>
<p>Now you should be familiar with how to create, run, and save your scripts in the Code Editor. You are ready to start learning the basics of JavaScript.</p>
</section>
<section id="javascript-basics" class="level2" data-number="4.2">
<h2 data-number="4.2" class="anchored" data-anchor-id="javascript-basics"><span class="header-section-number">4.2</span> JavaScript Basics</h2>
<section id="javascript-basics" class="level3" data-number="3.1.2">
<h3 data-number="3.1.2" class="anchored" data-anchor-id="javascript-basics"><span class="header-section-number">3.1.2</span> JavaScript Basics</h3>
<p>To be able to construct a script for your analysis, you will need to use JavaScript. This section covers the JavaScript syntax and basic data structures. In the sections that follow, you will see more JavaScript code, noted in a distinct font and with shaded background. As you encounter code,&nbsp;paste it into the Code Editor and run the script.</p>
<section id="variables" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="variables">Variables</h3>
<section id="variables" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="variables">Variables</h4>
<p>In a programming language, variables are used to store data values. In JavaScript, a variable is defined using the var&nbsp;keyword followed by the name of the variable. The code below assigns the text “San Francisco” to the variable named&nbsp;city. Note that the text string in the code should be surrounded by quotes. You are free to use either &nbsp;(single quotes) or “&nbsp;(double quotes), and they must match at the beginning and end of each string. In your programs, it is advisable to be consistent—use either single quotes or double quotes throughout a given script&nbsp;(the code in this book generally uses single quotes for code).&nbsp;Each statement of your script should typically end with a semicolon, although Earth Engines code editor does not require it.&nbsp;</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;city <span class="op">=</span> <span class="st">'San Francisco'</span><span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>If you print the variable city, you will get the value stored in the variable (San Francisco) printed in the Console.&nbsp;</p>
@@ -492,8 +467,8 @@ Chapter Information
<div class="sourceCode" id="cb4"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;population <span class="op">=</span> <span class="dv">873965</span><span class="op">;</span> </span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(population)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</section>
<section id="lists" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="lists">Lists</h3>
<section id="lists" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="lists">Lists</h4>
<p>It is helpful to be able to store multiple values in a single variable. JavaScript provides a data structure called a list&nbsp;that can hold multiple values. We can create a new list using the square brackets []&nbsp;and adding multiple values separated by a comma.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;cities <span class="op">=</span> [<span class="st">'San Francisco'</span><span class="op">,</span> <span class="st">'Los Angeles'</span><span class="op">,</span> <span class="st">'New York'</span><span class="op">,</span> <span class="st">'Atlanta'</span>]<span class="op">;</span> </span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(cities)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
@@ -505,8 +480,8 @@ Chapter Information
</figure>
</div>
</section>
<section id="objects" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="objects">Objects</h3>
<section id="objects" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="objects">Objects</h4>
<p>Lists allow you to store multiple values in a single&nbsp;container variable. While useful, it is not appropriate to store structured data. It is helpful to be able to refer to each item with its name rather than its position. Objects in JavaScript allow you to store key-value pairs, where each value can be referred to by its key. You can create a dictionary using the curly braces {}. The code below creates an object called cityData&nbsp;with some information about San Francisco.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;cityData <span class="op">=</span> {&nbsp; &nbsp;</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="st">'city'</span><span class="op">:</span> <span class="st">'San Francisco'</span><span class="op">,</span>&nbsp; &nbsp;</span>
@@ -523,8 +498,8 @@ Chapter Information
</figure>
</div>
</section>
<section id="functions" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="functions">Functions</h3>
<section id="functions" class="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="functions">Functions</h4>
<p>While using Earth Engine, you will need to define your own functions. Functions take user inputs, use them to carry out some computation, and send an output back. Functions allow you to group a set of operations together and repeat the same operations with different parameters without having to rewrite them every time. Functions are defined using the <code>function</code>&nbsp;keyword. The code below defines a function called greet&nbsp;that takes an input called name&nbsp;and returns a greeting with Hello&nbsp;prefixed to it. Note that we can call the function with different input and it generates different outputs with the same code.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;greet <span class="op">=</span> <span class="kw">function</span>(name) {&nbsp; &nbsp;</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> return&nbsp;<span class="st">'Hello '</span>&nbsp;<span class="op">+</span> name<span class="op">;</span> </span>
@@ -539,8 +514,8 @@ Chapter Information
</figure>
</div>
</section>
<section id="comments" class="level3 unnumbbered" data-number="4.2.1">
<h3 class="unnumbbered anchored" data-number="4.2.1" data-anchor-id="comments"><span class="header-section-number">4.2.1</span> Comments</h3>
<section id="comments" class="level4 unnumbbered" data-number="3.1.2.1">
<h4 class="unnumbbered anchored" data-number="3.1.2.1" data-anchor-id="comments"><span class="header-section-number">3.1.2.1</span> Comments</h4>
<p>While writing code, it is useful to add a bit of text to explain the code or leave a note for yourself. It is a good programming practice to always add comments in the code explaining each step. In JavaScript, you can prefix any line with two forward slashes // to make it a comment. The text in the comment will be ignored by the interpreter and will not be executed.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="co">// This is a comment!</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Congratulations! You have learned enough JavaScript to be able to use the Earth Engine API. In the next section, you will see how to access and execute Earth Engine API functions using JavaScript.</p>
@@ -559,8 +534,8 @@ Note
</div>
</section>
</section>
<section id="earth-engine-api-basics" class="level2" data-number="4.3">
<h2 data-number="4.3" class="anchored" data-anchor-id="earth-engine-api-basics"><span class="header-section-number">4.3</span> Earth Engine API Basics</h2>
<section id="earth-engine-api-basics" class="level3" data-number="3.1.3">
<h3 data-number="3.1.3" class="anchored" data-anchor-id="earth-engine-api-basics"><span class="header-section-number">3.1.3</span> Earth Engine API Basics</h3>
<p>The Earth Engine API is vast and provides objects and methods to do everything from simple math to advanced algorithms for image processing. In the Code Editor, you can switch to the Docs tab to see the API functions grouped by object types. The API functions have the prefix ee&nbsp;(for Earth Engine).</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
@@ -615,13 +590,13 @@ Note
</div>
</div>
</section>
<section id="conclusion" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="conclusion">Conclusion</h2>
<section id="conclusion" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="conclusion">Conclusion</h3>
<p>This chapter introduced the Earth Engine API. You also learned the basics of JavaScript syntax to be able to use the API in the Code Editor environment. We hope you now feel a bit more comfortable starting your journey to become an Earth Engine developer. Regardless of your programming background or familiarity with JavaScript, you have the tools at your disposal to start using the Earth Engine API to build scripts for remote sensing analysis.</p>
</section>
</section>
<section id="exploring-images" class="level1" data-number="5">
<h1 data-number="5"><span class="header-section-number">5</span> Exploring Images</h1>
<section id="exploring-images" class="level2" data-number="3.2">
<h2 data-number="3.2" class="anchored" data-anchor-id="exploring-images"><span class="header-section-number">3.2</span> Exploring Images</h2>
<div class="callout-tip callout callout-style-default callout-captioned">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
@@ -632,16 +607,16 @@ Chapter Information
</div>
</div>
<div class="callout-body-container callout-body">
<section id="author-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="author-1">Author</h2>
<section id="author-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="author-1">Author</h3>
<p>Jeff Howarth</p>
</section>
<section id="overview-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="overview-1">Overview</h2>
<section id="overview-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="overview-1">Overview</h3>
<p>Satellite images are at the heart of Google Earth Engines power. This chapter teaches you how to inspect and visualize data stored in image bands. We first visualize individual bands as separate map layers and then explore a method to visualize three different bands in a single composite layer. We compare different kinds of composites for satellite bands that measure electromagnetic radiation in the visible and non-visible spectrum. We then explore images that represent more abstract attributes of locations, and create a composite layer to visualize change over time. &nbsp;</p>
</section>
<section id="learning-outcomes-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-1">Learning Outcomes</h2>
<section id="learning-outcomes-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-1">Learning Outcomes</h3>
<ul>
<li>Using the Code Editor to load an image</li>
<li>Using code to select image bands and visualize them as map layers</li>
@@ -650,16 +625,16 @@ Chapter Information
<li>Understanding how additive color works and how to interpret RGB composites.</li>
</ul>
</section>
<section id="assumes-you-know-how-to-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-1">Assumes you know how to:</h2>
<section id="assumes-you-know-how-to-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-1">Assumes you know how to:</h3>
<ul>
<li>Sign up for an Earth Engine account, open the Code Editor, and save&nbsp;your script (Chap. F1.0).</li>
</ul>
</section>
</div>
</div>
<section id="accessing-an-image" class="level2" data-number="5.1">
<h2 data-number="5.1" class="anchored" data-anchor-id="accessing-an-image"><span class="header-section-number">5.1</span> Accessing&nbsp;an Image</h2>
<section id="accessing-an-image" class="level3" data-number="3.2.1">
<h3 data-number="3.2.1" class="anchored" data-anchor-id="accessing-an-image"><span class="header-section-number">3.2.1</span> Accessing&nbsp;an Image</h3>
<p>If you have not already done so, be sure to add the books code repository to the Code Editor by entering&nbsp;<a href="https://www.google.com/url?q=https://code.earthengine.google.com/?accept_repo%3Dprojects/gee-edu/book&amp;sa=D&amp;source=editors&amp;ust=1670414092189999&amp;usg=AOvVaw1jWHeBmeq93I_lo_9useCA"></a><a href="https://www.google.com/url?q=https://code.earthengine.google.com/?accept_repo%3Dprojects/gee-edu/book&amp;sa=D&amp;source=editors&amp;ust=1670414092190705&amp;usg=AOvVaw3Z7cK8r6eOSYUceNjA8oUg">https://code.earthengine.google.com/?accept_repo=projects/gee-edu/book</a>&nbsp;into your browser. The books scripts will then be available in the script manager panel. If you have trouble finding the repo, you can visit <a href="https://www.google.com/url?q=https://docs.google.com/presentation/d/1Kt6wGNoesYm__Cu3k3bnlbbyPN6m9SF4hQHK-pIDHfc/edit%23slide%3Did.g18a7b4b055d_0_624&amp;sa=D&amp;source=editors&amp;ust=1670414092191415&amp;usg=AOvVaw2eETuRpR5worezkj7citx6">this link</a>&nbsp;for help.</p>
<p>To begin, you will construct an image with the Code Editor. In the sections that follow, you will see code in a distinct font and with shaded background. As you encounter code, paste it into the center panel of the Code Editor and click Run.</p>
<p>First, copy and paste the following:</p>
@@ -677,8 +652,8 @@ Chapter Information
<p>A satellite&nbsp;sensor like Landsat 5 measures the magnitude of radiation in different portions of the electromagnetic spectrum. The first six bands in our image (“SR_B1” through “SR_B7”) contain measurements for six different portions of the spectrum. The first three bands measure visible portions of the spectrum, or quantities of blue, green, and red light. The other three bands measure infrared portions of the spectrum that are not visible to the human eye.</p>
<p>An image band is an example of a raster data model, a method of storing geographic data in a two-dimensional grid of pixels, or picture elements.</p>
</section>
<section id="visualizing-an-image" class="level2" data-number="5.2">
<h2 data-number="5.2" class="anchored" data-anchor-id="visualizing-an-image"><span class="header-section-number">5.2</span> Visualizing an Image</h2>
<section id="visualizing-an-image" class="level3" data-number="3.2.2">
<h3 data-number="3.2.2" class="anchored" data-anchor-id="visualizing-an-image"><span class="header-section-number">3.2.2</span> Visualizing an Image</h3>
<p>Now lets add one of the bands to the map as a layer&nbsp;so that we can see it. &nbsp;</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="bu">Map</span><span class="op">.</span><span class="fu">addLayer</span>(first_image<span class="op">,</span> <span class="co">// &nbsp;dataset to display&nbsp; &nbsp;</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> {<span class="dt">bands</span><span class="op">:</span> [<span class="st">'SR_B1'</span>]<span class="op">,</span> <span class="co">// &nbsp;band to display&nbsp; &nbsp; &nbsp; &nbsp;</span></span>
@@ -750,8 +725,8 @@ Note
</div>
</div>
</section>
<section id="true-color-composites" class="level2" data-number="5.3">
<h2 data-number="5.3" class="anchored" data-anchor-id="true-color-composites"><span class="header-section-number">5.3</span> True-Color Composites</h2>
<section id="true-color-composites" class="level3" data-number="3.2.3">
<h3 data-number="3.2.3" class="anchored" data-anchor-id="true-color-composites"><span class="header-section-number">3.2.3</span> True-Color Composites</h3>
<p>Using the controls&nbsp;in the Layers manager, explore these layers and examine how the pixel values in each band differ. Does Layer 2 (displaying pixel values from the “SR_B2” band) appear generally brighter than Layer 1 (the “SR_B1” band)? Compared with Layer 2, do the ocean waters in Layer 3 (the “SR_B3” band) appear a little darker in the north, but a little lighter in the south? &nbsp;</p>
<p>We can use color to compare these visual differences in the pixel values of each band layer all at once as an RGB composite. This method uses the three primary colors (red, green, and blue) to display each pixels values across three bands.</p>
<p>To try this, add this code and run it.</p>
@@ -769,8 +744,8 @@ Note
</figure>
</div>
</section>
<section id="false-color-composites" class="level2" data-number="5.4">
<h2 data-number="5.4" class="anchored" data-anchor-id="false-color-composites"><span class="header-section-number">5.4</span> False-Color Composites</h2>
<section id="false-color-composites" class="level3" data-number="3.2.4">
<h3 data-number="3.2.4" class="anchored" data-anchor-id="false-color-composites"><span class="header-section-number">3.2.4</span> False-Color Composites</h3>
<p>As you saw when you&nbsp;printed the band list&nbsp;(Fig. F1.1.1), a Landsat image contains many more bands than just the three true-color bands. We can make RGB composites to show combinations of any of the bands—even those outside what the human eye can see. For example, band 4 represents the near-infrared band, just outside the range of human vision. Because of its value in distinguishing environmental conditions, this band was included on even the earliest 1970s Landsats. It has different values in coniferous and deciduous forests, for example, and can indicate crop health. To see an example of this, add this code to your script and run it. &nbsp;</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="bu">Map</span><span class="op">.</span><span class="fu">addLayer</span>( </span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a>&nbsp; &nbsp;first_image<span class="op">,</span> </span>
@@ -827,8 +802,8 @@ Note
</div>
</div>
</section>
<section id="attributes-of-locations" class="level2" data-number="5.5">
<h2 data-number="5.5" class="anchored" data-anchor-id="attributes-of-locations"><span class="header-section-number">5.5</span> Attributes of Locations</h2>
<section id="attributes-of-locations" class="level3" data-number="3.2.5">
<h3 data-number="3.2.5" class="anchored" data-anchor-id="attributes-of-locations"><span class="header-section-number">3.2.5</span> Attributes of Locations</h3>
<p>So far, we have explored bands as a method for storing data about slices of the electromagnetic spectrum that can be measured by satellites. Now we will work towards applying the additive color system to bands that store non-optical and more abstract attributes&nbsp;of geographic locations. &nbsp;</p>
<p>To begin, add this code to your script and run it. &nbsp;</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> lights93 <span class="op">=</span> ee<span class="op">.</span><span class="fu">Image</span>(<span class="st">'NOAA/DMSP-OLS/NIGHTTIME_LIGHTS/F101993'</span>)<span class="op">;</span> </span>
@@ -850,8 +825,8 @@ Note
</figure>
</div>
</section>
<section id="abstract-rgb-composites" class="level2" data-number="5.6">
<h2 data-number="5.6" class="anchored" data-anchor-id="abstract-rgb-composites"><span class="header-section-number">5.6</span> Abstract RGB Composites &nbsp;</h2>
<section id="abstract-rgb-composites" class="level3" data-number="3.2.6">
<h3 data-number="3.2.6" class="anchored" data-anchor-id="abstract-rgb-composites"><span class="header-section-number">3.2.6</span> Abstract RGB Composites &nbsp;</h3>
<p>Now we can use the additive color system to make an RGB composite that compares stable nighttime lights at three different slices of time. Add the code below to your script and run it. &nbsp;</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>var&nbsp;lights03 <span class="op">=</span> ee<span class="op">.</span><span class="fu">Image</span>(<span class="st">'NOAA/DMSP-OLS/NIGHTTIME_LIGHTS/F152003'</span>) </span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>&nbsp; <span class="at">&nbsp;</span><span class="op">.</span><span class="fu">select</span>(<span class="st">'stable_lights'</span>)<span class="op">.</span><span class="fu">rename</span>(<span class="st">'2003'</span>)<span class="op">;</span> </span>
@@ -910,13 +885,13 @@ Note
</div>
</div>
</section>
<section id="conclusion-1" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="conclusion-1">Conclusion</h2>
<section id="conclusion-1" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="conclusion-1">Conclusion</h3>
<p>In this chapter, we looked at how an image is composed of one or more bands, where each band stores data about geographic locations as pixel values. We explored different ways of visualizing these pixel values as map layers, including a grayscale display of single bands and RGB composites of three bands. We created natural and false-color composites that use additive color to display information in visible and non-visible portions of the spectrum. We examined additive color as a general system for visualizing pixel values across multiple bands. We then explored how bands and RGB composites can be used to represent more abstract phenomena, including different kinds of change over time.</p>
</section>
</section>
<section id="survey-of-raster-datasets" class="level1" data-number="6">
<h1 data-number="6"><span class="header-section-number">6</span> Survey&nbsp;of Raster Datasets</h1>
<section id="survey-of-raster-datasets" class="level2" data-number="3.3">
<h2 data-number="3.3" class="anchored" data-anchor-id="survey-of-raster-datasets"><span class="header-section-number">3.3</span> Survey&nbsp;of Raster Datasets</h2>
<p>The previous chapter introduced you to images, one of the core building blocks of remotely sensed imagery in Earth Engine. In this chapter, we will expand on this concept of images by introducing image collections. Image collections in Earth Engine organize many different images into one larger data storage structure. Image collections include information about the location, date collected, and other properties of each image, allowing you to sift through the ImageCollection&nbsp;for the exact image characteristics needed for your analysis.</p>
<div class="callout-tip callout callout-style-default callout-captioned">
<div class="callout-header d-flex align-content-center">
@@ -928,24 +903,24 @@ Chapter Information
</div>
</div>
<div class="callout-body-container callout-body">
<section id="authors" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="authors">Authors</h2>
<section id="authors" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="authors">Authors</h3>
<p>Andréa Puzzi Nicolau, Karen Dyson, David Saah, Nicholas Clinton</p>
</section>
<section id="overview-2" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="overview-2">Overview</h2>
<section id="overview-2" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="overview-2">Overview</h3>
<p>The purpose of this chapter is to introduce you to the many types of collections of images available in Google Earth Engine. These include sets of individual satellite images, pre-made composites (which merge multiple individual satellite images into one composite image), classified land use and land cover (LULC) maps, weather data, and other types of datasets. If you are new to JavaScript or programming, work through Chaps. F1.0 and F1.1 first. &nbsp;</p>
</section>
<section id="learning-outcomes-2" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-2">Learning Outcomes</h2>
<section id="learning-outcomes-2" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-2">Learning Outcomes</h3>
<ul>
<li>Accessing and viewing sets of images&nbsp;in Earth Engine.</li>
<li>Extracting single scenes from collections of images.</li>
<li>Applying visualization parameters in Earth Engine to visualize an image.</li>
</ul>
</section>
<section id="assumes-you-know-how-to-2" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-2">Assumes you know how to:</h2>
<section id="assumes-you-know-how-to-2" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-2">Assumes you know how to:</h3>
<ul>
<li>Sign up for an Earth Engine account, open the Code Editor, and save your script. (Chap. F1.0)</li>
<li>Locate the Earth Engine Inspector&nbsp;and Console&nbsp;tabs and understand their purposes&nbsp;(Chap. F1.0).</li>
@@ -954,13 +929,13 @@ Chapter Information
</section>
</div>
</div>
<section id="image-collections-an-organized-set-of-images" class="level2" data-number="6.1">
<h2 data-number="6.1" class="anchored" data-anchor-id="image-collections-an-organized-set-of-images"><span class="header-section-number">6.1</span> Image Collections: An Organized Set of Images</h2>
<section id="image-collections-an-organized-set-of-images" class="level3" data-number="3.3.1">
<h3 data-number="3.3.1" class="anchored" data-anchor-id="image-collections-an-organized-set-of-images"><span class="header-section-number">3.3.1</span> Image Collections: An Organized Set of Images</h3>
<p>There are many different types of image collections&nbsp;available in Earth Engine. These include collections of individual satellite images, pre-made composites that combine multiple images into one blended image, classified LULC maps, weather data, and other non-optical data sets. Each one of these is useful for different types of analyses. For example, one recent study examined the drivers of wildfires in Australia (Sulova and Jokar&nbsp;2021). The research team used the European Center for Medium-Range Weather Forecast Reanalysis (ERA5) dataset produced by the European Center for Medium-Range Weather Forecasts (ECMWF) and&nbsp;is freely available in Earth Engine. We will look at this dataset later in the chapter.</p>
<p>You saw some of the basic ways to interact with an individual ee.Image&nbsp;in the previous chapter. However, depending on how long a remote sensing platform has been in operation, there may be thousands or millions of images collected of Earth. In Earth Engine, these are organized into an ImageCollection, a specialized data type that has specific operations available in the Earth Engine API. Like individual images, they can be viewed with&nbsp;Map.addLayer.</p>
</section>
<section id="view-an-image-collection" class="level2" data-number="6.2">
<h2 data-number="6.2" class="anchored" data-anchor-id="view-an-image-collection"><span class="header-section-number">6.2</span> View an Image Collection</h2>
<section id="view-an-image-collection" class="level3" data-number="3.3.2">
<h3 data-number="3.3.2" class="anchored" data-anchor-id="view-an-image-collection"><span class="header-section-number">3.3.2</span> View an Image Collection</h3>
<p>The Landsat program from NASA and the United States Geological Survey (USGS) has launched a sequence of Earth observation satellites, named Landsat 1, 2, etc. Landsats have been returning images since 1972, making that collection of images the longest continuous satellite-based observation of the Earths surface. We will now view images and basic information about one of the image collections that is still growing: collections of scenes taken by the Operational Land Imager aboard Landsat 8, which was launched in 2013. Copy and paste the following code into the center panel and click Run. While the enormous image catalog is accessed, it could take a couple of minutes to see the result in the Map area. If it takes more than a couple of minutes to see the images, try zooming in to a specific area to speed up the process.</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a><span class="co">// View an Image Collection </span></span>
@@ -1025,11 +1000,11 @@ Note
</div>
<p>Edit&nbsp;your code to comment out the last two code commands you have written. This will remove the call to Map.addLayer&nbsp;that drew every image, and will remove the print&nbsp;statement that demanded more than 5000 elements. This will speed up your code in subsequent sections. Placing two forward slashes (//) at the beginning of a line will make it into a comment, and any commands on that line will not be executed.</p>
</section>
<section id="filtering-image-collections" class="level2" data-number="6.3">
<h2 data-number="6.3" class="anchored" data-anchor-id="filtering-image-collections"><span class="header-section-number">6.3</span> Filtering Image Collections</h2>
<section id="filtering-image-collections" class="level3" data-number="3.3.3">
<h3 data-number="3.3.3" class="anchored" data-anchor-id="filtering-image-collections"><span class="header-section-number">3.3.3</span> Filtering Image Collections</h3>
<p>The ImageCollection&nbsp;data type in Earth Engine has multiple approaches to filtering, which helps to pinpoint the exact images you want to view or analyze from the larger collection.</p>
<section id="filter-by-date" class="level3" data-number="6.3.1">
<h3 data-number="6.3.1" class="anchored" data-anchor-id="filter-by-date"><span class="header-section-number">6.3.1</span> Filter by Date</h3>
<section id="filter-by-date" class="level4" data-number="3.3.3.1">
<h4 data-number="3.3.3.1" class="anchored" data-anchor-id="filter-by-date"><span class="header-section-number">3.3.3.1</span> Filter by Date</h4>
<p>One of the filters is filterDate, which allows us to narrow down the date range of the ImageCollection. Copy the following code to the center panel (paste it after the previous code you had):</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a><span class="co">// Filter an Image Collection </span></span>
@@ -1055,8 +1030,8 @@ Note
</div>
<p>Now look at the size of the winter Landsat 8 collection. The number is significantly lower than the number of images in the entire collection. This is the result of filtering the dates to three months in the winter of 20202021.</p>
</section>
<section id="filter-by-location" class="level3" data-number="6.3.2">
<h3 data-number="6.3.2" class="anchored" data-anchor-id="filter-by-location"><span class="header-section-number">6.3.2</span> Filter by Location</h3>
<section id="filter-by-location" class="level4" data-number="3.3.3.2">
<h4 data-number="3.3.3.2" class="anchored" data-anchor-id="filter-by-location"><span class="header-section-number">3.3.3.2</span> Filter by Location</h4>
<p>A second frequently used filtering tool&nbsp;is filterBounds. This filter is based on a location—for example, a point, polygon, or other geometry. Copy and paste the code below to filter and add to the map the winter images from the Landsat 8 Image Collection to a point in Minneapolis, Minnesota, USA. Note below the Map.addLayer&nbsp;function to add the pointMN&nbsp;to the map with an empty dictionary {}&nbsp;for the visParams&nbsp;argument.&nbsp;This only means that we are not specifying visualization parameters for this element, and it is being added to the map with the default parameters.</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Create an Earth Engine Point object. </span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;pointMN <span class="op">=</span> ee<span class="op">.</span><span class="at">Geometry</span><span class="op">.</span><span class="fu">Point</span>([<span class="op">-</span><span class="fl">93.79</span><span class="op">,</span> <span class="fl">45.05</span>])<span class="op">;</span> </span>
@@ -1084,8 +1059,8 @@ Note
</div>
<p>The first still represents the map without zoom applied. The collection is shown inside the red circle. The second still represents the map after zoom was applied to the region. The red arrow indicates the point (in black) used to filter by bounds.</p>
</section>
<section id="selecting-the-first-image" class="level3" data-number="6.3.3">
<h3 data-number="6.3.3" class="anchored" data-anchor-id="selecting-the-first-image"><span class="header-section-number">6.3.3</span> Selecting the First Image</h3>
<section id="selecting-the-first-image" class="level4" data-number="3.3.3.3">
<h4 data-number="3.3.3.3" class="anchored" data-anchor-id="selecting-the-first-image"><span class="header-section-number">3.3.3.3</span> Selecting the First Image</h4>
<p>The final operation we will explore is the first&nbsp;function. This selects the first image in an ImageCollection. This allows us to place a single image on the screen for inspection. Copy and paste the code below to select and view the first image of the Minneapolis Winter Landsat 8 Image Collection. In this case, because the images are stored in time order in the ImageCollection, it will select the earliest image in the set.</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Select the first image in the filtered collection. </span></span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;landsatFirst <span class="op">=</span> landsatMN<span class="op">.</span><span class="fu">first</span>()<span class="op">;</span> </span>
@@ -1121,8 +1096,8 @@ Note
<p>Now that we have the tools to examine different image collections, we will explore&nbsp;other datasets.</p>
</section>
</section>
<section id="collections-of-single-images" class="level2" data-number="6.4">
<h2 data-number="6.4" class="anchored" data-anchor-id="collections-of-single-images"><span class="header-section-number">6.4</span> Collections of Single Images</h2>
<section id="collections-of-single-images" class="level3" data-number="3.3.4">
<h3 data-number="3.3.4" class="anchored" data-anchor-id="collections-of-single-images"><span class="header-section-number">3.3.4</span> Collections of Single Images</h3>
<p>When learning about image collections in the previous section, you worked with the Landsat 8 raw image dataset. These raw images have some important corrections already done for you. However, the raw images are only one of several image collections produced for Landsat 8. The remote sensing community has developed additional imagery corrections that help increase the accuracy and consistency of analyses. The results of each of these different imagery processing paths is stored in a distinct ImageCollection&nbsp;in Earth Engine.</p>
<p>Among the most prominent of these is the ImageCollection&nbsp;meant to minimize the effect of the atmosphere between Earths surface and the satellite. The view from satellites is made imprecise by the need for light rays to pass through the atmosphere, even on the clearest day. There are two important ways&nbsp;the atmosphere obscures a&nbsp;satellites view:&nbsp;by affecting the amount of sunlight that strikes the Earth, and by altering electromagnetic energy&nbsp;on its trip from its reflection at Earths surface to the satellites receptors.</p>
<p>Unraveling&nbsp;those effects is called atmospheric correction, a highly complex process whose details are beyond the scope of this book. Thankfully, in addition to the raw images from the satellite, each image for Landsat and certain other sensors is&nbsp;automatically treated with the most up-to-date atmospheric correction algorithms, producing a product referred to as a “surface reflectance” ImageCollection. The surface reflectance&nbsp;estimates the ratio of upward radiance at the Earths surface to downward radiance at the Earths surface, imitating what the sensor would have seen if it were hovering a few feet&nbsp;above the ground. &nbsp;</p>
@@ -1180,8 +1155,8 @@ Note
</div>
</div>
</section>
<section id="modis-monthly-burned-areas" class="level2" data-number="6.5">
<h2 data-number="6.5" class="anchored" data-anchor-id="modis-monthly-burned-areas"><span class="header-section-number">6.5</span> MODIS Monthly Burned Areas</h2>
<section id="modis-monthly-burned-areas" class="level3" data-number="3.3.5">
<h3 data-number="3.3.5" class="anchored" data-anchor-id="modis-monthly-burned-areas"><span class="header-section-number">3.3.5</span> MODIS Monthly Burned Areas</h3>
<p>Well explore two examples of composites made with data from the MODIS sensors, a pair of sensors aboard the Terra&nbsp;and Aqua&nbsp;satellites. On these complex sensors, different MODIS bands&nbsp;produce data at different spatial resolutions. For the visible bands, the lowest common resolution is 500 m (red and NIR are 250 m).</p>
<p>Some of the MODIS bands have proven useful in determining where fires are burning and what areas they have burned. A monthly composite product for burned areas is available in Earth Engine. Copy and paste the code below.</p>
<div class="sourceCode" id="cb26"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Import the MODIS monthly burned areas dataset. </span></span>
@@ -1214,8 +1189,8 @@ Note
</div>
<p>Save your script and start a new one by refreshing the page.</p>
</section>
<section id="methane" class="level2" data-number="6.6">
<h2 data-number="6.6" class="anchored" data-anchor-id="methane"><span class="header-section-number">6.6</span> Methane</h2>
<section id="methane" class="level3" data-number="3.3.6">
<h3 data-number="3.3.6" class="anchored" data-anchor-id="methane"><span class="header-section-number">3.3.6</span> Methane</h3>
<p>Satellites can also collect information about the climate, weather, and various compounds present in the atmosphere. These satellites leverage portions of the electromagnetic spectrum&nbsp;and how different objects and compounds reflect when hit with sunlight in various wavelengths. For example, methane&nbsp;(CH4) reflects the 760 nm portion of the spectrum. Lets take a closer look at a few of these datasets.</p>
<p>The European Space Agency makes available a methane dataset from Sentinel-5&nbsp;in Earth Engine. Copy and paste the code below to add to the map methane data from the first time of collection on November 28, 2018. We use the select&nbsp;function (See Chap. F1.1) to select the methane-specific band of the dataset. We also introduce values for a new argument for the visualization parameters of Map.addLayer: We use a color palette&nbsp;to display a single band of an image in color. Here, we chose varying colors from black for the minimum value to red for the maximum value. Values in</p>
<p>between will have the color in the order outlined by the palette&nbsp;parameter (a list of string colors: blue, purple, cyan, green, yellow, red).</p>
@@ -1251,8 +1226,8 @@ Note
</figure>
</div>
</section>
<section id="global-forest-change" class="level2" data-number="6.7">
<h2 data-number="6.7" class="anchored" data-anchor-id="global-forest-change"><span class="header-section-number">6.7</span> Global&nbsp;Forest Change</h2>
<section id="global-forest-change" class="level3" data-number="3.3.7">
<h3 data-number="3.3.7" class="anchored" data-anchor-id="global-forest-change"><span class="header-section-number">3.3.7</span> Global&nbsp;Forest Change</h3>
<p>Another useful land cover product that has been pre-classified for you and is available in Earth Engine is the Global Forest Change&nbsp;dataset. This analysis was conducted between 2000 and 2020. Unlike the WorldCover dataset, this dataset focuses on the percent of tree cover across the Earths surface in a base year of 2000, and how that has changed over time. Copy and paste the code below to visualize the tree cover in 2000. Note that in the code below we define the visualization parameters as a variable treeCoverViz&nbsp;instead of having its calculation done within the Map.addLayer&nbsp;function.</p>
<div class="sourceCode" id="cb28"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Import the Hansen Global Forest Change dataset. </span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;globalForest <span class="op">=</span> ee<span class="op">.</span><span class="fu">Image</span>(&nbsp; &nbsp;<span class="st">'UMD/hansen/global_forest_change_2020_v1_8'</span>)<span class="op">;</span> </span>
@@ -1307,8 +1282,8 @@ Note
</div>
<p>Save your script and start a new one.</p>
</section>
<section id="digital-elevation-models" class="level2" data-number="6.8">
<h2 data-number="6.8" class="anchored" data-anchor-id="digital-elevation-models"><span class="header-section-number">6.8</span> Digital Elevation Models</h2>
<section id="digital-elevation-models" class="level3" data-number="3.3.8">
<h3 data-number="3.3.8" class="anchored" data-anchor-id="digital-elevation-models"><span class="header-section-number">3.3.8</span> Digital Elevation Models</h3>
<p>Digital elevation models (DEMs) use airborne and satellite instruments to estimate the elevation of each location. Earth Engine has both local and global DEMs available. One of the global DEMs available is the NASADEM dataset, a DEM produced from a NASA mission. Copy and paste the code below to import the dataset and visualize the elevation band.</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Import the NASA DEM Dataset. </span></span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;nasaDEM <span class="op">=</span> ee<span class="op">.</span><span class="fu">Image</span>(<span class="st">'NASA/NASADEM_HGT/001'</span>)<span class="op">;</span> </span>
@@ -1335,20 +1310,20 @@ Note
</div>
</div>
</section>
<section id="conclusion-2" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="conclusion-2">Conclusion</h2>
<section id="conclusion-2" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="conclusion-2">Conclusion</h3>
<p>In this chapter, we introduced image collections in Earth Engine and learned how to apply multiple types of filters to image collections to identify multiple or a single image for use. We also explored a few of the many different image collections available in the Earth Engine Data Catalog. Understanding how to find, access, and filter image collections is an important step in learning how to perform spatial analyses in Earth Engine.</p>
</section>
<section id="references" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="references">References</h2>
<section id="references" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="references">References</h3>
<p>Chander G, Huang C, Yang L, et al (2009) Developing consistent Landsat data sets for large area applications: The MRLC 2001 protocol. IEEE Geosci Remote Sens Lett 6:777781. https://doi.org/10.1109/LGRS.2009.2025244</p>
<p>Chander G, Markham BL, Helder DL (2009) Summary of current radiometric calibration coefficients for Landsat MSS, TM, ETM+, and EO-1 ALI sensors. Remote Sens Environ 113:893903. https://doi.org/10.1016/j.rse.2009.01.007</p>
<p>Hansen MC, Potapov PV, Moore R, et al (2013) High-resolution global maps of 21st-century forest cover change. Science 342:850853. https://doi.org/10.1126/science.1244693</p>
<p>Sulova A, Arsanjani JJ (2021) Exploratory analysis of driving force of wildfires in Australia: An application of machine learning within Google Earth Engine. Remote Sens 13:123. https://doi.org/10.3390/rs13010010</p>
</section>
</section>
<section id="the-remote-sensing-vocabulary" class="level1" data-number="7">
<h1 data-number="7"><span class="header-section-number">7</span> The Remote&nbsp;Sensing Vocabulary</h1>
<section id="the-remote-sensing-vocabulary" class="level2" data-number="3.4">
<h2 data-number="3.4" class="anchored" data-anchor-id="the-remote-sensing-vocabulary"><span class="header-section-number">3.4</span> The Remote&nbsp;Sensing Vocabulary</h2>
<div class="callout-tip callout callout-style-default callout-captioned">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
@@ -1359,23 +1334,23 @@ Chapter Information
</div>
</div>
<div class="callout-body-container callout-body">
<section id="authors-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="authors-1">Authors</h2>
<section id="authors-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="authors-1">Authors</h3>
<p>Karen Dyson, Andréa Puzzi Nicolau, David Saah, Nicholas Clinton</p>
</section>
<section id="overview-3" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="overview-3">Overview</h2>
<section id="overview-3" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="overview-3">Overview</h3>
<p>The purpose of this chapter is to introduce some of the principal characteristics of remotely sensed images and how they can be examined in Earth Engine. We discuss spatial resolution, temporal resolution, and spectral resolution, along with how to access important image metadata. You will be introduced to image data from several sensors aboard various satellite platforms. At the completion of the chapter, you will be able to understand the difference between remotely sensed datasets based on these characteristics, and how to choose an appropriate dataset for your analysis based on these concepts. &nbsp;</p>
</section>
<section id="learning-outcomes-3" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-3">Learning Outcomes</h2>
<section id="learning-outcomes-3" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="learning-outcomes-3">Learning Outcomes</h3>
<ul>
<li>Understanding spatial, temporal, and spectral resolution.</li>
<li>Navigating the Earth Engine Console&nbsp;to gather information about a digital image, including resolution and other data documentation.</li>
</ul>
</section>
<section id="assumes-you-know-how-to-3" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-3">Assumes you know how to:</h2>
<section id="assumes-you-know-how-to-3" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="assumes-you-know-how-to-3">Assumes you know how to:</h3>
<ul>
<li>Navigate among Earth Engine result tabs (Chap. F1.0).</li>
<li>Visualize images with a variety of false-color band combinations (Chap. F1.1).</li>
@@ -1383,12 +1358,12 @@ Chapter Information
</section>
</div>
</div>
<section id="introduction-1" class="level2 unlisted unnumbered">
<h2 class="unlisted unnumbered anchored" data-anchor-id="introduction-1">Introduction</h2>
<section id="introduction-1" class="level3 unlisted unnumbered">
<h3 class="unlisted unnumbered anchored" data-anchor-id="introduction-1">Introduction</h3>
<p>Images and image collections form the basis of many remote sensing analyses in Earth Engine. There are many different types of satellite imagery available to use in these analyses, but not every dataset is appropriate for every analysis. To choose the most appropriate dataset for your analysis, you should consider multiple factors. Among these are the resolution of the dataset—including the spatial, temporal, and spectral resolutions—as well as how the dataset was created and its quality.</p>
</section>
<section id="searching-for-and-viewing-image-collection-information" class="level2" data-number="7.1">
<h2 data-number="7.1" class="anchored" data-anchor-id="searching-for-and-viewing-image-collection-information"><span class="header-section-number">7.1</span> Searching&nbsp;for and Viewing Image Collection Information</h2>
<section id="searching-for-and-viewing-image-collection-information" class="level3" data-number="3.4.1">
<h3 data-number="3.4.1" class="anchored" data-anchor-id="searching-for-and-viewing-image-collection-information"><span class="header-section-number">3.4.1</span> Searching&nbsp;for and Viewing Image Collection Information</h3>
<p>Earth Engines search bar can be used to find imagery and to locate important information about datasets in Earth Engine. Lets use the search bar, located above the Earth Engine code, to find out information about the Landsat 7 Collection 2 Raw Scenes. First, type “landsat 7 collection 2” into the search bar (Fig. F1.3.1). Without hitting Enter, matches to that search term will appear.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
@@ -1428,12 +1403,12 @@ Chapter Information
</div>
<p>Now that we know how to view this information, lets dive into some important remote sensing terminology.</p>
</section>
<section id="spatial-resolution" class="level2" data-number="7.2">
<h2 data-number="7.2" class="anchored" data-anchor-id="spatial-resolution"><span class="header-section-number">7.2</span> Spatial Resolution</h2>
<section id="spatial-resolution" class="level3" data-number="3.4.2">
<h3 data-number="3.4.2" class="anchored" data-anchor-id="spatial-resolution"><span class="header-section-number">3.4.2</span> Spatial Resolution</h3>
<p>Spatial&nbsp;resolution&nbsp;relates to the amount of Earths surface area covered by a single pixel. For example, we typically say that Landsat&nbsp;7 has “30 m” color imagery. This means that each pixel is 30 m to a side, covering a total area of 900 square meters&nbsp;of the Earths surface. The spatial resolution of a given data set greatly affects the appearance of images, and the information in them, when you are viewing them on Earths surface.</p>
<p>Next, we will visualize data from multiple sensors that capture data at different spatial resolutions, to compare the effect of different pixel sizes on the information and detail in an image. Well be selecting a single image from each ImageCollection&nbsp;to visualize. To view the image, we will draw them each as a color-IR image, a type of false-color image (described in detail in&nbsp;Chap. F1.1) that uses the infrared, red, and green bands. As you move through this portion of the course, zoom in and out to see differences in the pixel size and the image size.</p>
<section id="landsat-thematic-mapper" class="level3" data-number="7.2.1">
<h3 data-number="7.2.1" class="anchored" data-anchor-id="landsat-thematic-mapper"><span class="header-section-number">7.2.1</span> Landsat Thematic Mapper</h3>
<section id="landsat-thematic-mapper" class="level4" data-number="3.4.2.1">
<h4 data-number="3.4.2.1" class="anchored" data-anchor-id="landsat-thematic-mapper"><span class="header-section-number">3.4.2.1</span> Landsat Thematic Mapper</h4>
<p>Thematic Mapper (TM) sensors were flown aboard Landsat 4 and 5. TM data have been processed to a spatial resolution of 30m, and were active from 1982 to 2012. Search for “Landsat 5 TM” and import the result called “USGS Landsat 5 TM Collection 2 Tier 1 Raw Scenes”. In this dataset, the three bands for a color-IR image are called “B4” (infrared), “B3” (red), and “B2” (green). Lets now visualize TM data over San Francisco airport. Note that we can either define the visualization parameters as a variable (as in the previous code snippet) or place them in curly&nbsp;braces in the Map.addLayer&nbsp;function (as in this code snippet).</p>
<p>When you run this code, the TM image will display. Notice how many more pixels are displayed on your screen when compared to the MODIS image.</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="co">// TM </span></span>
@@ -1453,8 +1428,8 @@ Chapter Information
</figure>
</div>
</section>
<section id="sentinel-2-multispectral-instrument" class="level3" data-number="7.2.2">
<h3 data-number="7.2.2" class="anchored" data-anchor-id="sentinel-2-multispectral-instrument"><span class="header-section-number">7.2.2</span> Sentinel-2 MultiSpectral Instrument</h3>
<section id="sentinel-2-multispectral-instrument" class="level4" data-number="3.4.2.2">
<h4 data-number="3.4.2.2" class="anchored" data-anchor-id="sentinel-2-multispectral-instrument"><span class="header-section-number">3.4.2.2</span> Sentinel-2 MultiSpectral Instrument</h4>
<p>The MultiSpectral Instrument (MSI) flies aboard the Sentinel-2 satellites, which are operated by the European Space Agency. The red, green, blue, and near-infrared bands are captured at 10m resolution, while other bands are captured at 20m and 30m. The Sentinel-2A satellite was launched in 2015 and the 2B satellite was launched in 2017.</p>
<p>Search for “Sentinel 2 MSI” in the search bar, and add the “Sentinel-2 MSI: MultiSpectral Instrument, Level-1C” dataset to your workspace. Name it msi. In this dataset, the three bands for a color-IR image are called “B8” (infrared), “B4” (red), and “B3” (green).</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="co">// MSI </span></span>
@@ -1476,8 +1451,8 @@ Chapter Information
</figure>
</div>
</section>
<section id="national-agriculture-imagery-program-naip" class="level3" data-number="7.2.3">
<h3 data-number="7.2.3" class="anchored" data-anchor-id="national-agriculture-imagery-program-naip"><span class="header-section-number">7.2.3</span> National Agriculture Imagery Program (NAIP)</h3>
<section id="national-agriculture-imagery-program-naip" class="level4" data-number="3.4.2.3">
<h4 data-number="3.4.2.3" class="anchored" data-anchor-id="national-agriculture-imagery-program-naip"><span class="header-section-number">3.4.2.3</span> National Agriculture Imagery Program (NAIP)</h4>
<p>The National Agriculture Imagery Program (NAIP) is a U.S. government program to acquire imagery over the continental United States using airborne sensors. Data is collected for each state approximately every three years. The imagery has a spatial resolution of 0.52 m, depending on the state and the date collected. &nbsp;</p>
<p>Search for “naip” and import the data set for “NAIP: National Agriculture Imagery Program”. &nbsp;Name the import naip. In this dataset, the three bands for a color-IR image are called “N” (infrared), “R” (red), and “G” (green).</p>
<div class="sourceCode" id="cb33"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="co">// NAIP </span></span>
@@ -1513,11 +1488,11 @@ Note
</div>
</section>
</section>
<section id="temporal-resolution" class="level2" data-number="7.3">
<h2 data-number="7.3" class="anchored" data-anchor-id="temporal-resolution"><span class="header-section-number">7.3</span> Temporal Resolution</h2>
<section id="temporal-resolution" class="level3" data-number="3.4.3">
<h3 data-number="3.4.3" class="anchored" data-anchor-id="temporal-resolution"><span class="header-section-number">3.4.3</span> Temporal Resolution</h3>
<p>Temporal resolution&nbsp;refers to the revisit time, or temporal cadence&nbsp;of a particular sensors image stream. Revisit time is the number of days between sequential visits of the satellite to the same location on the Earths surface. Think of this as the frequency of pixels in a time series at a given location.</p>
<section id="landsat" class="level3" data-number="7.3.1">
<h3 data-number="7.3.1" class="anchored" data-anchor-id="landsat"><span class="header-section-number">7.3.1</span> Landsat</h3>
<section id="landsat" class="level4" data-number="3.4.3.1">
<h4 data-number="3.4.3.1" class="anchored" data-anchor-id="landsat"><span class="header-section-number">3.4.3.1</span> Landsat</h4>
<p>The Landsat satellites 5 and later are able to image a given location every 16 days. Lets use our existing tm&nbsp;dataset from Landsat 5. To see the time series of images at a location, you can filter an ImageCollection&nbsp;to an area and date range of interest&nbsp;and then print&nbsp;it. For example, to see the Landsat 5 images for three months in 1987, run the following code:</p>
<div class="sourceCode" id="cb34"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a><span class="co">// Explore Temporal Resolution </span></span>
@@ -1569,8 +1544,8 @@ Note
</figure>
</div>
</section>
<section id="sentinel-2" class="level3" data-number="7.3.2">
<h3 data-number="7.3.2" class="anchored" data-anchor-id="sentinel-2"><span class="header-section-number">7.3.2</span> Sentinel-2</h3>
<section id="sentinel-2" class="level4" data-number="3.4.3.2">
<h4 data-number="3.4.3.2" class="anchored" data-anchor-id="sentinel-2"><span class="header-section-number">3.4.3.2</span> Sentinel-2</h4>
<p>The Sentinel-2 programs two satellites are in coordinated orbits, so that each spot on Earth gets visited about every 5 days. Within Earth Engine, images from these two sensors are pooled in the same dataset. Lets create a chart using the MSI instrument dataset we have already imported.</p>
<div class="sourceCode" id="cb37"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Sentinel-2 has a 5 day revisit time. </span></span>
<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;msiChart <span class="op">=</span> ui<span class="op">.</span><span class="at">Chart</span><span class="op">.</span><span class="at">image</span><span class="op">.</span><span class="fu">series</span>({ </span>
@@ -1605,12 +1580,12 @@ Note
</div>
</section>
</section>
<section id="spectral-resolution" class="level2" data-number="7.4">
<h2 data-number="7.4" class="anchored" data-anchor-id="spectral-resolution"><span class="header-section-number">7.4</span> Spectral Resolution</h2>
<section id="spectral-resolution" class="level3" data-number="3.4.4">
<h3 data-number="3.4.4" class="anchored" data-anchor-id="spectral-resolution"><span class="header-section-number">3.4.4</span> Spectral Resolution</h3>
<p>Spectral resolution&nbsp;refers to the number and width of spectral bands in which the sensor takes measurements. You can think of the width of spectral bands as the wavelength intervals for each band. A sensor that measures radiance in multiple bands is called a multispectral&nbsp;sensor&nbsp;(generally 310 bands), while a sensor with many bands (possibly hundreds) is called a hyperspectral&nbsp;sensor.</p>
<p>Lets compare the multispectral MODIS instrument with the hyperspectral Hyperion&nbsp;sensor aboard the EO-1 satellite, which is also available in Earth Engine.</p>
<section id="modis" class="level3" data-number="7.4.1">
<h3 data-number="7.4.1" class="anchored" data-anchor-id="modis"><span class="header-section-number">7.4.1</span> MODIS</h3>
<section id="modis" class="level4" data-number="3.4.4.1">
<h4 data-number="3.4.4.1" class="anchored" data-anchor-id="modis"><span class="header-section-number">3.4.4.1</span> MODIS</h4>
<p>There is an easy way to check the number of bands in an image:</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb38-2"><a href="#cb38-2" aria-hidden="true" tabindex="-1"></a><span class="co">// Explore spectral resolution </span></span>
@@ -1659,8 +1634,8 @@ Note
</figure>
</div>
</section>
<section id="eo-1" class="level3" data-number="7.4.2">
<h3 data-number="7.4.2" class="anchored" data-anchor-id="eo-1"><span class="header-section-number">7.4.2</span> EO-1</h3>
<section id="eo-1" class="level4" data-number="3.4.4.2">
<h4 data-number="3.4.4.2" class="anchored" data-anchor-id="eo-1"><span class="header-section-number">3.4.4.2</span> EO-1</h4>
<p>Now lets compare MODIS with the EO-1 satellites hyperspectral sensor. Search for “eo-1” and import the “EO-1 Hyperion Hyperspectral Imager” dataset. Name it eo1. We can look at the number of bands from the EO-1 sensor.</p>
<div class="sourceCode" id="cb42"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Get the EO-1 band names as a ee.List </span></span>
<span id="cb42-2"><a href="#cb42-2" aria-hidden="true" tabindex="-1"></a>var&nbsp;eo1Image <span class="op">=</span> eo1&nbsp; <span class="at">&nbsp;</span><span class="op">.</span><span class="fu">filterDate</span>(<span class="st">'2015-01-01'</span><span class="op">,</span> <span class="st">'2016-01-01'</span>) </span>
@@ -1723,8 +1698,8 @@ Note
</div>
</section>
</section>
<section id="per-pixel-quality" class="level2" data-number="7.5">
<h2 data-number="7.5" class="anchored" data-anchor-id="per-pixel-quality"><span class="header-section-number">7.5</span> Per-Pixel Quality</h2>
<section id="per-pixel-quality" class="level3" data-number="3.4.5">
<h3 data-number="3.4.5" class="anchored" data-anchor-id="per-pixel-quality"><span class="header-section-number">3.4.5</span> Per-Pixel Quality</h3>
<p>As you saw above, an image consists of many bands. Some of these bands contain spectral responses of Earths surface, including the NIR, red, and green bands we examined in the Spectral Resolution section. What about the other bands? Some of these other bands contain valuable information, like pixel-by-pixel quality-control data.</p>
<p>For example, Sentinel-2 has a QA60 band, which contains the surface reflectance quality assurance&nbsp;information. Lets map it to inspect the values.</p>
<div class="sourceCode" id="cb44"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
@@ -1763,8 +1738,8 @@ Note
</div>
</div>
</section>
<section id="metadata" class="level2" data-number="7.6">
<h2 data-number="7.6" class="anchored" data-anchor-id="metadata"><span class="header-section-number">7.6</span> Metadata</h2>
<section id="metadata" class="level3" data-number="3.4.6">
<h3 data-number="3.4.6" class="anchored" data-anchor-id="metadata"><span class="header-section-number">3.4.6</span> Metadata</h3>
<p>In addition to band imagery and per-pixel quality flags, Earth Engine allows you to access substantial amounts of metadata associated with an image. This can all be easily printed to the Console&nbsp;for a single image.</p>
<p>Lets examine the metadata for the Sentinel-2 MSI.</p>
<p>/////<br>
@@ -1792,12 +1767,12 @@ Note
</div>
</div>
</section>
<section id="conclusion-3" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="conclusion-3">Conclusion</h2>
<section id="conclusion-3" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="conclusion-3">Conclusion</h3>
<p>A good understanding of the characteristics of your images&nbsp;is critical to your work in Earth Engine and the chapters going forward. You now know how to observe and query a variety of remote sensing&nbsp;datasets, and can choose among them for your work. For&nbsp;example, if you are interested in change detection, you might require a dataset with spectral resolution including near-infrared imagery and a fine temporal resolution. For analyses at a continental scale, you may prefer data with a coarse spatial scale, while analyses for specific forest stands may benefit from a very fine spatial scale.</p>
</section>
<section id="references-1" class="level2 unnumbered">
<h2 class="unnumbered anchored" data-anchor-id="references-1">References</h2>
<section id="references-1" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="references-1">References</h3>
<p>Fisher JRB, Acosta EA, Dennedy-Frank PJ, et al (2018) Impact of satellite imagery spatial resolution on land use classification accuracy and modeled water quality. Remote Sens Ecol Conserv 4:137149. https://doi.org/10.1002/rse2.61</p>