full draft

This commit is contained in:
Ollie Ballinger
2023-03-15 18:41:58 +00:00
parent 46b6ba63c3
commit 53e859f6d7
114 changed files with 4735 additions and 13248 deletions

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - 3&nbsp; Getting Started</title>
<title>Remote Sensing for OSINT - 1&nbsp; Getting Started</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -146,7 +146,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></h1>
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -162,19 +162,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -206,59 +208,34 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">A. Introduction</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -266,6 +243,36 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">C. Case Studies</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
</div>
</li>
@@ -283,6 +290,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -295,44 +307,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">3.1</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">1.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">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="#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">1.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">1.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">1.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">3.2</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">1.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">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="#accessing-an-image" id="toc-accessing-an-image" class="nav-link" data-scroll-target="#accessing-an-image"><span class="toc-section-number">1.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">1.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">1.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">1.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">1.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">1.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">3.3</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">1.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">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="#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">1.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">1.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">1.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">1.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">1.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">1.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">1.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">1.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">3.4</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">1.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">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="#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">1.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">1.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">1.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">1.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">1.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">1.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>
@@ -344,7 +356,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></h1>
<h1 class="title d-none d-lg-block"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></h1>
</div>
@@ -359,8 +371,8 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</header>
<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>
<section id="programming-basics" class="level2" data-number="1.1">
<h2 data-number="1.1" class="anchored" data-anchor-id="programming-basics"><span class="header-section-number">1.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">
@@ -403,8 +415,8 @@ Chapter Information
<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="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>
<section id="getting-started-in-the-code-editor" class="level3" data-number="1.1.1">
<h3 data-number="1.1.1" class="anchored" data-anchor-id="getting-started-in-the-code-editor"><span class="header-section-number">1.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">
@@ -459,8 +471,8 @@ 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="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>
<section id="javascript-basics" class="level3" data-number="1.1.2">
<h3 data-number="1.1.2" class="anchored" data-anchor-id="javascript-basics"><span class="header-section-number">1.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="level4 unnumbered">
<h4 class="unnumbered anchored" data-anchor-id="variables">Variables</h4>
@@ -519,8 +531,8 @@ Chapter Information
</figure>
</div>
</section>
<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>
<section id="comments" class="level4 unnumbbered" data-number="1.1.2.1">
<h4 class="unnumbbered anchored" data-number="1.1.2.1" data-anchor-id="comments"><span class="header-section-number">1.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>
@@ -539,8 +551,8 @@ Note
</div>
</section>
</section>
<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>
<section id="earth-engine-api-basics" class="level3" data-number="1.1.3">
<h3 data-number="1.1.3" class="anchored" data-anchor-id="earth-engine-api-basics"><span class="header-section-number">1.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">
@@ -600,8 +612,8 @@ Note
<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="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>
<section id="exploring-images" class="level2" data-number="1.2">
<h2 data-number="1.2" class="anchored" data-anchor-id="exploring-images"><span class="header-section-number">1.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">
@@ -638,8 +650,8 @@ Chapter Information
</section>
</div>
</div>
<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>
<section id="accessing-an-image" class="level3" data-number="1.2.1">
<h3 data-number="1.2.1" class="anchored" data-anchor-id="accessing-an-image"><span class="header-section-number">1.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>
@@ -657,8 +669,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="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>
<section id="visualizing-an-image" class="level3" data-number="1.2.2">
<h3 data-number="1.2.2" class="anchored" data-anchor-id="visualizing-an-image"><span class="header-section-number">1.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>
@@ -730,8 +742,8 @@ Note
</div>
</div>
</section>
<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>
<section id="true-color-composites" class="level3" data-number="1.2.3">
<h3 data-number="1.2.3" class="anchored" data-anchor-id="true-color-composites"><span class="header-section-number">1.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>
@@ -749,8 +761,8 @@ Note
</figure>
</div>
</section>
<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>
<section id="false-color-composites" class="level3" data-number="1.2.4">
<h3 data-number="1.2.4" class="anchored" data-anchor-id="false-color-composites"><span class="header-section-number">1.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>
@@ -807,8 +819,8 @@ Note
</div>
</div>
</section>
<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>
<section id="attributes-of-locations" class="level3" data-number="1.2.5">
<h3 data-number="1.2.5" class="anchored" data-anchor-id="attributes-of-locations"><span class="header-section-number">1.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>
@@ -830,8 +842,8 @@ Note
</figure>
</div>
</section>
<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>
<section id="abstract-rgb-composites" class="level3" data-number="1.2.6">
<h3 data-number="1.2.6" class="anchored" data-anchor-id="abstract-rgb-composites"><span class="header-section-number">1.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>
@@ -895,8 +907,8 @@ Note
<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="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>
<section id="survey-of-raster-datasets" class="level2" data-number="1.3">
<h2 data-number="1.3" class="anchored" data-anchor-id="survey-of-raster-datasets"><span class="header-section-number">1.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">
@@ -934,13 +946,13 @@ Chapter Information
</section>
</div>
</div>
<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>
<section id="image-collections-an-organized-set-of-images" class="level3" data-number="1.3.1">
<h3 data-number="1.3.1" class="anchored" data-anchor-id="image-collections-an-organized-set-of-images"><span class="header-section-number">1.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="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>
<section id="view-an-image-collection" class="level3" data-number="1.3.2">
<h3 data-number="1.3.2" class="anchored" data-anchor-id="view-an-image-collection"><span class="header-section-number">1.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>
@@ -1005,11 +1017,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="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>
<section id="filtering-image-collections" class="level3" data-number="1.3.3">
<h3 data-number="1.3.3" class="anchored" data-anchor-id="filtering-image-collections"><span class="header-section-number">1.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="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>
<section id="filter-by-date" class="level4" data-number="1.3.3.1">
<h4 data-number="1.3.3.1" class="anchored" data-anchor-id="filter-by-date"><span class="header-section-number">1.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>
@@ -1035,8 +1047,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="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>
<section id="filter-by-location" class="level4" data-number="1.3.3.2">
<h4 data-number="1.3.3.2" class="anchored" data-anchor-id="filter-by-location"><span class="header-section-number">1.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>
@@ -1064,8 +1076,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="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>
<section id="selecting-the-first-image" class="level4" data-number="1.3.3.3">
<h4 data-number="1.3.3.3" class="anchored" data-anchor-id="selecting-the-first-image"><span class="header-section-number">1.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>
@@ -1101,8 +1113,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="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>
<section id="collections-of-single-images" class="level3" data-number="1.3.4">
<h3 data-number="1.3.4" class="anchored" data-anchor-id="collections-of-single-images"><span class="header-section-number">1.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>
@@ -1160,8 +1172,8 @@ Note
</div>
</div>
</section>
<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>
<section id="modis-monthly-burned-areas" class="level3" data-number="1.3.5">
<h3 data-number="1.3.5" class="anchored" data-anchor-id="modis-monthly-burned-areas"><span class="header-section-number">1.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>
@@ -1194,8 +1206,8 @@ Note
</div>
<p>Save your script and start a new one by refreshing the page.</p>
</section>
<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>
<section id="methane" class="level3" data-number="1.3.6">
<h3 data-number="1.3.6" class="anchored" data-anchor-id="methane"><span class="header-section-number">1.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>
@@ -1231,8 +1243,8 @@ Note
</figure>
</div>
</section>
<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>
<section id="global-forest-change" class="level3" data-number="1.3.7">
<h3 data-number="1.3.7" class="anchored" data-anchor-id="global-forest-change"><span class="header-section-number">1.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>
@@ -1287,8 +1299,8 @@ Note
</div>
<p>Save your script and start a new one.</p>
</section>
<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>
<section id="digital-elevation-models" class="level3" data-number="1.3.8">
<h3 data-number="1.3.8" class="anchored" data-anchor-id="digital-elevation-models"><span class="header-section-number">1.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>
@@ -1327,8 +1339,8 @@ Note
<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="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>
<section id="the-remote-sensing-vocabulary" class="level2" data-number="1.4">
<h2 data-number="1.4" class="anchored" data-anchor-id="the-remote-sensing-vocabulary"><span class="header-section-number">1.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">
@@ -1367,8 +1379,8 @@ Chapter Information
<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="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>
<section id="searching-for-and-viewing-image-collection-information" class="level3" data-number="1.4.1">
<h3 data-number="1.4.1" class="anchored" data-anchor-id="searching-for-and-viewing-image-collection-information"><span class="header-section-number">1.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">
@@ -1408,12 +1420,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="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>
<section id="spatial-resolution" class="level3" data-number="1.4.2">
<h3 data-number="1.4.2" class="anchored" data-anchor-id="spatial-resolution"><span class="header-section-number">1.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="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>
<section id="landsat-thematic-mapper" class="level4" data-number="1.4.2.1">
<h4 data-number="1.4.2.1" class="anchored" data-anchor-id="landsat-thematic-mapper"><span class="header-section-number">1.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>
@@ -1433,8 +1445,8 @@ Chapter Information
</figure>
</div>
</section>
<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>
<section id="sentinel-2-multispectral-instrument" class="level4" data-number="1.4.2.2">
<h4 data-number="1.4.2.2" class="anchored" data-anchor-id="sentinel-2-multispectral-instrument"><span class="header-section-number">1.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>
@@ -1456,8 +1468,8 @@ Chapter Information
</figure>
</div>
</section>
<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>
<section id="national-agriculture-imagery-program-naip" class="level4" data-number="1.4.2.3">
<h4 data-number="1.4.2.3" class="anchored" data-anchor-id="national-agriculture-imagery-program-naip"><span class="header-section-number">1.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>
@@ -1493,11 +1505,11 @@ Note
</div>
</section>
</section>
<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>
<section id="temporal-resolution" class="level3" data-number="1.4.3">
<h3 data-number="1.4.3" class="anchored" data-anchor-id="temporal-resolution"><span class="header-section-number">1.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="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>
<section id="landsat" class="level4" data-number="1.4.3.1">
<h4 data-number="1.4.3.1" class="anchored" data-anchor-id="landsat"><span class="header-section-number">1.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>
@@ -1549,8 +1561,8 @@ Note
</figure>
</div>
</section>
<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>
<section id="sentinel-2" class="level4" data-number="1.4.3.2">
<h4 data-number="1.4.3.2" class="anchored" data-anchor-id="sentinel-2"><span class="header-section-number">1.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>
@@ -1585,12 +1597,12 @@ Note
</div>
</section>
</section>
<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>
<section id="spectral-resolution" class="level3" data-number="1.4.4">
<h3 data-number="1.4.4" class="anchored" data-anchor-id="spectral-resolution"><span class="header-section-number">1.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="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>
<section id="modis" class="level4" data-number="1.4.4.1">
<h4 data-number="1.4.4.1" class="anchored" data-anchor-id="modis"><span class="header-section-number">1.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>
@@ -1639,8 +1651,8 @@ Note
</figure>
</div>
</section>
<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>
<section id="eo-1" class="level4" data-number="1.4.4.2">
<h4 data-number="1.4.4.2" class="anchored" data-anchor-id="eo-1"><span class="header-section-number">1.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>
@@ -1703,8 +1715,8 @@ Note
</div>
</section>
</section>
<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>
<section id="per-pixel-quality" class="level3" data-number="1.4.5">
<h3 data-number="1.4.5" class="anchored" data-anchor-id="per-pixel-quality"><span class="header-section-number">1.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>
@@ -1743,21 +1755,22 @@ Note
</div>
</div>
</section>
<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>
<section id="metadata" class="level3" data-number="1.4.6">
<h3 data-number="1.4.6" class="anchored" data-anchor-id="metadata"><span class="header-section-number">1.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>
// Metadata<br>
/////<br>
print(MSI Image Metadata, msiImage);</p>
<div class="sourceCode" id="cb45"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb45-2"><a href="#cb45-2" aria-hidden="true" tabindex="-1"></a><span class="co">// Metadata </span></span>
<span id="cb45-3"><a href="#cb45-3" aria-hidden="true" tabindex="-1"></a><span class="co">///// </span></span>
<span id="cb45-4"><a href="#cb45-4" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(<span class="st">'MSI Image Metadata'</span><span class="op">,</span> msiImage)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Examine the object youve created in the Console (Fig. F1.3.20). Expand the image name, then the properties&nbsp;object.</p>
<p><img src="F1/image35.png" class="img-fluid"></p>
<p>Fig. F1.3.20 Checking the “CLOUDY_PIXEL_PERCENTAGE” property in the metadata for Sentinel-2</p>
<p>The first entry is the CLOUDY_PIXEL_PERCENTAGE&nbsp;information. Distinct from the cloudiness flag attached to every pixel, this is an image-level summary assessment of the overall cloudiness in the image. In addition to viewing the value, you might find it useful to&nbsp;print it to the screen, for example, or to record a list of cloudiness values in a set of images. Metadata properties can&nbsp;be extracted from an images properties using the get&nbsp;function, and printed to the Console.</p>
<p>// Image-level Cloud info<br>
var msiCloudiness = msiImage.get(CLOUDY_PIXEL_PERCENTAGE);</p>
<p>print(MSI CLOUDY_PIXEL_PERCENTAGE:, msiCloudiness);</p>
<div class="sourceCode" id="cb46"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Image-level Cloud info </span></span>
<span id="cb46-2"><a href="#cb46-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> msiCloudiness <span class="op">=</span> msiImage<span class="op">.</span><span class="fu">get</span>(<span class="st">'CLOUDY_PIXEL_PERCENTAGE'</span>)<span class="op">;</span> </span>
<span id="cb46-3"><a href="#cb46-3" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb46-4"><a href="#cb46-4" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(<span class="st">'MSI CLOUDY_PIXEL_PERCENTAGE:'</span><span class="op">,</span> msiCloudiness)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="callout-note callout callout-style-default callout-captioned">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
@@ -2036,12 +2049,12 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./ch2.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></span>
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Data Acquisition</span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./F2.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - 4&nbsp; Interpreting Images</title>
<title>Remote Sensing for OSINT - 2&nbsp; Interpreting Images</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -146,7 +146,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></h1>
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -162,19 +162,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -210,10 +212,20 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -221,44 +233,29 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./F2.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">B. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -283,6 +280,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -295,24 +297,24 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#image-manipulation-bands-arithmetic-thresholds-and-masks" id="toc-image-manipulation-bands-arithmetic-thresholds-and-masks" class="nav-link active" data-scroll-target="#image-manipulation-bands-arithmetic-thresholds-and-masks"><span class="toc-section-number">4.1</span> Image Manipulation: Bands, Arithmetic, Thresholds, and Masks</a>
<li><a href="#image-manipulation-bands-arithmetic-thresholds-and-masks" id="toc-image-manipulation-bands-arithmetic-thresholds-and-masks" class="nav-link active" data-scroll-target="#image-manipulation-bands-arithmetic-thresholds-and-masks"><span class="toc-section-number">2.1</span> Image Manipulation: Bands, Arithmetic, Thresholds, and Masks</a>
<ul class="collapse">
<li><a href="#band-arithmetic-in-earth-engine" id="toc-band-arithmetic-in-earth-engine" class="nav-link" data-scroll-target="#band-arithmetic-in-earth-engine"><span class="toc-section-number">4.1.1</span> Band Arithmetic in Earth Engine</a></li>
<li><a href="#thresholding-masking-and-remapping-images" id="toc-thresholding-masking-and-remapping-images" class="nav-link" data-scroll-target="#thresholding-masking-and-remapping-images"><span class="toc-section-number">4.1.2</span> Thresholding, Masking, and Remapping Images</a></li>
<li><a href="#band-arithmetic-in-earth-engine" id="toc-band-arithmetic-in-earth-engine" class="nav-link" data-scroll-target="#band-arithmetic-in-earth-engine"><span class="toc-section-number">2.1.1</span> Band Arithmetic in Earth Engine</a></li>
<li><a href="#thresholding-masking-and-remapping-images" id="toc-thresholding-masking-and-remapping-images" class="nav-link" data-scroll-target="#thresholding-masking-and-remapping-images"><span class="toc-section-number">2.1.2</span> Thresholding, Masking, and Remapping Images</a></li>
<li><a href="#conclusion" id="toc-conclusion" class="nav-link" data-scroll-target="#conclusion">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="#interpreting-an-image-classification" id="toc-interpreting-an-image-classification" class="nav-link" data-scroll-target="#interpreting-an-image-classification"><span class="toc-section-number">4.2</span> Interpreting an Image: Classification</a>
<li><a href="#interpreting-an-image-classification" id="toc-interpreting-an-image-classification" class="nav-link" data-scroll-target="#interpreting-an-image-classification"><span class="toc-section-number">2.2</span> Interpreting an Image: Classification</a>
<ul class="collapse">
<li><a href="#supervised-classification" id="toc-supervised-classification" class="nav-link" data-scroll-target="#supervised-classification"><span class="toc-section-number">4.2.1</span> Supervised Classification</a></li>
<li><a href="#unsupervised-classification" id="toc-unsupervised-classification" class="nav-link" data-scroll-target="#unsupervised-classification"><span class="toc-section-number">4.2.2</span> Unsupervised Classification</a></li>
<li><a href="#supervised-classification" id="toc-supervised-classification" class="nav-link" data-scroll-target="#supervised-classification"><span class="toc-section-number">2.2.1</span> Supervised Classification</a></li>
<li><a href="#unsupervised-classification" id="toc-unsupervised-classification" class="nav-link" data-scroll-target="#unsupervised-classification"><span class="toc-section-number">2.2.2</span> Unsupervised Classification</a></li>
<li><a href="#conclusion-1" id="toc-conclusion-1" class="nav-link" data-scroll-target="#conclusion-1">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>
<li><a href="#accuracy-assessment-quantifying-classification-quality" id="toc-accuracy-assessment-quantifying-classification-quality" class="nav-link" data-scroll-target="#accuracy-assessment-quantifying-classification-quality"><span class="toc-section-number">4.3</span> Accuracy Assessment: Quantifying Classification Quality</a>
<li><a href="#accuracy-assessment-quantifying-classification-quality" id="toc-accuracy-assessment-quantifying-classification-quality" class="nav-link" data-scroll-target="#accuracy-assessment-quantifying-classification-quality"><span class="toc-section-number">2.3</span> Accuracy Assessment: Quantifying Classification Quality</a>
<ul class="collapse">
<li><a href="#quantifying-classification-accuracy-through-a-confusion-matrix" id="toc-quantifying-classification-accuracy-through-a-confusion-matrix" class="nav-link" data-scroll-target="#quantifying-classification-accuracy-through-a-confusion-matrix"><span class="toc-section-number">4.3.1</span> Quantifying Classification Accuracy Through a Confusion Matrix</a></li>
<li><a href="#hyperparameter-tuning" id="toc-hyperparameter-tuning" class="nav-link" data-scroll-target="#hyperparameter-tuning"><span class="toc-section-number">4.3.2</span> Hyperparameter tuning</a></li>
<li><a href="#quantifying-classification-accuracy-through-a-confusion-matrix" id="toc-quantifying-classification-accuracy-through-a-confusion-matrix" class="nav-link" data-scroll-target="#quantifying-classification-accuracy-through-a-confusion-matrix"><span class="toc-section-number">2.3.1</span> Quantifying Classification Accuracy Through a Confusion Matrix</a></li>
<li><a href="#hyperparameter-tuning" id="toc-hyperparameter-tuning" class="nav-link" data-scroll-target="#hyperparameter-tuning"><span class="toc-section-number">2.3.2</span> Hyperparameter tuning</a></li>
<li><a href="#conclusion-2" id="toc-conclusion-2" class="nav-link" data-scroll-target="#conclusion-2">Conclusion</a></li>
</ul></li>
</ul>
@@ -323,7 +325,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></h1>
<h1 class="title d-none d-lg-block"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></h1>
</div>
@@ -339,8 +341,8 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</header>
<p>Now that you know how images are viewed and what kinds of images exist in Earth Engine, how do we manipulate them? To gain the skills of interpreting images, youll work with bands, combining values to form indices and masking unwanted pixels. Then, youll learn some of the techniques available in Earth Engine for classifying images and interpreting the results.</p>
<section id="image-manipulation-bands-arithmetic-thresholds-and-masks" class="level2" data-number="4.1">
<h2 data-number="4.1" class="anchored" data-anchor-id="image-manipulation-bands-arithmetic-thresholds-and-masks"><span class="header-section-number">4.1</span> Image Manipulation: Bands, Arithmetic, Thresholds, and Masks</h2>
<section id="image-manipulation-bands-arithmetic-thresholds-and-masks" class="level2" data-number="2.1">
<h2 data-number="2.1" class="anchored" data-anchor-id="image-manipulation-bands-arithmetic-thresholds-and-masks"><span class="header-section-number">2.1</span> Image Manipulation: Bands, Arithmetic, Thresholds, and Masks</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">
@@ -393,12 +395,12 @@ Chapter Information
<p>Spectral indices use math to express how objects reflect light across multiple portions of the spectrum as a single number. Indices combine multiple bands, often with simple operations of subtraction and division, to create a single value across an image that is intended to help to distinguish particular land uses or land covers of interest. Using Fig. F2.0.2, you can imagine which wavelengths might be the most informative for distinguishing among a variety of land covers. We will explore a variety of calculations made from combinations of bands in the following sections.</p>
<p>Indices derived from satellite imagery are used as the basis of many remote-sensing analyses. Indices have been used in thousands of applications, from detecting anthropogenic deforestation to examining crop health. For example, the growth of economically important crops such as wheat and cotton can be monitored throughout the growing season: Bare soil reflects more red wavelengths, whereas growing crops reflect more of the near-infrared (NIR) wavelengths. Thus, calculating a ratio of these two bands can help monitor how well crops are growing (Jackson and Huete 1991).</p>
</section>
<section id="band-arithmetic-in-earth-engine" class="level3" data-number="4.1.1">
<h3 data-number="4.1.1" class="anchored" data-anchor-id="band-arithmetic-in-earth-engine"><span class="header-section-number">4.1.1</span> Band Arithmetic in Earth Engine</h3>
<section id="band-arithmetic-in-earth-engine" class="level3" data-number="2.1.1">
<h3 data-number="2.1.1" class="anchored" data-anchor-id="band-arithmetic-in-earth-engine"><span class="header-section-number">2.1.1</span> Band Arithmetic in Earth Engine</h3>
<p>If you have not already done so, be sure to add the books code repository to the Code Editor by entering <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=1671458829783542&amp;usg=AOvVaw2f8xfEZP6c0zP_Ke8jL26U"></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=1671458829783919&amp;usg=AOvVaw2i09J44MzpMZkjV_JLEnNR">https://code.earthengine.google.com/?accept_repo=projects/gee-edu/book</a> 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=1671458829784270&amp;usg=AOvVaw1Kr82KG60ZeFLYC8cOZ67A">this link</a> for help.</p>
<p>Many indices can be calculated using band arithmetic in Earth Engine. Band arithmetic is the process of adding, subtracting, multiplying, or dividing two or more bands from an image. Here well first do this manually, and then show you some more efficient ways to perform band arithmetic in Earth Engine.</p>
<section id="arithmetic-calculation-of-ndvi" class="level4" data-number="4.1.1.1">
<h4 data-number="4.1.1.1" class="anchored" data-anchor-id="arithmetic-calculation-of-ndvi"><span class="header-section-number">4.1.1.1</span> Arithmetic Calculation of NDVI</h4>
<section id="arithmetic-calculation-of-ndvi" class="level4" data-number="2.1.1.1">
<h4 data-number="2.1.1.1" class="anchored" data-anchor-id="arithmetic-calculation-of-ndvi"><span class="header-section-number">2.1.1.1</span> Arithmetic Calculation of NDVI</h4>
<p>The red and near-infrared bands provide a lot of information about vegetation due to vegetations high reflectance in these wavelengths. Take a look at Fig. F2.0.2 and note, in particular, that vegetation curves (graphed in green) have relatively high reflectance in the NIR range (approximately 750900 nm). Also note that vegetation has low reflectance in the red range (approximately 630690 nm), where sunlight is absorbed by chlorophyll. This suggests that if the red and near-infrared bands could be combined, they would provide substantial information about vegetation.</p>
<p>Soon after the launch of Landsat 1 in 1972, analysts worked to devise a robust single value that would convey the health of vegetation along a scale of 1 to 1. This yielded the NDVI, using the formula:</p>
<p><img src="F2/image1.png" class="img-fluid"> (F2.0.1)</p>
@@ -458,8 +460,8 @@ Chapter Information
</div>
<p>Using these simple arithmetic tools, you can build almost any index, or develop and visualize your own. Earth Engine allows you to quickly and easily calculate and display the index across a large area.</p>
</section>
<section id="single-operation-computation-of-normalized-difference-for-ndvi" class="level4" data-number="4.1.1.2">
<h4 data-number="4.1.1.2" class="anchored" data-anchor-id="single-operation-computation-of-normalized-difference-for-ndvi"><span class="header-section-number">4.1.1.2</span> Single-Operation Computation of Normalized Difference for NDVI</h4>
<section id="single-operation-computation-of-normalized-difference-for-ndvi" class="level4" data-number="2.1.1.2">
<h4 data-number="2.1.1.2" class="anchored" data-anchor-id="single-operation-computation-of-normalized-difference-for-ndvi"><span class="header-section-number">2.1.1.2</span> Single-Operation Computation of Normalized Difference for NDVI</h4>
<p>Normalized differences like NDVI are so common in remote sensing that Earth Engine provides the ability to do that particular sequence of subtraction, addition, and division in a single step, using the normalizedDifference method. This method takes an input image, along with bands you specify, and creates a normalized difference of those two bands. The NDVI computation previously created with band arithmetic can be replaced with one line of code:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Now use the built-in normalizedDifference function to achieve the same outcome. </span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> ndviND <span class="op">=</span> sfoImage<span class="op">.</span><span class="fu">normalizedDifference</span>([<span class="st">'B8'</span><span class="op">,</span> <span class="st">'B4'</span>])<span class="op">;</span> </span>
@@ -470,8 +472,8 @@ Chapter Information
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a>}<span class="op">,</span> <span class="st">'NDVI normalizedDiff'</span>)<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Note that the order in which you provide the two bands to normalizedDifference is important. We use B8, the near-infrared band, as the first parameter, and the red band B4 as the second. If your two computations of NDVI do not look identical when drawn to the screen, check to make sure that the order you have for the NIR and red bands is correct.</p>
</section>
<section id="using-normalized-difference-for-ndwi" class="level4" data-number="4.1.1.3">
<h4 data-number="4.1.1.3" class="anchored" data-anchor-id="using-normalized-difference-for-ndwi"><span class="header-section-number">4.1.1.3</span> Using Normalized Difference for NDWI</h4>
<section id="using-normalized-difference-for-ndwi" class="level4" data-number="2.1.1.3">
<h4 data-number="2.1.1.3" class="anchored" data-anchor-id="using-normalized-difference-for-ndwi"><span class="header-section-number">2.1.1.3</span> Using Normalized Difference for NDWI</h4>
<p>As mentioned, the normalized difference approach is used for many different indices. Lets apply the same normalizedDifference method to another index.</p>
<p>The Normalized Difference Water Index (NDWI) was developed by Gao (1996) as an index of vegetation water content. The index is sensitive to changes in the liquid content of vegetation canopies. This means that the index can be used, for example, to detect vegetation experiencing drought conditions or differentiate crop irrigation levels. In dry areas, crops that are irrigated can be differentiated from natural vegetation. It is also sometimes called the Normalized Difference Moisture Index (NDMI). NDWI is formulated as follows:</p>
<div class="quarto-figure quarto-figure-center">
@@ -512,11 +514,11 @@ Note
</div>
</section>
</section>
<section id="thresholding-masking-and-remapping-images" class="level3" data-number="4.1.2">
<h3 data-number="4.1.2" class="anchored" data-anchor-id="thresholding-masking-and-remapping-images"><span class="header-section-number">4.1.2</span> Thresholding, Masking, and Remapping Images</h3>
<section id="thresholding-masking-and-remapping-images" class="level3" data-number="2.1.2">
<h3 data-number="2.1.2" class="anchored" data-anchor-id="thresholding-masking-and-remapping-images"><span class="header-section-number">2.1.2</span> Thresholding, Masking, and Remapping Images</h3>
<p>The previous section in this chapter discussed how to use band arithmetic to manipulate images. Those methods created new continuous values by combining bands within an image. This section uses logical operators to categorize band or index values to create a categorized image.</p>
<section id="implementing-a-threshold" class="level4" data-number="4.1.2.1">
<h4 data-number="4.1.2.1" class="anchored" data-anchor-id="implementing-a-threshold"><span class="header-section-number">4.1.2.1</span> Implementing a Threshold</h4>
<section id="implementing-a-threshold" class="level4" data-number="2.1.2.1">
<h4 data-number="2.1.2.1" class="anchored" data-anchor-id="implementing-a-threshold"><span class="header-section-number">2.1.2.1</span> Implementing a Threshold</h4>
<p>Implementing a threshold uses a number (the threshold value) and logical operators to help us partition the variability of images into categories. For example, recall our map of NDVI. High amounts of vegetation have NDVI values near 1 and non-vegetated areas are near 0. If we want to see what areas of the map have vegetation, we can use a threshold to generalize the NDVI value in each pixel as being either “no vegetation” or “vegetation”. That is a substantial simplification, to be sure, but can help us to better comprehend the rich variation on the Earths surface. This type of categorization may be useful if, for example, we want to look at the proportion of a city that is vegetated. Lets create a Sentinel-2 map of NDVI near Seattle, Washington, USA. Enter the code below in a new script.</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><span class="co">// Create an NDVI image using Sentinel 2. </span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> seaPoint <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">122.2040</span><span class="op">,</span> <span class="fl">47.6221</span>)<span class="op">;</span> </span>
@@ -564,8 +566,8 @@ Note
<p>Use the Inspector tool to explore this new layer. If you click on a green location, that NDVI should be greater than 0.5. If you click on a white pixel, the NDVI value should be equal to or less than 0.5.</p>
<p>Other operators in this Boolean family include less than (lt), less than or equal to (lte), equal to (eq), not equal to (neq), and greater than or equal to (gte) and more.</p>
</section>
<section id="building-complex-categorizations-with-.where" class="level4" data-number="4.1.2.2">
<h4 data-number="4.1.2.2" class="anchored" data-anchor-id="building-complex-categorizations-with-.where"><span class="header-section-number">4.1.2.2</span> Building Complex Categorizations with .where</h4>
<section id="building-complex-categorizations-with-.where" class="level4" data-number="2.1.2.2">
<h4 data-number="2.1.2.2" class="anchored" data-anchor-id="building-complex-categorizations-with-.where"><span class="header-section-number">2.1.2.2</span> Building Complex Categorizations with .where</h4>
<p>A binary map classifying NDVI is very useful. However, there are situations where you may want to split your image into more than two bins. Earth Engine provides a tool, the where method, that conditionally evaluates to true or false within each pixel depending on the outcome of a test. This is analogous to an if statement seen commonly in other languages. However, to perform this logic when programming for Earth Engine, we avoid using the JavaScript if statement. Importantly, JavaScript if commands are not calculated on Googles servers, and can create serious problems when running your code—in effect, the servers try to ship all of the information to be executed to your own computers browser, which is very underequipped for such enormous tasks. Instead, we use the where clause for conditional logic.</p>
<p>Suppose instead of just splitting the forested areas from the non-forested areas in our NDVI, we want to split the image into likely water, non-forested, and forested areas. We can use where and thresholds of -0.1 and 0.5. We will start by creating an image using ee.Image. We then clip the new image so that it covers the same area as our seaNDVI layer.</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><span class="co">// Implement .where. </span></span>
@@ -593,8 +595,8 @@ Note
</figure>
</div>
</section>
<section id="masking-specific-values-in-an-image" class="level4" data-number="4.1.2.3">
<h4 data-number="4.1.2.3" class="anchored" data-anchor-id="masking-specific-values-in-an-image"><span class="header-section-number">4.1.2.3</span> Masking Specific Values in an Image</h4>
<section id="masking-specific-values-in-an-image" class="level4" data-number="2.1.2.3">
<h4 data-number="2.1.2.3" class="anchored" data-anchor-id="masking-specific-values-in-an-image"><span class="header-section-number">2.1.2.3</span> Masking Specific Values in an Image</h4>
<p>Masking an image is a technique that removes specific areas of an image—those covered by the mask—from being displayed or analyzed. Earth Engine allows you to both view the current mask and update the mask.</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">// Implement masking. </span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="co">// View the seaVeg layer's current mask. </span></span>
@@ -638,8 +640,8 @@ Note
</figure>
</div>
</section>
<section id="remapping-values-in-an-image" class="level4" data-number="4.1.2.4">
<h4 data-number="4.1.2.4" class="anchored" data-anchor-id="remapping-values-in-an-image"><span class="header-section-number">4.1.2.4</span> Remapping Values in an Image</h4>
<section id="remapping-values-in-an-image" class="level4" data-number="2.1.2.4">
<h4 data-number="2.1.2.4" class="anchored" data-anchor-id="remapping-values-in-an-image"><span class="header-section-number">2.1.2.4</span> Remapping Values in an Image</h4>
<p>Remapping takes specific values in an image and assigns them a different value. This is particularly useful for categorical datasets, including those you read about in Chap. F1.2 and those we have created earlier in this chapter.</p>
<p>Lets use the remap method to change the values for our seaWhere layer. Note that since were changing the middle value to be the largest, well need to adjust our palette as well.</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="co">// Implement remapping. </span></span>
@@ -695,8 +697,8 @@ Note
<p>Souza Jr CM, Siqueira JV, Sales MH, et al (2013) Ten-year Landsat classification of deforestation and forest degradation in the Brazilian Amazon. Remote Sens 5:54935513. https://doi.org/10.3390/rs5115493</p>
</section>
</section>
<section id="interpreting-an-image-classification" class="level2" data-number="4.2">
<h2 data-number="4.2" class="anchored" data-anchor-id="interpreting-an-image-classification"><span class="header-section-number">4.2</span> Interpreting an Image: Classification</h2>
<section id="interpreting-an-image-classification" class="level2" data-number="2.2">
<h2 data-number="2.2" class="anchored" data-anchor-id="interpreting-an-image-classification"><span class="header-section-number">2.2</span> Interpreting an Image: Classification</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">
@@ -747,8 +749,8 @@ Chapter Information
<p>Image classification techniques for generating land cover and land use information have been in use since the 1980s (Li et al.&nbsp;2014). Here, we will cover the concepts of pixel-based supervised and unsupervised classifications, testing out different classifiers. Chapter F3.3 covers the concept and application of object-based classification.</p>
<p>It is important to define land use and land cover. Land cover relates to the physical characteristics of the surface: simply put, it documents whether an area of the Earths surface is covered by forests, water, impervious surfaces, etc. Land use refers to how this land is being used by people. For example, herbaceous vegetation is considered a land cover but can indicate different land uses: the grass in a pasture is an agricultural land use, whereas the grass in an urban area can be classified as a park.</p>
</section>
<section id="supervised-classification" class="level3" data-number="4.2.1">
<h3 data-number="4.2.1" class="anchored" data-anchor-id="supervised-classification"><span class="header-section-number">4.2.1</span> Supervised Classification</h3>
<section id="supervised-classification" class="level3" data-number="2.2.1">
<h3 data-number="2.2.1" class="anchored" data-anchor-id="supervised-classification"><span class="header-section-number">2.2.1</span> Supervised Classification</h3>
<p>If you have not already done so, be sure to add the books code repository to the Code Editor by entering <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=1671458829866098&amp;usg=AOvVaw16x5swm9HlorS5Mbw7E42X"></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=1671458829866485&amp;usg=AOvVaw0-N-JCWWgnM493BKa7Ichm">https://code.earthengine.google.com/?accept_repo=projects/gee-edu/book</a> 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=1671458829866823&amp;usg=AOvVaw0ytMyRvutssBcVr2GdcBHA">this link</a> for help.</p>
<p>Supervised classification uses a training dataset with known labels and representing the spectral characteristics of each land cover class of interest to “supervise” the classification. The overall approach of a supervised classification in Earth Engine is summarized as follows:</p>
<ol type="1">
@@ -784,18 +786,13 @@ Chapter Information
<p></p><figcaption class="figure-caption">Fig. F2.1.2 Landsat image</figcaption><p></p>
</figure>
</div>
<p>Using the Geometry Tools, we will create points on the Landsat image that represent land cover classes of interest to use as our training data. Well need to do two things: (1) identify where each land cover occurs on the ground, and (2) label the points with the proper class number. For this exercise, we will use the classes and codes shown in Table 2.1.1.</p>
<p>Table 2.1.1 Land cover classes</p>
<p>Class</p>
<p>Class code</p>
<p>Forest</p>
<p>0</p>
<p>Developed</p>
<p>1</p>
<p>Water</p>
<p>2</p>
<p>Herbaceous</p>
<p>3</p>
<p>Using the Geometry Tools, we will create points on the Landsat image that represent land cover classes of interest to use as our training data. Well need to do two things: (1) identify where each land cover occurs on the ground, and (2) label the points with the proper class number. For this exercise, we will use the classes and codes shown below:</p>
<ul>
<li>Forest: 0</li>
<li>Developed: 1</li>
<li>Water: 2</li>
<li>Herbaceous: 3</li>
</ul>
<p>In the Geometry Tools, click on the marker option (Fig. F2.1.3). This will create a point geometry which will show up as an import named “geometry”. Click on the gear icon to configure this import.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
@@ -969,8 +966,8 @@ Note
</div>
</div>
</section>
<section id="unsupervised-classification" class="level3" data-number="4.2.2">
<h3 data-number="4.2.2" class="anchored" data-anchor-id="unsupervised-classification"><span class="header-section-number">4.2.2</span> Unsupervised Classification</h3>
<section id="unsupervised-classification" class="level3" data-number="2.2.2">
<h3 data-number="2.2.2" class="anchored" data-anchor-id="unsupervised-classification"><span class="header-section-number">2.2.2</span> Unsupervised Classification</h3>
<p>In an unsupervised classification, we have the opposite process of supervised classification. Spectral classes are grouped first and then categorized into clusters. Therefore, in Earth Engine, these classifiers are ee.Clusterer objects. They are “self-taught” algorithms that do not use a set of labeled training data (i.e., they are “unsupervised”). You can think of it as performing a task that you have not experienced before, starting by gathering as much information as possible. For example, imagine learning a new language without knowing the basic grammar, learning only by watching a TV series in that language, listening to examples, and finding patterns.</p>
<p>Similar to the supervised classification, unsupervised classification in Earth Engine has this workflow:</p>
<ol type="1">
@@ -1045,8 +1042,8 @@ Note
<p>Witten IH, Frank E, Hall MA, et al (2005) Practical machine learning tools and techniques. In: Data Mining. pp 4</p>
</section>
</section>
<section id="accuracy-assessment-quantifying-classification-quality" class="level2" data-number="4.3">
<h2 data-number="4.3" class="anchored" data-anchor-id="accuracy-assessment-quantifying-classification-quality"><span class="header-section-number">4.3</span> Accuracy Assessment: Quantifying Classification Quality</h2>
<section id="accuracy-assessment-quantifying-classification-quality" class="level2" data-number="2.3">
<h2 data-number="2.3" class="anchored" data-anchor-id="accuracy-assessment-quantifying-classification-quality"><span class="header-section-number">2.3</span> Accuracy Assessment: Quantifying Classification Quality</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">
@@ -1090,21 +1087,17 @@ Chapter Information
<p>In Chap. F2.1, we asked whether the classification results were satisfactory. In remote sensing, the quantification of the answer to that question is called accuracy assessment. In the classification context, accuracy measurements are often derived from a confusion matrix.</p>
<p>In a thorough accuracy assessment, we think carefully about the sampling design, the response design, and the analysis (Olofsson et al.&nbsp;2014). Fundamental protocols are taken into account to produce scientifically rigorous and transparent estimates of accuracy and area, which requires robust planning and time. In a standard setting, we would calculate the number of samples needed for measuring accuracy (sampling design). Here, we will focus mainly on the last step, analysis, by examining the confusion matrix and learning how to calculate the accuracy metrics. This will be done by partitioning the existing data into training and testing sets.</p>
</section>
<section id="quantifying-classification-accuracy-through-a-confusion-matrix" class="level3" data-number="4.3.1">
<h3 data-number="4.3.1" class="anchored" data-anchor-id="quantifying-classification-accuracy-through-a-confusion-matrix"><span class="header-section-number">4.3.1</span> Quantifying Classification Accuracy Through a Confusion Matrix</h3>
<section id="quantifying-classification-accuracy-through-a-confusion-matrix" class="level3" data-number="2.3.1">
<h3 data-number="2.3.1" class="anchored" data-anchor-id="quantifying-classification-accuracy-through-a-confusion-matrix"><span class="header-section-number">2.3.1</span> Quantifying Classification Accuracy Through a Confusion Matrix</h3>
<p>If you have not already done so, be sure to add the books code repository to the Code Editor by entering <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=1671458829937499&amp;usg=AOvVaw3qqOwSX_A-Pllh6X3X31q4"></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=1671458829937976&amp;usg=AOvVaw0WioXIhzue8-WoaX4UtabH">https://code.earthengine.google.com/?accept_repo=projects/gee-edu/book</a> 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=1671458829938470&amp;usg=AOvVaw2CH8V3-_qV99EcgMxUAaSO">this link</a> for help.</p>
<p>To illustrate some of the basic ideas about classification accuracy, we will revisit the data and location of part of Chap. F2.1, where we tested different classifiers and classified a Landsat image of the area around Milan, Italy. We will name this dataset data. This variable is a FeatureCollection with features containing the “class” values (Table F2.2.1) and spectral information of four land cover / land use classes: forest, developed, water, and herbaceous (see Fig. F2.1.8 and Fig. F2.1.9 for a refresher). We will also define a variable, predictionBands, which is a list of bands that will be used for prediction (classification)—the spectral information in the data variable.</p>
<p>Table F2.2.1 Land cover classes</p>
<p>Class</p>
<p>Class value</p>
<p>Forest</p>
<p>0</p>
<p>Developed</p>
<p>1</p>
<p>Water</p>
<p>2</p>
<p>Herbaceous</p>
<p>3</p>
<p>To illustrate some of the basic ideas about classification accuracy, we will revisit the data and location of part of Chap. F2.1, where we tested different classifiers and classified a Landsat image of the area around Milan, Italy. We will name this dataset data. This variable is a FeatureCollection with features containing the “class” values and spectral information of four land cover / land use classes: forest, developed, water, and herbaceous (see Fig. F2.1.8 and Fig. F2.1.9 for a refresher). We will also define a variable, predictionBands, which is a list of bands that will be used for prediction (classification)—the spectral information in the data variable.</p>
<p>Class Values:</p>
<ul>
<li>Forest: 0</li>
<li>Developed: 1</li>
<li>Water: 2</li>
<li>Herbaceous: 3</li>
</ul>
<p>The first step is to partition the set of known values into training and testing sets in order to have something for the classifier to predict over that it has not been shown before (the testing set), mimicking unseen data that the model might see in the future. We add a column of random numbers to our FeatureCollection using the randomColumn method. Then, we filter the features into about 80% for training and 20% for testing using ee.Filter. Copy and paste the code below to partition the data and filter features based on the random number.</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">// Import the reference dataset. </span></span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> data <span class="op">=</span> ee<span class="op">.</span><span class="fu">FeatureCollection</span>( <span class="st">'projects/gee-book/assets/F2-2/milan_data'</span>)<span class="op">;</span> </span>
@@ -1129,16 +1122,42 @@ Chapter Information
<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a>})<span class="op">;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Now, lets discuss what a confusion matrix is. A confusion matrix describes the quality of a classification by comparing the predicted values to the actual values. A simple example is a confusion matrix for a binary classification into the classes “positive” and “negative,” as shown in Table F2.2.1.</p>
<p>Table F2.2.1 Confusion matrix for a binary classification where the classes are “positive” and “negative”</p>
<p>Actual values</p>
<p>Positive</p>
<p>Negative</p>
<p>Predicted values</p>
<p>Positive</p>
<p>TP (true positive)</p>
<p>FP (false positive)</p>
<p>Negative</p>
<p>FN (false negative)</p>
<p>TN (true negative)</p>
<table class="table">
<colgroup>
<col style="width: 25%">
<col style="width: 14%">
<col style="width: 30%">
<col style="width: 30%">
</colgroup>
<thead>
<tr class="header">
<th></th>
<th></th>
<th style="text-align: center;">Actual values</th>
<th style="text-align: center;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td></td>
<td></td>
<td style="text-align: center;">Positive</td>
<td style="text-align: center;">Negative</td>
</tr>
<tr class="even">
<td>Predicted values</td>
<td>Positive</td>
<td style="text-align: center;">TP (true positive)</td>
<td style="text-align: center;">FP (false positive)</td>
</tr>
<tr class="odd">
<td></td>
<td>Negative</td>
<td style="text-align: center;">FN (false negative)</td>
<td style="text-align: center;">TN (true negative)</td>
</tr>
</tbody>
</table>
<p>In Table F2.2.1, the columns represent the actual values (the truth), while the rows represent the predictions (the classification). “True positive” (TP) and “true negative” (TN) mean that the classification of a pixel matches the truth (e.g., a water pixel correctly classified as water). “False positive” (FP) and “false negative” (FN) mean that the classification of a pixel does not match the truth (e.g., a non-water pixel incorrectly classified as water).</p>
<ul>
<li>TP: classified as positive and the actual class is positive</li>
@@ -1148,16 +1167,36 @@ Chapter Information
</ul>
<p>We can extract some statistical information from a confusion matrix.. Lets look at an example to make this clearer. Table F2.2.2 is a confusion matrix for a sample of 1,000 pixels for a classifier that identifies whether a pixel is forest (positive) or non-forest (negative), a binary classification.</p>
<p>Table F2.2.2 Confusion matrix for a binary classification where the classes are “positive” (forest) and “negative” (non-forest)</p>
<p>Actual values</p>
<p>Positive</p>
<p>Negative</p>
<p>Predicted values</p>
<p>Positive</p>
<p>307</p>
<p>18</p>
<p>Negative</p>
<p>14</p>
<p>661</p>
<table class="table">
<thead>
<tr class="header">
<th></th>
<th></th>
<th style="text-align: center;">Actual values</th>
<th style="text-align: center;"></th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td></td>
<td></td>
<td style="text-align: center;">Positive</td>
<td style="text-align: center;">Negative</td>
</tr>
<tr class="even">
<td>Predicted values</td>
<td>Positive</td>
<td style="text-align: center;">307</td>
<td style="text-align: center;">18</td>
</tr>
<tr class="odd">
<td></td>
<td>Negative</td>
<td style="text-align: center;">14</td>
<td style="text-align: center;">661</td>
</tr>
</tbody>
</table>
<p>In this case, the classifier correctly identified 307 forest pixels, wrongly classified 18 non-forest pixels as forest, correctly identified 661 non-forest pixels, and wrongly classified 14 forest pixels as non-forest. Therefore, the classifier was correct 968 times and wrong 32 times. Lets calculate the main accuracy metrics for this example.</p>
<p>The overall accuracy tells us what proportion of the reference data was classified correctly, and is calculated as the total number of correctly identified pixels divided by the total number of pixels in the sample.</p>
<p><img src="F2/image6.png" class="img-fluid"></p>
@@ -1216,8 +1255,8 @@ Note
</div>
</div>
</section>
<section id="hyperparameter-tuning" class="level3" data-number="4.3.2">
<h3 data-number="4.3.2" class="anchored" data-anchor-id="hyperparameter-tuning"><span class="header-section-number">4.3.2</span> Hyperparameter tuning</h3>
<section id="hyperparameter-tuning" class="level3" data-number="2.3.2">
<h3 data-number="2.3.2" class="anchored" data-anchor-id="hyperparameter-tuning"><span class="header-section-number">2.3.2</span> Hyperparameter tuning</h3>
<p>We can also assess how the number of trees in the Random Forest classifier affects the classification accuracy. Copy and paste the code below to create a function that charts the overall accuracy versus the number of trees used. The code tests from 5 to 100 trees at increments of 5, producing Fig. F2.2.2. (Do not worry too much about fully understanding each item at this stage of your learning. If you want to find out how these operations work, you can see more in Chaps. F4.0 and F4.1.)</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">// Hyperparameter tuning. </span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> numTrees <span class="op">=</span> ee<span class="op">.</span><span class="at">List</span><span class="op">.</span><span class="fu">sequence</span>(<span class="dv">5</span><span class="op">,</span> <span class="dv">100</span><span class="op">,</span> <span class="dv">5</span>)<span class="op">;</span> </span>
@@ -1548,12 +1587,12 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./F1.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></span>
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./F4.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 957 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - Blast Damage Assessment</title>
<title>Remote Sensing for OSINT - Blast Damage Assessment</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -93,6 +93,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<script src="site_libs/quarto-search/fuse.min.js"></script>
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./object_detection.html" rel="next">
<link href="./ships.html" rel="prev">
<link href="./favicon.ico" rel="icon">
<script src="site_libs/quarto-html/quarto.js"></script>
@@ -162,19 +163,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -206,14 +209,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Introduction</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -221,44 +219,24 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -266,6 +244,36 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">C. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
</div>
</li>
@@ -283,6 +291,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link active">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -942,6 +955,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./object_detection.html" class="pagination-link">
<span class="nav-page-text">Object Detection</span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
</div> <!-- /content -->

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - 1&nbsp; Remote Sensing</title>
<title>Remote Sensing for OSINT - Remote Sensing</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -85,7 +85,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></h1>
<h1 class="quarto-secondary-nav-title">Remote Sensing</h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -101,19 +101,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -145,14 +147,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Introduction</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -160,49 +157,59 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link active">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">C. Case Studies</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
@@ -222,6 +229,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -234,14 +246,14 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#active-and-passive-sensors" id="toc-active-and-passive-sensors" class="nav-link active" data-scroll-target="#active-and-passive-sensors"><span class="toc-section-number">1.1</span> Active and Passive Sensors</a></li>
<li><a href="#resolution" id="toc-resolution" class="nav-link" data-scroll-target="#resolution"><span class="toc-section-number">1.2</span> Resolution</a>
<li><a href="#active-and-passive-sensors" id="toc-active-and-passive-sensors" class="nav-link active" data-scroll-target="#active-and-passive-sensors">Active and Passive Sensors</a></li>
<li><a href="#resolution" id="toc-resolution" class="nav-link" data-scroll-target="#resolution">Resolution</a>
<ul class="collapse">
<li><a href="#spatial-resolution" id="toc-spatial-resolution" class="nav-link" data-scroll-target="#spatial-resolution"><span class="toc-section-number">1.2.1</span> Spatial 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">1.2.2</span> Spectral 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">1.2.3</span> Temporal Resolution</a></li>
<li><a href="#spatial-resolution" id="toc-spatial-resolution" class="nav-link" data-scroll-target="#spatial-resolution">Spatial Resolution</a></li>
<li><a href="#spectral-resolution" id="toc-spectral-resolution" class="nav-link" data-scroll-target="#spectral-resolution">Spectral Resolution</a></li>
<li><a href="#temporal-resolution" id="toc-temporal-resolution" class="nav-link" data-scroll-target="#temporal-resolution">Temporal Resolution</a></li>
</ul></li>
<li><a href="#orbits" id="toc-orbits" class="nav-link" data-scroll-target="#orbits"><span class="toc-section-number">1.3</span> Orbits</a></li>
<li><a href="#summary" id="toc-summary" class="nav-link" data-scroll-target="#summary">Summary</a></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/oballinger/GEE_OSINT/edit/main/ch1.qmd" class="toc-action">Edit this page</a></p></div></div></nav>
</div>
@@ -250,7 +262,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></h1>
<h1 class="title d-none d-lg-block">Remote Sensing</h1>
</div>
@@ -266,58 +278,60 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</header>
<p>Before learning how to load, process, and analyze satellite imagery in Google Earth Engine, it will be helpful to know a few basic principles of remote sensing. This section provides a brief overview of some important concepts and terminology that will be used throughout the course, including active and passive sensors; spatial, spectral, and temporal resolution; and orbits.</p>
<section id="active-and-passive-sensors" class="level2" data-number="1.1">
<h2 data-number="1.1" class="anchored" data-anchor-id="active-and-passive-sensors"><span class="header-section-number">1.1</span> Active and Passive Sensors</h2>
<section id="active-and-passive-sensors" class="level2">
<h2 class="anchored" data-anchor-id="active-and-passive-sensors">Active and Passive Sensors</h2>
<p><a href="https://www.sciencedirect.com/topics/medicine-and-dentistry/remote-sensing">Remote sensing</a> is the science of obtaining information about an object or phenomenon without making physical contact with the object. Remote sensing can be done with various types of electromagnetic radiation such as visible, infrared, or microwave. The electromagnetic radiation is either emitted or reflected from the object being sensed. The reflected radiation is then collected by a sensor and processed to obtain information about the object.</p>
<p><img src="./images/diagram.png" class="img-fluid"></p>
<p>While most satellite imagery is optical, meaning it captures sunlight reflected by the earths surface, Synthetic Aperture Radar (SAR) satellites such as Sentinel-1 work by emitting pulses of radio waves and measuring how much of the signal is reflected back. This is similar to the way a bat uses sonar to “see” in the dark: by emitting calls and listening to echoes.</p>
</section>
<section id="resolution" class="level2" data-number="1.2">
<h2 data-number="1.2" class="anchored" data-anchor-id="resolution"><span class="header-section-number">1.2</span> Resolution</h2>
<p>Resolution is one of the most important attributes of satellite imagery.</p>
<p>here are three types of resolution: spatial, spectral, and temporal.</p>
<section id="spatial-resolution" class="level3" data-number="1.2.1">
<h3 data-number="1.2.1" class="anchored" data-anchor-id="spatial-resolution"><span class="header-section-number">1.2.1</span> Spatial Resolution</h3>
<section id="resolution" class="level2">
<h2 class="anchored" data-anchor-id="resolution">Resolution</h2>
<p>Resolution is one of the most important attributes of satellite imagery. There are three types of resolution: spatial, spectral, and temporal. Lets look at each of these.</p>
<section id="spatial-resolution" class="level3">
<h3 class="anchored" data-anchor-id="spatial-resolution">Spatial Resolution</h3>
<p>Spatial resolution governs how “sharp” an image looks. The Google Maps satellite basemap, for example, is really sharp Most of the optical imagery that is freely available has relatively low spatial resolution (it looks more grainy than, for example, the Google satellite basemap),</p>
<p><img src="./images/Landsat.png" class="img-fluid"> <img src="./images/Sentinel2.png" class="img-fluid"> <img src="./images/Maxar.png" class="img-fluid"></p>
</section>
<section id="spectral-resolution" class="level3" data-number="1.2.2">
<h3 data-number="1.2.2" class="anchored" data-anchor-id="spectral-resolution"><span class="header-section-number">1.2.2</span> Spectral Resolution</h3>
<p>What open source imagery lacks in spatial resolution it often makes up for with <em>spectral</em> resolution. Really sharp imagery from MAXAR, for example, collects</p>
<p>Different materials reflect light differently. An apple absorbs shorter wavelengths (e.g.&nbsp;blue and green), and reflects longer wavelengths (red). Our eyes use that information the color to distinguish between different objects. But our eyes can only see a relatively small sliver of the electromagnetic spectrum covering blue, yellow, and red; we cant see UV or infrared wavelengths, for example, though the extent to which different materials reflect or absorb these wavelengths is just as useful for distinguishing between them. For example, Astroturf (fake plastic grass) and real grass will both look green to us, espeically from a satellite image. But living plants absorb radiation from the sun in a part of the light spectrum that we cant see. Theres a spectral index called the Normalized Difference Vegetation Index (NDVI) which exploits this fact to isolate vegetation in multispectral satellite imagery. So if we look at <a href="https://en.wikipedia.org/wiki/Gillette_Stadium">Gilette Stadium</a> near Boston, we can tell that the three training fields south of the stadium are real grass (they generate high NDVI values, showing up red), while the pitch in the stadium itself is astroturf (generating low NDVI values, showing up blue).</p>
<section id="spectral-resolution" class="level3">
<h3 class="anchored" data-anchor-id="spectral-resolution">Spectral Resolution</h3>
<p>What open access imagery lacks in spatial resolution it often makes up for with <em>spectral</em> resolution. Really sharp imagery from MAXAR, for example, mostly collects light in the visible light spectrum, which is what our eyes can see. But there are other parts of the electromagnetic spectrum that we cant see, but which can be very useful for distinguishing between different materials. Many satellites that have a lower spatial resolution than MAXAR, such as Landsat and Sentinel-2, collect data in a wider range of the electromagnetic spectrum.</p>
<p>Different materials reflect light differently. An apple absorbs shorter wavelengths (e.g.&nbsp;blue and green), and reflects longer wavelengths (red). Our eyes use that information the color to distinguish between different objects. Below is a plot of the spectral profiles of different materials:</p>
<iframe title="Spectral Profiles of Different Materials" aria-label="Interactive line chart" id="datawrapper-chart-b1kcX" src="https://datawrapper.dwcdn.net/b1kcX/3/" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" height="400">
</iframe>
<script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();
</script>
<p>The visible portion of the spectrum is highlighted on the left, ranging from 400nm (violet) to 700nm (red). Our eyes (and satellite imagery in the visible light spectrum) can only see this portion of the light spectrum; we cant see UV or infrared wavelengths, for example, though the extent to which different materials reflect or absorb these wavelengths is just as useful for distinguishing between them. The European Space Agencys Sentinel-2 satellite collects spectral information well beyond the visible light spectrum, enabling this sort of analysis. It chops the electromagnetic spectrum up into “bands”, and measures how strongly wavelengths in each of those bands is reflected:</p>
<p><img src="images/S2_bands.png" class="img-fluid"></p>
<p>To illustrate why this is important, consider Astroturf (fake plastic grass). Astroturf and real grass will both look green to us, espeically from a satellite image. But living plants strongly reflect radiation from the sun in a part of the light spectrum that we cant see (near-infrared). Theres a spectral index called the Normalized Difference Vegetation Index (NDVI) which exploits this fact to isolate vegetation in multispectral satellite imagery. So if we look at <a href="https://en.wikipedia.org/wiki/Gillette_Stadium">Gilette Stadium</a> near Boston, we can tell that the three training fields south of the stadium are real grass (they generate high NDVI values, showing up red), while the pitch in the stadium itself is astroturf (generating low NDVI values, showing up blue).</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="images/NDVI.jpg" class="img-fluid figure-img"></p>
<p></p><figcaption class="figure-caption">VHR image of Gilette Stadium with Sentinel-2 derived NDVI overlay</figcaption><p></p>
</figure>
</div>
<p>In other words, even though these fields are all green and indistinguishable to the human eye, their <em>spectral profiles</em> beyond the visible light spectrum differ, and we can use this information to distinguish between them. Below is a plot of the spectral profiles of different materials, including oil.</p>
<iframe title="Spectral Profiles of Different Materials" aria-label="Interactive line chart" id="datawrapper-chart-b1kcX" src="https://datawrapper.dwcdn.net/b1kcX/3/" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" height="400">
</iframe>
<script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();
</script>
<p>The European Space Agencys Sentinel-2 satellite collects spectral information well beyond the visible light spectrum, enabling this sort of analysis. It chops the electromagnetic spectrum up into “bands”, and measures how strongly wavelengths in each of those bands is reflected:</p>
<p><img src="images/S2_bands.png" class="img-fluid"></p>
<p>Well be using this satellite to distinguish between oil and other materials, similar to the way we were able to distinguish between real and fake grass at Gilette Stadium. First, well have to do a bit of pre-processing on the Sentinel-2 imagery after which well train a machine learning model to identify oil.</p>
<p>In other words, even though these fields are all green and indistinguishable to the human eye, their <em>spectral profiles</em> beyond the visible light spectrum differ, and we can use this information to distinguish between them.</p>
<p>Astroturf is a trivial example. But suppose we were interested in identifying makeshift oil refineries in Northern Syria that constitute a key source of rents for whichever group controls them. As demonstrated in the <a href="./refineries.html">Refinery Identification</a> case study, we can train an algorithm to identify the spectral signatures of oil, and use that to automatically detect them in satellite imagery.</p>
</section>
<section id="temporal-resolution" class="level3" data-number="1.2.3">
<h3 data-number="1.2.3" class="anchored" data-anchor-id="temporal-resolution"><span class="header-section-number">1.2.3</span> Temporal Resolution</h3>
<p>Finally, the frequency with which we There is often a tradeoff between spatial and temporal resolution.</p>
<section id="temporal-resolution" class="level3">
<h3 class="anchored" data-anchor-id="temporal-resolution">Temporal Resolution</h3>
<p>Finally, the frequency with which we can access new imagery is an important consideration. This is called the <strong>temporal resolution</strong>.</p>
<p>The Google Maps basemap is very high resolution, available globally, and is freely available. But it has no <em>temporal</em> dimension: its a snapshot from one particular point in time. If the thing were interested in involves <em>changes</em> over time, this basemap will be of limited use.</p>
<p>The <strong>“revisit rate”</strong> is the amount of time it takes for the satellite to pass over the same location twice. The revisit rate is inversely proportional to the satellites altitude: the higher the satellite is, the more frequently it can pass over the same location. This generally means that theres a tradeoff between spatial resolution and temporal resolution: the higher the spatial resolution, the lower the revisit rate. However, some satellite constellations such as Planets SkySat are able to achieve both high spatial and temporal resolution by launching lots of small satellites into orbit at once. Below is a comparison of revisit rates for various satellites:</p>
<ul>
<li><a href="https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-1-sar/revisit-and-coverage">Sentinel 1</a>: 3 days (6 days as of 23/12/21, since Sentinel-1B was decomisioned)</li>
<li><a href="https://sentinel.esa.int/web/sentinel/missions/sentinel-2">Sentinel 2</a>: 5 days</li>
<li><a href="https://landsat.gsfc.nasa.gov/satellites/landsat-9/#:~:text=Landsat%209%20replaces%20Landsat%207,for%20Landsat%208%20%2B%20Landsat%207.">Landsat 8-9</a>: 8 days</li>
<li><a href="https://www.planet.com/pulse/12x-rapid-revisit-announcement/">Planet SkySat</a>: 2-3 hours</li>
</ul>
<p>The <strong>“revisit rate”</strong> is the amount of time it takes for the satellite to pass over the same location twice. For example, the Sentinel-2 constellations two satellites can achieve a revisit rate of 5 days, as shown in this cool video from the European Space Agency:</p>
<div class="quarto-video"><video id="video_shortcode_videojs_video1" class="video-js vjs-default-skin vjs-fluid" controls="" preload="auto" data-setup="{}" title=""><source src="https://dlmultimedia.esa.int/download/public/videos/2016/08/004/1608_004_AR_EN.mp4"></video></div>
<p>Some satellite constellations are able to achieve much higher revisit rates. Sentinel-2 has a revisit rate of 5 days, but SkySat capable of imaging the same point on earth around 12 times per day! How is that possible? Well, as the video above demonstrated, the Sentinel-2 constellation is composed of two satellites that share the same orbit, 180 degrees apart. In contrast, the SkySat constellation comprises 21 satellites, each with its own orbital path:</p>
<div class="quarto-video"><video id="video_shortcode_videojs_video2" class="video-js vjs-default-skin vjs-fluid" controls="" preload="auto" data-setup="{}" title=""><source src="https://assets.planet.com/products/hi-res/Planet_Block_3_HD_1080p.mp4"></video></div>
<p>This allows SkySat to achieve a revisit rate of 2-3 <em>hours</em>. The catch, however, is that you need to pay for it (and it <a href="https://apollomapping.com/blog/an-update-on-skysat-tasking-pricing-and-video-capabilities">aint cheap</a>). Below is a comparison of revisit rates for various other optical satellites:</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="images/revisit_chart.png" class="img-fluid figure-img"></p>
<p></p><figcaption class="figure-caption">A chart of revisit times for different satellites from <a href="https://link.springer.com/article/10.1007/s10712-021-09637-5">Sutlieff et. al.(2021)</a></figcaption><p></p>
</figure>
</div>
</section>
</section>
<section id="orbits" class="level2" data-number="1.3">
<h2 data-number="1.3" class="anchored" data-anchor-id="orbits"><span class="header-section-number">1.3</span> Orbits</h2>
<p>The Landsat satellites are in a sun-synchronous orbit, meaning they pass over the same spot on Earth at the same time every day. The Sentinel satellites are in a polar orbit, meaning they pass over the same spot on Earth twice a day, once in the morning and once in the afternoon. NASA have created a great <a href="https://svs.gsfc.nasa.gov/4745">visualisation</a> showing the orbits of the Landsat and Sentinel-2 satellites:</p>
<div class="quarto-video"><video id="video_shortcode_videojs_video1" class="video-js vjs-default-skin vjs-fluid" controls="" preload="auto" data-setup="{}" title=""><source src="https://svs.gsfc.nasa.gov/vis/a000000/a004700/a004745/landsat_w_sentinel_ls8ls9sAsB_fade_1080p60.mp4"></video></div>
<p>The Sentinel satellites are in a lower orbit than Landsat, meaning they are closer to the Earth and have a higher resolution.</p>
<section id="summary" class="level2">
<h2 class="anchored" data-anchor-id="summary">Summary</h2>
<p>You should hopefully have a better understanding of what satellite imagery is, and how it can be used to answer questions about the world. In the <a href="./ch2.html">next section</a>, well look at the various types of satellite imagery stored in the Google Earth Engine catalogue.</p>
</section>
@@ -574,17 +588,18 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./index.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Introduction</span>
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Overview</span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./ch2.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text">Data Acquisition</span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
</div> <!-- /content -->
<script>videojs(video_shortcode_videojs_video1);</script>
<script>videojs(video_shortcode_videojs_video2);</script>

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - 2&nbsp; Data Acquisition</title>
<title>Remote Sensing for OSINT - Data Acquisition</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -86,7 +86,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></h1>
<h1 class="quarto-secondary-nav-title">Data Acquisition</h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -102,19 +102,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -146,14 +148,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Introduction</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -161,49 +158,59 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link active">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">C. Case Studies</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
@@ -223,6 +230,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -235,52 +247,52 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#optical-imagery" id="toc-optical-imagery" class="nav-link active" data-scroll-target="#optical-imagery"><span class="toc-section-number">2.1</span> Optical Imagery</a>
<li><a href="#optical-imagery" id="toc-optical-imagery" class="nav-link active" data-scroll-target="#optical-imagery">Optical Imagery</a>
<ul class="collapse">
<li><a href="#applications" id="toc-applications" class="nav-link" data-scroll-target="#applications">Applications</a></li>
<li><a href="#datasets" id="toc-datasets" class="nav-link" data-scroll-target="#datasets">Datasets</a></li>
</ul></li>
<li><a href="#radar-imagery" id="toc-radar-imagery" class="nav-link" data-scroll-target="#radar-imagery"><span class="toc-section-number">2.2</span> Radar Imagery</a>
<li><a href="#radar-imagery" id="toc-radar-imagery" class="nav-link" data-scroll-target="#radar-imagery">Radar Imagery</a>
<ul class="collapse">
<li><a href="#applications-1" id="toc-applications-1" class="nav-link" data-scroll-target="#applications-1">Applications</a></li>
<li><a href="#datasets-1" id="toc-datasets-1" class="nav-link" data-scroll-target="#datasets-1">Datasets</a></li>
</ul></li>
<li><a href="#nighttime-lights" id="toc-nighttime-lights" class="nav-link" data-scroll-target="#nighttime-lights"><span class="toc-section-number">2.3</span> Nighttime Lights</a>
<li><a href="#nighttime-lights" id="toc-nighttime-lights" class="nav-link" data-scroll-target="#nighttime-lights">Nighttime Lights</a>
<ul class="collapse">
<li><a href="#applications-2" id="toc-applications-2" class="nav-link" data-scroll-target="#applications-2">Applications</a></li>
<li><a href="#datasets-2" id="toc-datasets-2" class="nav-link" data-scroll-target="#datasets-2">Datasets</a></li>
</ul></li>
<li><a href="#climate-and-atmospheric-data" id="toc-climate-and-atmospheric-data" class="nav-link" data-scroll-target="#climate-and-atmospheric-data"><span class="toc-section-number">2.4</span> Climate and Atmospheric Data</a>
<li><a href="#climate-and-atmospheric-data" id="toc-climate-and-atmospheric-data" class="nav-link" data-scroll-target="#climate-and-atmospheric-data">Climate and Atmospheric Data</a>
<ul class="collapse">
<li><a href="#applications-3" id="toc-applications-3" class="nav-link" data-scroll-target="#applications-3">Applications</a></li>
<li><a href="#datasets-3" id="toc-datasets-3" class="nav-link" data-scroll-target="#datasets-3">Datasets</a></li>
</ul></li>
<li><a href="#mineral-deposits" id="toc-mineral-deposits" class="nav-link" data-scroll-target="#mineral-deposits"><span class="toc-section-number">2.5</span> Mineral Deposits</a>
<li><a href="#mineral-deposits" id="toc-mineral-deposits" class="nav-link" data-scroll-target="#mineral-deposits">Mineral Deposits</a>
<ul class="collapse">
<li><a href="#applications-4" id="toc-applications-4" class="nav-link" data-scroll-target="#applications-4">Applications</a></li>
<li><a href="#datasets-4" id="toc-datasets-4" class="nav-link" data-scroll-target="#datasets-4">Datasets</a></li>
</ul></li>
<li><a href="#fires" id="toc-fires" class="nav-link" data-scroll-target="#fires"><span class="toc-section-number">2.6</span> Fires</a>
<li><a href="#fires" id="toc-fires" class="nav-link" data-scroll-target="#fires">Fires</a>
<ul class="collapse">
<li><a href="#applications-5" id="toc-applications-5" class="nav-link" data-scroll-target="#applications-5">Applications</a></li>
<li><a href="#datasets-5" id="toc-datasets-5" class="nav-link" data-scroll-target="#datasets-5">Datasets</a></li>
</ul></li>
<li><a href="#population-density-estimates" id="toc-population-density-estimates" class="nav-link" data-scroll-target="#population-density-estimates"><span class="toc-section-number">2.7</span> Population Density Estimates</a>
<li><a href="#population-density-estimates" id="toc-population-density-estimates" class="nav-link" data-scroll-target="#population-density-estimates">Population Density Estimates</a>
<ul class="collapse">
<li><a href="#applications-6" id="toc-applications-6" class="nav-link" data-scroll-target="#applications-6">Applications:</a></li>
<li><a href="#datasets-6" id="toc-datasets-6" class="nav-link" data-scroll-target="#datasets-6">Datasets</a></li>
</ul></li>
<li><a href="#building-footprints" id="toc-building-footprints" class="nav-link" data-scroll-target="#building-footprints"><span class="toc-section-number">2.8</span> Building Footprints</a>
<li><a href="#building-footprints" id="toc-building-footprints" class="nav-link" data-scroll-target="#building-footprints">Building Footprints</a>
<ul class="collapse">
<li><a href="#applications-7" id="toc-applications-7" class="nav-link" data-scroll-target="#applications-7">Applications:</a></li>
<li><a href="#datasets-7" id="toc-datasets-7" class="nav-link" data-scroll-target="#datasets-7">Datasets</a></li>
</ul></li>
<li><a href="#administrative-boundaries" id="toc-administrative-boundaries" class="nav-link" data-scroll-target="#administrative-boundaries"><span class="toc-section-number">2.9</span> Administrative Boundaries</a>
<li><a href="#administrative-boundaries" id="toc-administrative-boundaries" class="nav-link" data-scroll-target="#administrative-boundaries">Administrative Boundaries</a>
<ul class="collapse">
<li><a href="#applications-8" id="toc-applications-8" class="nav-link" data-scroll-target="#applications-8">Applications</a></li>
<li><a href="#datasets-8" id="toc-datasets-8" class="nav-link" data-scroll-target="#datasets-8">Datasets</a></li>
</ul></li>
<li><a href="#global-power-plant-database" id="toc-global-power-plant-database" class="nav-link" data-scroll-target="#global-power-plant-database"><span class="toc-section-number">2.10</span> Global Power Plant Database</a>
<li><a href="#global-power-plant-database" id="toc-global-power-plant-database" class="nav-link" data-scroll-target="#global-power-plant-database">Global Power Plant Database</a>
<ul class="collapse">
<li><a href="#applications-9" id="toc-applications-9" class="nav-link" data-scroll-target="#applications-9">Applications:</a></li>
<li><a href="#datasets-9" id="toc-datasets-9" class="nav-link" data-scroll-target="#datasets-9">Datasets</a></li>
@@ -293,7 +305,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></h1>
<h1 class="title d-none d-lg-block">Data Acquisition</h1>
</div>
@@ -310,12 +322,12 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<p>One of the main advantages of GEE is that it hosts several Petabytes of satellite imagery and other spatial data sets, <a href="https://developers.google.com/earth-engine/datasets">all in one place</a>. Among these are a many that could prove useful to those investigating illegal mining and logging, estimating conflict-induced damage, monitoring pollution from extractive industries, conducting maritime surveillance without relying on ship transponders, verifying the locations of artillery strikes, tracking missile defense systems, and many other topics.</p>
<p>This section highlights ten categories of geospatial data available natively in the GEE catalogue ranging from optical satellite imagery, to atmospheric data, to building footprints. Each sub-section provides an overview of the given data type, suggests potential applications, and lists the corresponding datasets in the GEE catalogue. The datasets listed under each heading are <strong>not</strong> an exhaustive list there are over 500 in the whole catalogue, and the ones listed in this section are simply the ones with the most immediate relevance to open source investigations. If a particular geospatial dataset you want to work with isnt hosted in the GEE catalog, you can upload your own data. Well cover that in the next section.</p>
<section id="optical-imagery" class="level2" data-number="2.1">
<h2 data-number="2.1" class="anchored" data-anchor-id="optical-imagery"><span class="header-section-number">2.1</span> Optical Imagery</h2>
<section id="optical-imagery" class="level2">
<h2 class="anchored" data-anchor-id="optical-imagery">Optical Imagery</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/hasankeyf.gif" class="img-fluid figure-img"></p>
<p></p><figcaption class="figure-caption">Sentinel-2 timelapse showing the ancient city of Hasankeyf being flooded following the construction of a dam by the Turkish government.</figcaption><p></p>
<p><img src="./images/obj_det3.jpg" class="img-fluid figure-img"></p>
<p></p><figcaption class="figure-caption">Automatic detection of vehicles using artificial intelligence in high resolution optical imagery. See the <a href="./object_detection.html">object detection</a> tutorial.</figcaption><p></p>
</figure>
</div>
<p>Optical satellite imagery is the bread and butter of many open source investiagtions. It would be tough to list off all of the possible use cases, so heres a handy flowchart:</p>
@@ -437,8 +449,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="radar-imagery" class="level2" data-number="2.2">
<h2 data-number="2.2" class="anchored" data-anchor-id="radar-imagery"><span class="header-section-number">2.2</span> Radar Imagery</h2>
<section id="radar-imagery" class="level2">
<h2 class="anchored" data-anchor-id="radar-imagery">Radar Imagery</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/radar ships.jpg" class="img-fluid figure-img"></p>
@@ -477,8 +489,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="nighttime-lights" class="level2" data-number="2.3">
<h2 data-number="2.3" class="anchored" data-anchor-id="nighttime-lights"><span class="header-section-number">2.3</span> Nighttime Lights</h2>
<section id="nighttime-lights" class="level2">
<h2 class="anchored" data-anchor-id="nighttime-lights">Nighttime Lights</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/Figure_1.gif" class="img-fluid figure-img"></p>
@@ -523,11 +535,11 @@ C--&gt;H
</table>
</section>
</section>
<section id="climate-and-atmospheric-data" class="level2" data-number="2.4">
<h2 data-number="2.4" class="anchored" data-anchor-id="climate-and-atmospheric-data"><span class="header-section-number">2.4</span> Climate and Atmospheric Data</h2>
<section id="climate-and-atmospheric-data" class="level2">
<h2 class="anchored" data-anchor-id="climate-and-atmospheric-data">Climate and Atmospheric Data</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/mishraq_small.gif" class="img-fluid figure-img"></p>
<p><img src="./images/mishraq_small.gif" class="img-fluid figure-img" style="width:100.0%"></p>
<p></p><figcaption class="figure-caption">Sulphur Dioxide plume resulting from ISIS attack on the Al-Mishraq Sulphur Plant in Iraq</figcaption><p></p>
</figure>
</div>
@@ -573,8 +585,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="mineral-deposits" class="level2" data-number="2.5">
<h2 data-number="2.5" class="anchored" data-anchor-id="mineral-deposits"><span class="header-section-number">2.5</span> Mineral Deposits</h2>
<section id="mineral-deposits" class="level2">
<h2 class="anchored" data-anchor-id="mineral-deposits">Mineral Deposits</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/mining.jpg" class="img-fluid figure-img"></p>
@@ -612,8 +624,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="fires" class="level2" data-number="2.6">
<h2 data-number="2.6" class="anchored" data-anchor-id="fires"><span class="header-section-number">2.6</span> Fires</h2>
<section id="fires" class="level2">
<h2 class="anchored" data-anchor-id="fires">Fires</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/fires.jpg" class="img-fluid figure-img"></p>
@@ -661,8 +673,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="population-density-estimates" class="level2" data-number="2.7">
<h2 data-number="2.7" class="anchored" data-anchor-id="population-density-estimates"><span class="header-section-number">2.7</span> Population Density Estimates</h2>
<section id="population-density-estimates" class="level2">
<h2 class="anchored" data-anchor-id="population-density-estimates">Population Density Estimates</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/pop.jpg" class="img-fluid figure-img"></p>
@@ -710,8 +722,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="building-footprints" class="level2" data-number="2.8">
<h2 data-number="2.8" class="anchored" data-anchor-id="building-footprints"><span class="header-section-number">2.8</span> Building Footprints</h2>
<section id="building-footprints" class="level2">
<h2 class="anchored" data-anchor-id="building-footprints">Building Footprints</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/footprints.png" class="img-fluid figure-img"></p>
@@ -745,8 +757,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="administrative-boundaries" class="level2" data-number="2.9">
<h2 data-number="2.9" class="anchored" data-anchor-id="administrative-boundaries"><span class="header-section-number">2.9</span> Administrative Boundaries</h2>
<section id="administrative-boundaries" class="level2">
<h2 class="anchored" data-anchor-id="administrative-boundaries">Administrative Boundaries</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/fao_gaul.jpg" class="img-fluid figure-img"></p>
@@ -783,8 +795,8 @@ C--&gt;H
</table>
</section>
</section>
<section id="global-power-plant-database" class="level2" data-number="2.10">
<h2 data-number="2.10" class="anchored" data-anchor-id="global-power-plant-database"><span class="header-section-number">2.10</span> Global Power Plant Database</h2>
<section id="global-power-plant-database" class="level2">
<h2 class="anchored" data-anchor-id="global-power-plant-database">Global Power Plant Database</h2>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="./images/power.jpg" class="img-fluid figure-img"></p>
@@ -1077,12 +1089,12 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./ch1.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></span>
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Remote Sensing</span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./F1.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>

View File

@@ -1 +0,0 @@
# Application Development

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 MiB

BIN
docs/images/obj_det3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -7,9 +7,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Dr.&nbsp;Ollie Ballinger">
<meta name="dcterms.date" content="2022-10-06">
<meta name="dcterms.date" content="2023-03-15">
<title>Google Earth Engine for OSINT</title>
<title>Remote Sensing for OSINT</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -84,7 +84,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title">Google Earth Engine for OSINT</h1>
<h1 class="quarto-secondary-nav-title">Remote Sensing for OSINT</h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -100,19 +100,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -144,14 +146,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link active">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Introduction</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -159,49 +156,59 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link active">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">C. Case Studies</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
@@ -224,7 +231,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Deep Learning</a>
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
@@ -238,10 +245,10 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#introduction" id="toc-introduction" class="nav-link active" data-scroll-target="#introduction">Introduction</a>
<li><a href="#overview" id="toc-overview" class="nav-link active" data-scroll-target="#overview">Overview</a>
<ul class="collapse">
<li><a href="#table-of-contents" id="toc-table-of-contents" class="nav-link" data-scroll-target="#table-of-contents">Table of Contents</a></li>
<li><a href="#what-is-google-earth-engine" id="toc-what-is-google-earth-engine" class="nav-link" data-scroll-target="#what-is-google-earth-engine">What is Google Earth Engine?</a></li>
<li><a href="#table-of-contents" id="toc-table-of-contents" class="nav-link" data-scroll-target="#table-of-contents">Table of Contents</a></li>
</ul></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/oballinger/GEE_OSINT/edit/main/index.qmd" class="toc-action">Edit this page</a></p></div></div></nav>
@@ -251,7 +258,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block">Google Earth Engine for OSINT</h1>
<h1 class="title d-none d-lg-block">Remote Sensing for OSINT</h1>
</div>
@@ -268,7 +275,7 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">October 6, 2022</p>
<p class="date">March 15, 2023</p>
</div>
</div>
@@ -278,35 +285,50 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</header>
<section id="introduction" class="level1 unnumbered">
<h1 class="unnumbered">Introduction</h1>
<section id="overview" class="level1 unnumbered">
<h1 class="unnumbered">Overview</h1>
<p>The analysis of satellite imagery is a foundational element of open source investigations. In the past decade, the quantity, quality, and availability thereof has increased dramatically. Capabilities and insights that were once only available to governments are now accessible to the general public. Satellite imagery is being used to collect evidence of genocide and other war crimes in <a href="https://www.nbcnews.com/science/science-news/ukraine-satellites-war-crimes-rcna26291">Ukraine</a>, <a href="https://www.amnesty.org/en/latest/news/2016/04/nigeria-military-cover-up-of-mass-slaughter-at-zaria-exposed/">Nigeria</a>, <a href="https://www.amnesty.org/en/latest/news/2016/01/burundi-satellite-evidence-supports-witness-accounts-of-mass-graves/">Burundi</a>, <a href="https://www.amnesty.org/en/latest/news/2021/07/cameroon-satellite-images-reveal-devastation-in-anglophone-regions-2/">Cameroon</a>, <a href="https://www.aaas.org/resources/satellite-imagery-assessment-forced-relocations-near-luiswishi-mine">the DRC</a>, <a href="https://gsp.yale.edu/case-studies/sudan/maps-satellite-images/other-darfur-satellite-imagery">South Sudan</a>, <a href="https://gsp.yale.edu/resources/maps-satellite-images/papua">Papua</a>, and <a href="https://www.hrw.org/report/2016/04/04/unchecked-power/police-and-military-raids-low-income-and-immigrant-communities">Venezuela</a>. It has been used to <a href="https://www.theguardian.com/environment/2016/mar/02/new-satellite-mapping-a-game-changer-against-illegal-logging">monitor environmental degradation</a> and hold extractive industries to account from <a href="https://www.bellingcat.com/resources/2021/04/15/what-oil-satellite-technology-and-iraq-can-tell-us-about-pollution/">Iraq</a> to <a href="https://www.planet.com/pulse/the-observatory-of-extractive-industries-oie-shines-a-light-on-the-mining-industry-using-planets-satellite-data/">Guatemala</a>. The ability to analyze satellite imagery is a critical skill for anyone interested in open source investigations.</p>
<p>Though no-code platforms such as Sentinelhub have been invaluable in allowing the OSINT community to access and process satellite imagery, the analytical capabilities of these platforms are limited. <a href="https://earthengine.google.com/#intro">Google Earth Engine (GEE)</a> is a cloud-based platform that stores petabytes of satellite imagery from a variety of sources and allows users to perform advanced analyses on Google servers for free using a browser-based interface. This textbook is designed for investigators who want to perform more sophisticated analysis using geospatial data, and assumes no prior knowledge of coding or remote sensing (satellite imagery analysis). It is organized into two parts: an introduction to remote sensing and GEE, and a series of case studies that demonstrate how to use GEE for open source investigations.</p>
<section id="table-of-contents" class="level2">
<h2 class="anchored" data-anchor-id="table-of-contents">Table of Contents</h2>
<ul>
<li>Learning
<ol type="1">
<li><a href="./ch1.html">Remote Sensing</a></li>
<li><a href="./ch2.html">Data Acquisition</a></li>
<li><a href="ch4.qmd">Application Development</a></li>
</ol></li>
<li>Case Studies
<ol type="1">
<li><a href="./lights.html">War at Night</a></li>
<li><a href="./refineries.html">Refinery Detection</a></li>
<li><a href="trees.qmd">Deforestation</a></li>
<li><a href="./ships.html">Ship Detection</a></li>
<li><a href="./object_detection.html">Object Detection</a> Recently, a team of over 100 scientists came together to write a book called <a href="https://www.eefabook.org/">“Cloud-Based Remote Sensing with Google Earth Engine: Fundamentals and Applications”</a>. Its a great resource for learning about remote sensing and Earth Engine. The material in this chapter is a subset of the book, edited to fit the scope of this guide. If youre interested in learning more, check out the full book.</li>
</ol></li>
</ul>
</section>
<section id="what-is-google-earth-engine" class="level2">
<h2 class="anchored" data-anchor-id="what-is-google-earth-engine">What is Google Earth Engine?</h2>
<p>As geospatial datasets—particularly satellite imagery collections—increase in size, researchers are increasingly relying on cloud computing platforms such as Google Earth Engine (GEE) to analyze vast quantities of data.</p>
<p>GEE is free and allows users to write open-source code that can be run by others in one click, thereby yielding fully reproducible results. These features have put GEE on the cutting edge of scientific research. The following plot visualizes the number of journal articles conducted using different geospatial analysis software platforms:</p>
<p><img src="./images/WoS Articles.png" class="img-fluid"></p>
<p>Despite only being released in 2015, the number of geospatial journal articles using Google Earth Engine (shown in red above) has outpaced every other major geospatial analysis software, including ArcGIS, Python, and R in just five years. GEE applications have been developed and used to present interactive geospatial data visualizations by NGOs, Universities, the United Nations, and the European Commission. By storing and running computations on google servers, GEE is far more accessible to those who dont have significant local computational resources; all you need is an internet connection.</p>
</section>
<section id="table-of-contents" class="level2">
<h2 class="anchored" data-anchor-id="table-of-contents">Table of Contents</h2>
<ol type="A">
<li><strong>Introduction</strong>
<ul>
<li>Two introductory chapters that provide an overview of remote sensing the different types of satellite imagery available on Google Earth Engine.
<ul>
<li><a href="./ch1.html">Remote Sensing</a></li>
<li><a href="./ch2.html">Data Acquisition</a></li>
</ul></li>
</ul></li>
<li><strong>Google Earth Engine</strong>
<ul>
<li>Recently, a team of over 100 scientists came together to write a book called <a href="https://www.eefabook.org/">“Cloud-Based Remote Sensing with Google Earth Engine: Fundamentals and Applications”</a>. Its a great resource for learning about remote sensing and Earth Engine. The material in this section is a subset of the book, edited to fit the scope of this guide. If youre interested in learning more, check out the full book.
<ul>
<li><a href="./F1.html">Getting Started</a></li>
<li><a href="./F2.html">Interpreting Images</a></li>
<li><a href="./F4.html">Image Series</a></li>
<li><a href="./F5.html">Vectors and Tables</a></li>
</ul></li>
</ul></li>
<li><strong>Case Studies</strong>
<ul>
<li>A series of case studies that demonstrate how to use Google Earth Engine for open source investigations. Each case study includes a brief introduction to the topic, a step-by-step guide to using Google Earth Engine to analyze satellite imagery, and a discussion of the results.
<ul>
<li><a href="./lights.html">War at Night</a></li>
<li><a href="./refineries.html">Refinery Identification</a></li>
<li><a href="./ships.html">Ship Detection</a></li>
<li><a href="./blast.html">Blast Damage Assessment</a></li>
<li><a href="./object_detection.html">Object Detection</a></li>
</ul></li>
</ul></li>
</ol>
</section>
@@ -566,7 +588,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
</div>
<div class="nav-page nav-page-next">
<a href="./ch1.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text">Remote Sensing</span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - War at Night</title>
<title>Remote Sensing for OSINT - War at Night</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -94,7 +94,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<script src="site_libs/quarto-search/quarto-search.js"></script>
<meta name="quarto:offset" content="./">
<link href="./refineries.html" rel="next">
<link href="./F6.html" rel="prev">
<link href="./F5.html" rel="prev">
<link href="./favicon.ico" rel="icon">
<script src="site_libs/quarto-html/quarto.js"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
@@ -162,19 +162,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -206,64 +208,69 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">A. Introduction</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">C. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link active">War at Night</a>
@@ -283,6 +290,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -295,19 +307,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#data" id="toc-data" class="nav-link active" data-scroll-target="#data">Data</a></li>
<li><a href="#ukraine" id="toc-ukraine" class="nav-link" data-scroll-target="#ukraine">Ukraine</a>
<li><a href="#data" id="toc-data" class="nav-link active" data-scroll-target="#data">Data</a>
<ul class="collapse">
<li><a href="#pre-processing" id="toc-pre-processing" class="nav-link" data-scroll-target="#pre-processing">Pre-Processing</a></li>
<li><a href="#analysis" id="toc-analysis" class="nav-link" data-scroll-target="#analysis">Analysis</a></li>
</ul></li>
<li><a href="#iraq" id="toc-iraq" class="nav-link" data-scroll-target="#iraq">Iraq</a>
<ul class="collapse">
<li><a href="#pre-processing-1" id="toc-pre-processing-1" class="nav-link" data-scroll-target="#pre-processing-1">Pre-Processing</a></li>
<li><a href="#analysis-1" id="toc-analysis-1" class="nav-link" data-scroll-target="#analysis-1">Analysis</a></li>
<li><a href="#the-battle-for-aleppo" id="toc-the-battle-for-aleppo" class="nav-link" data-scroll-target="#the-battle-for-aleppo">The Battle for Aleppo</a></li>
<li><a href="#fighting-for-oil" id="toc-fighting-for-oil" class="nav-link" data-scroll-target="#fighting-for-oil">Fighting for Oil</a></li>
</ul></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/oballinger/GEE_OSINT/edit/main/lights.qmd" class="toc-action">Edit this page</a></p></div></div></nav>
</div>
@@ -334,22 +338,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<section id="data" class="level2">
<h2 class="anchored" data-anchor-id="data">Data</h2>
<p>Satellite images of Syria taken at night capture a subtle trace left by human civilization: lights. Apartment buildings, street lights, highways, powerplants all are illuminated at night and can be seen from space. Researchers often use these nighttime lights signatures to track development; as cities grow, villages recieve power, and infrastructure is built, areas emit more light. But this works both ways. As cities are demolished, villages burned, and highways cutoff, they stop emitting lights.</p>
<p>The timelapse below uses imagery from the Defense Meteorological Satellite Program (DMSP), a joint program run by the U.S. Department of Defense and the National Oceanographic and Atmospheric Agency. One image is taken per year between 2005 and 2013:</p>
</section>
<section id="ukraine" class="level2">
<h2 class="anchored" data-anchor-id="ukraine">Ukraine</h2>
<p>In this tutorial, well use satellite images of Iraq taken at night to track the destruction caused by the fight against the Islamic State. Well use the VIIRS nighttime lights dataset, which is a collection of satellite images taken by the Visible Infrared Imaging Radiometer Suite (VIIRS) on the Suomi NPP satellite. VIIRS is a sensor that can detect light in the visible and infrared spectrum, and is capable of taking images at night. A link to the GEE code for this section can be found <a href="https://code.earthengine.google.com/2cf77d8cb9afd76b73100637fbffdf5d">here</a>.</p>
<section id="pre-processing" class="level3">
<h3 class="anchored" data-anchor-id="pre-processing">Pre-Processing</h3>
</section>
<section id="analysis" class="level3">
<h3 class="anchored" data-anchor-id="analysis">Analysis</h3>
</section>
</section>
<section id="iraq" class="level2">
<h2 class="anchored" data-anchor-id="iraq">Iraq</h2>
<p>A link to the GEE code for this section can be found <a href="https://code.earthengine.google.com/2cf77d8cb9afd76b73100637fbffdf5d">here</a>.</p>
<section id="pre-processing-1" class="level3">
<h3 class="anchored" data-anchor-id="pre-processing-1">Pre-Processing</h3>
<p>First, lets start by importing a few useful packages written by <a href="https://twitter.com/gena_d">Gennadii Donchyts</a>. Well use <code>utils</code> and <code>text</code> to annotate the date of each image on the timelapse. Well also define an Area of Interest (AOI), which is just a rectangle. You can do this manually by clicking the drawing tools in the top left. Ive drawn an AOI over the area covering Mosul, Irbil, and Kirkuk in Northern Iraq.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> utils <span class="op">=</span> <span class="pp">require</span>(<span class="st">"users/gena/packages:utils"</span>)<span class="op">;</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="kw">var</span> text <span class="op">=</span> <span class="pp">require</span>(<span class="st">"users/gena/packages:text"</span>)<span class="op">;</span></span>
@@ -408,8 +399,8 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<p><img src="./images/iraq_check.png" class="img-fluid"></p>
<p>If we decrease the opacity of the VIIRS layer, we can see the cities of Mosul, Erbil, and Kirkuk shining brightly at night. We can also see a string of bright lights between Kirkuk and Erbil these are methane flares from oil wells.</p>
</section>
<section id="analysis-1" class="level3">
<h3 class="anchored" data-anchor-id="analysis-1">Analysis</h3>
<section id="analysis" class="level3">
<h3 class="anchored" data-anchor-id="analysis">Analysis</h3>
<p>Having pre-processed the VIIRS imagery, we can now define a function <code>gif</code> that will take:</p>
<ol type="1">
<li>An image collection (<code>col</code>, in this case the nighttime lights imagery <code>VIIRS</code>)</li>
@@ -526,29 +517,42 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(chart)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p><img src="./images/qayyarah_chart.png" class="img-fluid"></p>
<p>We can clearly see Mosul (the red line) darkening in 2014 as the city is taken by ISIS. During this period the Qayyarah oilfileds are, as we might expect, quite dark. All of a sudden in 2016 Qayyarah becomes brighter at night than the city of Mosul ever was, as the oilfields are set on fire. Then, almost exactly when the blaze in Qayyarah is extinguished and the area darkens (i.e.&nbsp;when the blue line falls back to near zero), Mosul brightens once again (i.e.&nbsp;the red line rises) as the city is liberated.</p>
</section>
</section>
<section id="the-battle-for-aleppo" class="level3">
<h3 class="anchored" data-anchor-id="the-battle-for-aleppo">The Battle for Aleppo</h3>
<p>The images below were taken between 2012 and 2014. Vast swaths of the city darken as neighbourhoods are razed by fighting.</p>
<p><timelapse></timelapse></p>
<p>Though this is a trend that can be observed across the country, nowhere is the decline in nightlights more visible than in Aleppo. Below is a comparison of longitudinal trends in nighlights signatures between several cities:</p>
<p><graph></graph></p>
<p>The most salient trend is Aleppo plummeting over the course of 2012, and becoming steadily darker over the course of the next four years. Raqqa drops in 2012 as well, but remains in flux until 2017, when the battle to reclaim the city pluges it into near total darkness. Damascus also experiences a dip in 2012, but stabilizes relatively quickly. The Turkish city of Gaziantep less than 100km from Aleppo and roughly 1/5th the size stands in stark contrast to the Syrian cities, becoming progressively brighter over the entire period.</p>
<p>Another interesting pattern here is the difference in seasonal trends in nightlights. Under normal circumstances in this part of the world, cities become brighter at night during the summer months. Restaurants, bars, and markets stay open later and conduct business outdoors. Gaziantep, which still attracts scores of tourists every year, displays pronounced seasonality. Damascus, the most stable of the three Syrian cities, also maintains a seasonal trend throughout the war. In contrast, both Raqqa and Aleppo maintain extremely low and roughly constant levels of nightlights year-round during the periods following intense fighting.</p>
<p>Reliable economic data for Syria havent been available for nearly a decade, and assessing the countrys recovery is consequently difficult. But subtle indications of economic growth are visible above: all three Syrian cities have been on a steady upward trend since 2017, and beginning to display seasonal variation once again.</p>
</section>
<section id="fighting-for-oil" class="level3">
<h3 class="anchored" data-anchor-id="fighting-for-oil">Fighting for Oil</h3>
<p>Throughout the war, sudden massive spikes in nightlights signatures can be observed throughout the country. In the center of the map just west of Palmyra, some particularly large spikes occur in 2017:</p>
<p>These flashes of light show gas wells being set on fire, a common form of sabotage carried out by retreating Islamic State fighters. Modified Sentinel-2 imagery of the Hayyan gas field (indicated by the green box above) shows this in greater detail. Substituing the Red band in an RGB image with Near Infrared (NIR) highlights thermal signatures, showing fires burning brightly even during the day.</p>
<p>The large complex on the right is the Hayyan Gas Plant, which produced nearly 1/3 of Syrias electricity. The plant and its associated wells changed hands several times throughout the war, but were under Islamic State control until February 2017. In the video below, Islamic State fighters can be seen rigging the plant with explosives and destroying it on January 8th:</p>
<p>In February, three Russian oil and gas companies (Zarubij Naft, Lukoil and Gazprom Neft) were given restoration, exploration, and production rights to the hydrocarbon deposits West of Palmyra. On January 12th, 2017, the Syrian Armys 5th Legion and Russian special forces launched a counterattack known as the “Palmyra offensive”, with the aim of retaking several important hydrocarbon deposits including Hayyan.</p>
<p>The timing of well fires aligns closely with a detailed timeline of the campaign.The Near Infrared Sentinel-2 image below shows the layout of the Hayyan Gas Plant and the wells in the Hayyan gas field:</p>
<p>The Syrian Army took the Hayyan gas field on <a href="https://www.almasdarnews.com/article/syrian-army-liberates-hayyan-gas-fields-west-palmyra/">February 4th</a>, and retreating ISIS fighters set fire to wells 1, and 3. However, ISIS managed to briefly retake the Hayyan field on <a href="https://www.almasdarnews.com/article/isis-retakes-hayyan-gas-fields-new-bid-expand-west-palmyra/">February 7th</a>, setting fire to wells 2 and 4. These moments in the Palmyra Offensive are captured in NIR signatures</p>
<p>Interestingly, despite the massive explosion caused by the bombing of the Hayyan Gas Plant, no prolonged thermal anomalies were detected over the area of the plant itself. The well fires, on the other hand, lasted for months. Below is an image of well fire at the Hayyan field taken from this <a href="https://www.youtube.com/watch?v=WFe9abYyqK0">video</a>; based on the nearby infrastructure and date (04/02/2017) of posting, it is likely Well-3.</p>
<!--
### The Battle for Aleppo
The images below were taken between 2012 and 2014. Vast swaths of the city darken as neighbourhoods are razed by fighting.
<timelapse>
Though this is a trend that can be observed across the country, nowhere is the decline in nightlights more visible than in Aleppo. Below is a comparison of longitudinal trends in nighlights signatures between several cities:
<graph>
The most salient trend is Aleppo plummeting over the course of 2012, and becoming steadily darker over the course of the next four years. Raqqa drops in 2012 as well, but remains in flux until 2017, when the battle to reclaim the city pluges it into near total darkness. Damascus also experiences a dip in 2012, but stabilizes relatively quickly. The Turkish city of Gaziantep-- less than 100km from Aleppo and roughly 1/5th the size-- stands in stark contrast to the Syrian cities, becoming progressively brighter over the entire period.
Another interesting pattern here is the difference in seasonal trends in nightlights. Under normal circumstances in this part of the world, cities become brighter at night during the summer months. Restaurants, bars, and markets stay open later and conduct business outdoors. Gaziantep, which still attracts scores of tourists every year, displays pronounced seasonality. Damascus, the most stable of the three Syrian cities, also maintains a seasonal trend throughout the war. In contrast, both Raqqa and Aleppo maintain extremely low and roughly constant levels of nightlights year-round during the periods following intense fighting.
Reliable economic data for Syria haven't been available for nearly a decade, and assessing the country's recovery is consequently difficult. But subtle indications of economic growth are visible above: all three Syrian cities have been on a steady upward trend since 2017, and beginning to display seasonal variation once again. -->
<!-- ### Fighting for Oil
Throughout the war, sudden massive spikes in nightlights signatures can be observed throughout the country. In the center of the map just west of Palmyra, some particularly large spikes occur in 2017:
These flashes of light show gas wells being set on fire, a common form of sabotage carried out by retreating Islamic State fighters. Modified Sentinel-2 imagery of the Hayyan gas field (indicated by the green box above) shows this in greater detail. Substituing the Red band in an RGB image with Near Infrared (NIR) highlights thermal signatures, showing fires burning brightly even during the day.
The large complex on the right is the Hayyan Gas Plant, which produced nearly 1/3 of Syria's electricity. The plant and its associated wells changed hands several times throughout the war, but were under Islamic State control until February 2017. In the video below, Islamic State fighters can be seen rigging the plant with explosives and destroying it on January 8th:
In February, three Russian oil and gas companies (Zarubij Naft, Lukoil and Gazprom Neft) were given restoration, exploration, and production rights to the hydrocarbon deposits West of Palmyra. On January 12th, 2017, the Syrian Army's 5th Legion and Russian special forces launched a counterattack known as the "Palmyra offensive", with the aim of retaking several important hydrocarbon deposits including Hayyan.
The timing of well fires aligns closely with a detailed timeline of the campaign.The Near Infrared Sentinel-2 image below shows the layout of the Hayyan Gas Plant and the wells in the Hayyan gas field:
The Syrian Army took the Hayyan gas field on [February 4th](https://www.almasdarnews.com/article/syrian-army-liberates-hayyan-gas-fields-west-palmyra/), and retreating ISIS fighters set fire to wells 1, and 3. However, ISIS managed to briefly retake the Hayyan field on [February 7th](https://www.almasdarnews.com/article/isis-retakes-hayyan-gas-fields-new-bid-expand-west-palmyra/), setting fire to wells 2 and 4. These moments in the Palmyra Offensive are captured in NIR signatures
Interestingly, despite the massive explosion caused by the bombing of the Hayyan Gas Plant, no prolonged thermal anomalies were detected over the area of the plant itself. The well fires, on the other hand, lasted for months. Below is an image of well fire at the Hayyan field taken from this [video](https://www.youtube.com/watch?v=WFe9abYyqK0); based on the nearby infrastructure and date (04/02/2017) of posting, it is likely Well-3.
-->
</section>
</section>
</section>
@@ -801,10 +805,11 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
}
});
</script>
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./F6.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></span>
<a href="./F5.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></span>
</a>
</div>
<div class="nav-page nav-page-next">

View File

@@ -1,682 +0,0 @@
<!DOCTYPE html>
<html lang="en"><head>
<script src="obj_train_val_files/libs/clipboard/clipboard.min.js"></script>
<script src="obj_train_val_files/libs/quarto-html/tabby.min.js"></script>
<script src="obj_train_val_files/libs/quarto-html/popper.min.js"></script>
<script src="obj_train_val_files/libs/quarto-html/tippy.umd.min.js"></script>
<link href="obj_train_val_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="obj_train_val_files/libs/quarto-html/quarto-html.min.css" rel="stylesheet" data-mode="light">
<link href="obj_train_val_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles"><meta charset="utf-8">
<meta name="generator" content="quarto-1.2.269">
<title>obj_train_val</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="obj_train_val_files/libs/revealjs/dist/reset.css">
<link rel="stylesheet" href="obj_train_val_files/libs/revealjs/dist/reveal.css">
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
</style>
<link rel="stylesheet" href="obj_train_val_files/libs/revealjs/dist/theme/quarto.css" id="theme">
<link href="obj_train_val_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
<link href="obj_train_val_files/libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
<link href="obj_train_val_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css" rel="stylesheet">
<link href="obj_train_val_files/libs/revealjs/plugin/quarto-support/footer.css" rel="stylesheet">
<style type="text/css">
.callout {
margin-top: 1em;
margin-bottom: 1em;
border-radius: .25rem;
}
.callout.callout-style-simple {
padding: 0em 0.5em;
border-left: solid #acacac .3rem;
border-right: solid 1px silver;
border-top: solid 1px silver;
border-bottom: solid 1px silver;
display: flex;
}
.callout.callout-style-default {
border-left: solid #acacac .3rem;
border-right: solid 1px silver;
border-top: solid 1px silver;
border-bottom: solid 1px silver;
}
.callout .callout-body-container {
flex-grow: 1;
}
.callout.callout-style-simple .callout-body {
font-size: 1rem;
font-weight: 400;
}
.callout.callout-style-default .callout-body {
font-size: 0.9rem;
font-weight: 400;
}
.callout.callout-captioned.callout-style-simple .callout-body {
margin-top: 0.2em;
}
.callout:not(.callout-captioned) .callout-body {
display: flex;
}
.callout:not(.no-icon).callout-captioned.callout-style-simple .callout-content {
padding-left: 1.6em;
}
.callout.callout-captioned .callout-header {
padding-top: 0.2em;
margin-bottom: -0.2em;
}
.callout.callout-captioned .callout-caption p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.callout.callout-captioned.callout-style-simple .callout-content p {
margin-top: 0;
}
.callout.callout-captioned.callout-style-default .callout-content p {
margin-top: 0.7em;
}
.callout.callout-style-simple div.callout-caption {
border-bottom: none;
font-size: .9rem;
font-weight: 600;
opacity: 75%;
}
.callout.callout-style-default div.callout-caption {
border-bottom: none;
font-weight: 600;
opacity: 85%;
font-size: 0.9rem;
padding-left: 0.5em;
padding-right: 0.5em;
}
.callout.callout-style-default div.callout-content {
padding-left: 0.5em;
padding-right: 0.5em;
}
.callout.callout-style-simple .callout-icon::before {
height: 1rem;
width: 1rem;
display: inline-block;
content: "";
background-repeat: no-repeat;
background-size: 1rem 1rem;
}
.callout.callout-style-default .callout-icon::before {
height: 0.9rem;
width: 0.9rem;
display: inline-block;
content: "";
background-repeat: no-repeat;
background-size: 0.9rem 0.9rem;
}
.callout-caption {
display: flex
}
.callout-icon::before {
margin-top: 1rem;
padding-right: .5rem;
}
.callout.no-icon::before {
display: none !important;
}
.callout.callout-captioned .callout-body > .callout-content > :last-child {
margin-bottom: 0.5rem;
}
.callout.callout-captioned .callout-icon::before {
margin-top: .5rem;
padding-right: .5rem;
}
.callout:not(.callout-captioned) .callout-icon::before {
margin-top: 1rem;
padding-right: .5rem;
}
/* Callout Types */
div.callout-note {
border-left-color: #4582ec !important;
}
div.callout-note .callout-icon::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAEU0lEQVRYCcVXTWhcVRQ+586kSUMMxkyaElstCto2SIhitS5Ek8xUKV2poatCcVHtUlFQk8mbaaziwpWgglJwVaquitBOfhQXFlqlzSJpFSpIYyXNjBNiTCck7x2/8/LeNDOZxDuEkgOXe++553zfefee+/OYLOXFk3+1LLrRdiO81yNqZ6K9cG0P3MeFaMIQjXssE8Z1JzLO9ls20MBZX7oG8w9GxB0goaPrW5aNMp1yOZIa7Wv6o2ykpLtmAPs/vrG14Z+6d4jpbSKuhdcSyq9wGMPXjonwmESXrriLzFGOdDBLB8Y6MNYBu0dRokSygMA/mrun8MGFN3behm6VVAwg4WR3i6FvYK1T7MHo9BK7ydH+1uurECoouk5MPRyVSBrBHMYwVobG2aOXM07sWrn5qgB60rc6mcwIDJtQrnrEr44kmy+UO9r0u9O5/YbkS9juQckLed3DyW2XV/qWBBB3ptvI8EUY3I9p/67OW+g967TNr3Sotn3IuVlfMLVnsBwH4fsnebJvyGm5GeIUA3jljERmrv49SizPYuq+z7c2H/jlGC+Ghhupn/hcapqmcudB9jwJ/3jvnvu6vu5lVzF1fXyZuZZ7U8nRmVzytvT+H3kilYvH09mLWrQdwFSsFEsxFVs5fK7A0g8gMZjbif4ACpKbjv7gNGaD8bUrlk8x+KRflttr22JEMRUbTUwwDQScyzPgedQHZT0xnx7ujw2jfVfExwYHwOsDTjLdJ2ebmeQIlJ7neo41s/DrsL3kl+W2lWvAga0tR3zueGr6GL78M3ifH0rGXrBC2aAR8uYcIA5gwV8zIE8onoh8u0Fca/ciF7j1uOzEnqcIm59sEXoGc0+z6+H45V1CvAvHcD7THztu669cnp+L0okAeIc6zjbM/24LgGM1gZk7jnRu1aQWoU9sfUOuhrmtaPIO3YY1KLLWZaEO5TKUbMY5zx8W9UJ6elpLwKXbsaZ4EFl7B4bMtDv0iRipKoDQT2sNQI9b1utXFdYisi+wzZ/ri/1m7QfDgEuvgUUEIJPq3DhX/5DWNqIXDOweC2wvIR90Oq3lDpdMIgD2r0dXvGdsEW5H6x6HLRJYU7C69VefO1x8Gde1ZFSJLfWS1jbCnhtOPxmpfv2LXOA2Xk2tvnwKKPFuZ/oRmwBwqRQDcKNeVQkYcOjtWVBuM/JuYw5b6isojIkYxyYAFn5K7ZBF10fea52y8QltAg6jnMqNHFBmGkQ1j+U43HMi2xMar1Nv0zGsf1s8nUsmUtPOOrbFIR8bHFDMB5zL13Gmr/kGlCkUzedTzzmzsaJXhYawnA3UmARpiYj5ooJZiUoxFRtK3X6pgNPv+IZVPcnwbOl6f+aBaO1CNvPW9n9LmCp01nuSaTRF2YxHqZ8DYQT6WsXT+RD6eUztwYLZ8rM+rcPxamv1VQzFUkzFXvkiVrySGQgJNvXHJAxiU3/NwiC03rSf05VBaPtu/Z7/B8Yn/w7eguloAAAAAElFTkSuQmCC');
}
div.callout-note.callout-style-default .callout-caption {
background-color: #dae6fb
}
div.callout-important {
border-left-color: #d9534f !important;
}
div.callout-important .callout-icon::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAEKklEQVRYCcVXTWhcVRS+575MJym48A+hSRFr00ySRQhURRfd2HYjk2SSTokuBCkU2o0LoSKKraKIBTcuFCoidGFD08nkBzdREbpQ1EDNIv8qSGMFUboImMSZd4/f9zJv8ibJMC8xJQfO3HPPPef7zrvvvnvviIkpC9nsw0UttFunbUhpFzFtarSd6WJkStVMw5xyVqYTvkwfzuf/5FgtkVoB0729j1rjXwThS7Vio+Mo6DNnvLfahoZ+i/o32lULuJ3NNiz7q6+pyAUkJaFF6JwaM2lUJlV0MlnQn5aTRbEu0SEqHUa0A4AdiGuB1kFXRfVyg5d87+Dg4DL6m2TLAub60ilj7A1Ec4odSAc8X95sHh7+ZRPCFo6Fnp7HfU/fBng/hi10CjCnWnJjsxvDNxWw0NfV6Rv5GgP3I3jGWXumdTD/3cbEOP2ZbOZp69yniG3FQ9z1jD7bnBu9Fc2tKGC2q+uAJOQHBDRiZX1x36o7fWBs7J9ownbtO+n0/qWkvW7UPIfc37WgT6ZGR++EOJyeQDSb9UB+DZ1G6DdLDzyS+b/kBCYGsYgJbSQHuThGKRcw5xdeQf8YdNHsc6ePXrlSYMBuSIAFTGAtQo+VuALo4BX83N190NWZWbynBjhOHsmNfFWLeL6v+ynsA58zDvvAC8j5PkbOcXCMg2PZFk3q8MjI7WAG/Dp9AwP7jdGBOOQkAvlFUB+irtm16I1Zw9YBcpGTGXYmk3kQIC/Cds55l+iMI3jqhjAuaoe+am2Jw5GT3Nbz3CkE12NavmzN5+erJW7046n/CH1RO/RVa8lBLozXk9uqykkGAyRXLWlLv5jyp4RFsG5vGVzpDLnIjTWgnRy2Rr+tDKvRc7Y8AyZq10jj8DqXdnIRNtFZb+t/ZRtXcDiVnzpqx8mPcDWxgARUqx0W1QB9MeUZiNrV4qP+Ehc+BpNgATsTX8ozYKL2NtFYAHc84fG7ndxUPr+AR/iQSns7uSUufAymwDOb2+NjK27lEFocm/EE2WpyIy/Hi66MWuMKJn8RvxIcj87IM5Vh9663ziW36kR0HNenXuxmfaD8JC7tfKbrhFr7LiZCrMjrzTeGx+PmkosrkNzW94ObzwocJ7A1HokLolY+AvkTiD/q1H0cN48c5EL8Crkttsa/AXQVDmutfyku0E7jShx49XqV3MFK8IryDhYVbj7Sj2P2eBxwcXoe8T8idsKKPRcnZw1b+slFTubwUwhktrfnAt7J++jwQtLZcm3sr9LQrjRzz6cfMv9aLvgmnAGvpoaGLxM4mAEaLV7iAzQ3oU0IvD5x9ix3yF2RAAuYAOO2f7PEFWCXZ4C9Pb2UsgDeVnFSpbFK7/IWu7TPTvBqzbGdCHOJQSxiEjt6IyZmxQyEJHv6xyQsYk//moVFsN2zP6fRImjfq7/n/wFDguUQFNEwugAAAABJRU5ErkJggg==');
}
div.callout-important.callout-style-default .callout-caption {
background-color: #f7dddc
}
div.callout-warning {
border-left-color: #f0ad4e !important;
}
div.callout-warning .callout-icon::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAETklEQVRYCeVWW2gcVRg+58yaTUnizqbipZeX4uWhBEniBaoUX1Ioze52t7sRq6APio9V9MEaoWlVsFasRq0gltaAPuxms8lu0gcviE/FFOstVbSIxgcv6SU7EZqmdc7v9+9mJtNks51NTUH84ed889/PP+cmxP+d5FIbMJmNbpREu4WUkiTtCicKny0l1pIKmBzovF2S+hIJHX8iEu3hZJ5lNZGqyRrGSIQpq15AzF28jgpeY6yk6GVdrfFqdrD6Iw+QlB8g0YS2g7dyQmXM/IDhBhT0UCiRf59lfqmmDvzRt6kByV/m4JjtzuaujMUM2c5Z2d6JdKrRb3K2q6mA+oYVz8JnDdKPmmNthzkAk/lN63sYPgevrguc72aZX/L9C6x09GYyxBgCX4NlvyGUHOKELlm5rXeR1kchuChJt4SSwyddZRXgvwMGvYo4QSlk3/zkHD8UHxwVJA6zjZZqP8v8kK8OWLnIZtLyCAJagYC4rTGW/9Pqj92N/c+LUaAj27movwbi19tk/whRCIE7Q9vyI6yvRpftAKVTdUjOW40X3h5OXsKCdmFcx0xlLJoSuQngnrJe7Kcjm4OMq9FlC7CMmScQANuNvjfP3PjGXDBaUQmbp296S5L4DrpbrHN1T87ZVEZVCzg1FF0Ft+dKrlLukI+/c9ENo+TvlTDbYFvuKPtQ9+l052rXrgKoWkDAFnvh0wTOmYn8R5f4k/jN/fZiCM1tQx9jQQ4ANhqG4hiL0qIFTGViG9DKB7GYzgubnpofgYRwO+DFjh0Zin2m4b/97EDkXkc+f6xYAPX0KK2I/7fUQuwzuwo/L3AkcjugPNixC8cHf0FyPjWlItmLxWw4Ou9YsQCr5fijMGoD/zpdRy95HRysyXA74MWOnscpO4j2y3HAVisw85hX5+AFBRSHt4ShfLFkIMXTqyKFc46xdzQM6XbAi702a7sy04J0+feReMFKp5q9esYLCqAZYw/k14E/xcLLsFElaornTuJB0svMuJINy8xkIYuL+xPAlWRceH6+HX7THJ0djLUom46zREu7tTkxwmf/FdOZ/sh6Q8qvEAiHpm4PJ4a/doJe0gH1t+aHRgCzOvBvJedEK5OFE5jpm4AGP2a8Dxe3gGJ/pAutug9Gp6he92CsSsWBaEcxGx0FHytmIpuqGkOpldqNYQK8cSoXvd+xLxXADw0kf6UkJNFtdo5MOgaLjiQOQHcn+A6h5NuL2s0qsC2LOM75PcF3yr5STuBSAcGG+meA14K/CI21HcS4LBT6tv0QAh8Dr5l93AhZzG5ZJ4VxAqdZUEl9z7WJ4aN+svMvwHHL21UKTd1mqvChH7/Za5xzXBBKrUcB0TQ+Ulgkfbi/H/YT5EptrGzsEK7tR1B7ln9BBwckYfMiuSqklSznIuoIIOM42MQO+QnduCoFCI0bpkzjCjddHPN/F+2Yu+sd9bKNpVwHhbS3LluK/0zgfwD0xYI5dXuzlQAAAABJRU5ErkJggg==');
}
div.callout-warning.callout-style-default .callout-caption {
background-color: #fcefdc
}
div.callout-tip {
border-left-color: #02b875 !important;
}
div.callout-tip .callout-icon::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAADr0lEQVRYCe1XTWgTQRj9ZjZV8a9SPIkKgj8I1bMHsUWrqYLVg4Ue6v9BwZOxSYsIerFao7UiUryIqJcqgtpimhbBXoSCVxUFe9CTiogUrUp2Pt+3aUI2u5vdNh4dmMzOzHvvezuz8xNFM0mjnbXaNu1MvFWRXkXEyE6aYOYJpdW4IXuA4r0fo8qqSMDBU0v1HJUgVieAXxzCsdE/YJTdFcVIZQNMyhruOMJKXYFoLfIfIvVIMWdsrd+Rpd86ZmyzzjJmLStqRn0v8lzkb4rVIXvnpScOJuAn2ACC65FkPzEdEy4TPWRLJ2h7z4cArXzzaOdKlbOvKKX25Wl00jSnrwVxAg3o4dRxhO13RBSdNvH0xSARv3adTXbBdTf64IWO2vH0LT+cv4GR1DJt+DUItaQogeBX/chhbTBxEiZ6gftlDNXTrvT7co4ub5A6gp9HIcHvzTa46OS5fBeP87Qm0fQkr4FsYgVQ7Qg+ZayaDg9jhg1GkWj8RG6lkeSacrrHgDaxdoBiZPg+NXV/KifMuB6//JmYH4CntVEHy/keA6x4h4CU5oFy8GzrBS18cLJMXcljAKB6INjWsRcuZBWVaS3GDrqB7rdapVIeA+isQ57Eev9eCqzqOa81CY05VLd6SamW2wA2H3SiTbnbSxmzfp7WtKZkqy4mdyAlGx7ennghYf8voqp9cLSgKdqNfa6RdRsAAkPwRuJZNbpByn+RrJi1RXTwdi8RQF6ymDwGMAtZ6TVE+4uoKh+MYkcLsT0Hk8eAienbiGdjJHZTpmNjlbFJNKDVAp2fJlYju6IreQxQ08UJDNYdoLSl6AadO+fFuCQqVMB1NJwPm69T04Wv5WhfcWyfXQB+wXRs1pt+nCknRa0LVzSA/2B+a9+zQJadb7IyyV24YAxKp2Jqs3emZTuNnKxsah+uabKbMk7CbTgJx/zIgQYErIeTKRQ9yD9wxVof5YolPHqaWo7TD6tJlh7jQnK5z2n3+fGdggIOx2kaa2YI9QWarc5Ce1ipNWMKeSG4DysFF52KBmTNMmn5HqCFkwy34rDg05gDwgH3bBi+sgFhN/e8QvRn8kbamCOhgrZ9GJhFDgfcMHzFb6BAtjKpFhzTjwv1KCVuxHvCbsSiEz4CANnj84cwHdFXAbAOJ4LTSAawGWFn5tDhLMYz6nWeU2wJfIhmIJBefcd/A5FWQWGgrWzyORZ3Q6HuV+Jf0Bj+BTX69fm1zWgK7By1YTXchFDORywnfQ7GpzOo6S+qECrsx2ifVQAAAABJRU5ErkJggg==');
}
div.callout-tip.callout-style-default .callout-caption {
background-color: #ccf1e3
}
div.callout-caution {
border-left-color: #fd7e14 !important;
}
div.callout-caution .callout-icon::before {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAACV0lEQVRYCdVWzWoUQRCuqp2ICBLJXgITZL1EfQDBW/bkzUMUD7klD+ATSHBEfAIfQO+iXsWDxJsHL96EHAwhgzlkg8nBg25XWb0zIb0zs9muYYWkoKeru+vn664fBqElyZNuyh167NXJ8Ut8McjbmEraKHkd7uAnAFku+VWdb3reSmRV8PKSLfZ0Gjn3a6Xlcq9YGb6tADjn+lUfTXtVmaZ1KwBIvFI11rRXlWlatwIAAv2asaa9mlB9wwygiDX26qaw1yYPzFXg2N1GgG0FMF8Oj+VIx7E/03lHx8UhvYyNZLN7BwSPgekXXLribw7w5/c8EF+DBK5idvDVYtEEwMeYefjjLAdEyQ3M9nfOkgnPTEkYU+sxMq0BxNR6jExrAI31H1rzvLEfRIdgcv1XEdj6QTQAS2wtstEALLG1yEZ3QhH6oDX7ExBSFEkFINXH98NTrme5IOaaA7kIfiu2L8A3qhH9zRbukdCqdsA98TdElyeMe5BI8Rs2xHRIsoTSSVFfCFCWGPn9XHb4cdobRIWABNf0add9jakDjQJpJ1bTXOJXnnRXHRf+dNL1ZV1MBRCXhMbaHqGI1JkKIL7+i8uffuP6wVQAzO7+qVEbF6NbS0LJureYcWXUUhH66nLR5rYmva+2tjRFtojkM2aD76HEGAD3tPtKM309FJg5j/K682ywcWJ3PASCcycH/22u+Bh7Aa0ehM2Fu4z0SAE81HF9RkB21c5bEn4Dzw+/qNOyXr3DCTQDMBOdhi4nAgiFDGCinIa2owCEChUwD8qzd03PG+qdW/4fDzjUMcE1ZpIAAAAASUVORK5CYII=');
}
div.callout-caution.callout-style-default .callout-caption {
background-color: #ffe5d0
}
</style>
<style type="text/css">
.reveal div.sourceCode {
margin: 0;
overflow: auto;
}
.reveal div.hanging-indent {
margin-left: 1em;
text-indent: -1em;
}
.reveal .slide:not(.center) {
height: 100%;
}
.reveal .slide.scrollable {
overflow-y: auto;
}
.reveal .footnotes {
height: 100%;
overflow-y: auto;
}
.reveal .slide .absolute {
position: absolute;
display: block;
}
.reveal .footnotes ol {
counter-reset: ol;
list-style-type: none;
margin-left: 0;
}
.reveal .footnotes ol li:before {
counter-increment: ol;
content: counter(ol) ". ";
}
.reveal .footnotes ol li > p:first-child {
display: inline-block;
}
.reveal .slide ul,
.reveal .slide ol {
margin-bottom: 0.5em;
}
.reveal .slide ul li,
.reveal .slide ol li {
margin-top: 0.4em;
margin-bottom: 0.2em;
}
.reveal .slide ul[role="tablist"] li {
margin-bottom: 0;
}
.reveal .slide ul li > *:first-child,
.reveal .slide ol li > *:first-child {
margin-block-start: 0;
}
.reveal .slide ul li > *:last-child,
.reveal .slide ol li > *:last-child {
margin-block-end: 0;
}
.reveal .slide .columns:nth-child(3) {
margin-block-start: 0.8em;
}
.reveal blockquote {
box-shadow: none;
}
.reveal .tippy-content>* {
margin-top: 0.2em;
margin-bottom: 0.7em;
}
.reveal .tippy-content>*:last-child {
margin-bottom: 0.2em;
}
.reveal .slide > img.stretch.quarto-figure-center,
.reveal .slide > img.r-stretch.quarto-figure-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-left,
.reveal .slide > img.r-stretch.quarto-figure-left {
display: block;
margin-left: 0;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-right,
.reveal .slide > img.r-stretch.quarto-figure-right {
display: block;
margin-left: auto;
margin-right: 0;
}
</style>
</head>
<body class="quarto-light">
<div class="reveal">
<div class="slides">
<section id="labels" class="slide level2">
<h2>Labels</h2>
<img data-src="images/val_batch0_labels.jpg" class="r-stretch"></section>
<section id="predictions" class="slide level2">
<h2>Predictions</h2>
<img data-src="images/val_batch0_pred.jpg" class="r-stretch"><div class="footer footer-default">
</div>
</section>
</div>
</div>
<script>window.backupDefine = window.define; window.define = undefined;</script>
<script src="obj_train_val_files/libs/revealjs/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="obj_train_val_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/quarto-support/support.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/notes/notes.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/search/search.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/zoom/zoom.js"></script>
<script src="obj_train_val_files/libs/revealjs/plugin/math/math.js"></script>
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': false,
'smaller': false,
'pdfSeparateFragments': false,
'autoAnimateEasing': "ease",
'autoAnimateDuration': 1,
'autoAnimateUnmatched': true,
'menu': {"side":"left","useTextContentForMissingTitles":true,"markers":false,"loadIcons":false,"custom":[{"title":"Tools","icon":"<i class=\"fas fa-gear\"></i>","content":"<ul class=\"slide-menu-items\">\n<li class=\"slide-tool-item active\" data-item=\"0\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.fullscreen(event)\"><kbd>f</kbd> Fullscreen</a></li>\n<li class=\"slide-tool-item\" data-item=\"1\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.speakerMode(event)\"><kbd>s</kbd> Speaker View</a></li>\n<li class=\"slide-tool-item\" data-item=\"2\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.overview(event)\"><kbd>o</kbd> Slide Overview</a></li>\n<li class=\"slide-tool-item\" data-item=\"3\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.overview(event)\"><kbd>e</kbd> PDF Export Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"4\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.keyboardHelp(event)\"><kbd>?</kbd> Keyboard Help</a></li>\n</ul>"}],"openButton":true},
'smaller': false,
// Display controls in the bottom right corner
controls: false,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: false,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'edges',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// 'all', 'print', or 'speaker'
showSlideNumber: 'all',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: true,
// Start with 1 for the hash rather than 0
hashOneBasedIndex: false,
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: false,
// Vertical centering of slides
center: false,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: 'linear',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if it should be possible to pause the presentation (blackout)
pause: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: null,
// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: null,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: null,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// The display mode that will be used to show slides
display: 'block',
// Hide cursor if inactive
hideInactiveCursor: true,
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Opens links in an iframe preview overlay
previewLinks: false,
// Transition style (none/fade/slide/convex/concave/zoom)
transition: 'none',
// Transition speed (default/fast/slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: 'none',
// Number of slides away from the current that are visible
viewDistance: 3,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 2,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1050,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
math: {
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
config: 'TeX-AMS_HTML-full',
tex2jax: {
inlineMath: [['\\(','\\)']],
displayMath: [['\\[','\\]']],
balanceBraces: true,
processEscapes: false,
processRefs: true,
processEnvironments: true,
preview: 'TeX',
skipTags: ['script','noscript','style','textarea','pre','code'],
ignoreClass: 'tex2jax_ignore',
processClass: 'tex2jax_process'
},
},
// reveal.js plugins
plugins: [QuartoLineHighlight, PdfExport, RevealMenu, QuartoSupport,
RevealMath,
RevealNotes,
RevealSearch,
RevealZoom
]
});
</script>
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
if (mode === "dark") {
bodyEl.classList.add("quarto-dark");
bodyEl.classList.remove("quarto-light");
} else {
bodyEl.classList.add("quarto-light");
bodyEl.classList.remove("quarto-dark");
}
}
const toggleBodyColorPrimary = () => {
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
if (bsSheetEl) {
toggleBodyColorMode(bsSheetEl);
}
}
toggleBodyColorPrimary();
const tabsets = window.document.querySelectorAll(".panel-tabset-tabby")
tabsets.forEach(function(tabset) {
const tabby = new Tabby('#' + tabset.id);
});
const clipboard = new window.ClipboardJS('.code-copy-button', {
target: function(trigger) {
return trigger.previousElementSibling;
}
});
clipboard.on('success', function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "Copied!");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",
offset: [0, -8]});
tooltip.show();
}
setTimeout(function() {
if (tooltip) {
tooltip.hide();
button.removeAttribute("data-bs-title");
button.removeAttribute("data-bs-toggle");
button.removeAttribute("data-bs-placement");
}
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
});
function tippyHover(el, contentFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.closest('section.slide') || el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto-reveal',
placement: 'bottom-start'
};
config['offset'] = [0,0];
config['maxWidth'] = 700;
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
const cites = parentEl.dataset.cites;
if (cites) {
return {
el,
cites: cites.split(' ')
};
} else {
return findCites(el.parentElement)
}
} else {
return undefined;
}
};
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const citeInfo = findCites(ref);
if (citeInfo) {
tippyHover(citeInfo.el, function() {
var popup = window.document.createElement('div');
citeInfo.cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
}
});
</script>
</body></html>

View File

@@ -1,11 +0,0 @@
---
format: revealjs
background-opacity: 0
---
## Labels
![](images/val_batch0_labels.jpg)
## Predictions
![](images/val_batch0_pred.jpg)

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - Deep Learning</title>
<title>Remote Sensing for OSINT - Object Detection</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -106,6 +106,8 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="site_libs/bootstrap/bootstrap-dark.min.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<script src="site_libs/quarto-contrib/videojs/video.min.js"></script>
<link href="site_libs/quarto-contrib/videojs/video-js.css" rel="stylesheet">
<script id="quarto-search-options" type="application/json">{
"location": "sidebar",
"copy-button": false,
@@ -134,12 +136,6 @@ function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</script>
<style>
.quarto-title-block .quarto-title-banner {
color: white;
background: #34a832;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
@@ -152,7 +148,7 @@ background: #34a832;
<header id="quarto-header" class="headroom fixed-top">
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div class="container-fluid d-flex justify-content-between">
<h1 class="quarto-secondary-nav-title">Deep Learning</h1>
<h1 class="quarto-secondary-nav-title">Object Detection</h1>
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
<i class="bi bi-chevron-right"></i>
</button>
@@ -160,23 +156,7 @@ background: #34a832;
</nav>
</header>
<!-- content -->
<header id="title-block-header" class="quarto-title-block default page-columns page-full">
<div class="quarto-title-banner page-columns page-full">
<div class="quarto-title column-body">
<h1 class="title d-none d-lg-block">Deep Learning</h1>
</div>
</div>
<div class="quarto-title-meta">
</div>
</header><div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse sidebar-navigation floating overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header sidebar-header-stacked">
@@ -184,19 +164,21 @@ background: #34a832;
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -228,64 +210,69 @@ background: #34a832;
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">A. Introduction</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">C. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
@@ -308,7 +295,7 @@ background: #34a832;
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link active">Deep Learning</a>
<a href="./object_detection.html" class="sidebar-item-text sidebar-link active">Object Detection</a>
</div>
</li>
</ul>
@@ -322,9 +309,7 @@ background: #34a832;
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#introduction" id="toc-introduction" class="nav-link active" data-scroll-target="#introduction">Introduction</a>
<ul class="collapse">
<li><a href="#object-detection-in-satellite-imagery" id="toc-object-detection-in-satellite-imagery" class="nav-link" data-scroll-target="#object-detection-in-satellite-imagery">Object Detection in Satellite Imagery</a>
<li><a href="#object-detection-in-satellite-imagery" id="toc-object-detection-in-satellite-imagery" class="nav-link active" data-scroll-target="#object-detection-in-satellite-imagery">Object Detection in Satellite Imagery</a>
<ul class="collapse">
<li><a href="#yolov5" id="toc-yolov5" class="nav-link" data-scroll-target="#yolov5">YOLOv5</a></li>
</ul></li>
@@ -332,19 +317,34 @@ background: #34a832;
<ul class="collapse">
<li><a href="#accuracy-assessment" id="toc-accuracy-assessment" class="nav-link" data-scroll-target="#accuracy-assessment">Accuracy Assessment</a></li>
</ul></li>
<li><a href="#inference" id="toc-inference" class="nav-link" data-scroll-target="#inference">Inference</a></li>
<li><a href="#inference" id="toc-inference" class="nav-link" data-scroll-target="#inference">Inference</a>
<ul class="collapse">
<li><a href="#loading-a-trained-model" id="toc-loading-a-trained-model" class="nav-link" data-scroll-target="#loading-a-trained-model">1. Loading a trained model</a></li>
<li><a href="#loading-the-input-imagery" id="toc-loading-the-input-imagery" class="nav-link" data-scroll-target="#loading-the-input-imagery">2. Loading the input imagery</a></li>
</ul></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/oballinger/GEE_OSINT/edit/main/object_detection.qmd" class="toc-action">Edit this page</a></p></div></div></nav>
</div>
<!-- main -->
<main class="content quarto-banner-title-block page-columns page-full" id="quarto-document-content">
<main class="content page-columns page-full" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block">Object Detection</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<section id="introduction" class="level1 page-columns page-full">
<h1>Introduction</h1>
<p>The Ship Detection tutorial explored a use case in which we might want to monitor the activity of ships in a particular location. That was a fairly straightforward task: the sea is very flat, and ships (especially large cargo and military vessels) protrude significantly. Using radar imagery, we could just set a threshold because if anything on the water is reflecting radio waves, its probably a ship.</p>
<p>One shortcoming of this approach is that it doesnt tell us what <em>kind</em> of ship weve detected. Sure, you could use the shape and size to distinguish between a fishing vessel and an aircraft carrier. But what about ships of similar sizes? Or what if you wanted to use satellite imagery to identify things other than ships, like airplanes, cars, or bridges? This sort of task called <strong>“object detection”</strong> is a bit more complicated.</p>
<p>In this tutorial, well be using a deep learning model called <strong>YOLOv5</strong> to detect objects in satellite imagery. Well be training the model on a custom dataset, and then using it to dynamically identify objects in satellite imagery of different resolutions pulled from Google Earth Engine. The tutorial is broken up into three sections:</p>
@@ -437,10 +437,133 @@ background: #34a832;
</section>
<section id="inference" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="inference">Inference</h2>
<p>This image shows</p>
<p>Now that weve got a trained model, we can use it to conduct object detection on new images. well build a data processing pipeline in three steps by:</p>
<ol type="1">
<li>Loading our trained model</li>
<li>Creating an interactive map to define the area we want to analyze.</li>
<li>Defining a function to run object detection within this area.</li>
</ol>
<section id="loading-a-trained-model" class="level3">
<h3 class="anchored" data-anchor-id="loading-a-trained-model">1. Loading a trained model</h3>
<p>During the training process, YOLO is iteratively tweaking the model to try to maximize mAP 0.5. It automatically saves the best version of the model in the following location: <code>YOLOv5_RS/runs/train/exp/weights/best.pt</code>. You can save this file for later use, which I have done in case you just want to use this model without having to train it yourself. Ive also included several other pre-trained models which you can find in the <code>YOLOv5_RS/weights/</code> directory, including:</p>
<ul>
<li><p><code>lowres_ships.pt</code>: the model we just trained on Sentinel-2 imagery.</p></li>
<li><p><code>aircraft.pt</code>: trained on the high resolution <a href="https://www.kaggle.com/datasets/airbusgeo/airbus-aircrafts-sample-dataset">Airbus Aircraft Detection Dataset</a>.</p></li>
<li><p><code>general.pt</code>: trained on the <a href="https://captain-whu.github.io/DOTA/dataset.html">DOTA dataset</a> by <a href="https://github.com/KevinMuyaoGuo/yolov5s_for_satellite_imagery#readme">Kevin Guo</a>. This model works great on high resolution satellite imagery, and can detect the following classes: plane, ship, storage tank, baseball diamond, tennis court, basketball court, ground track field, harbor, bridge, large vehicle, small vehicle, helicopter, roundabout, soccer field, swimming pool, container crane, airport and helipad.</p></li>
</ul>
<p>So far, weve trained a model to detect ships in Sentinel-2 imagery. But to show the versatility of this general approach, the rest of this tutorial will load up the <code>general.pt</code> model, and use it to detect a wide range of aircraft in high resolution imagery.</p>
</section>
<section id="loading-the-input-imagery" class="level3 page-columns page-full">
<h3 class="anchored" data-anchor-id="loading-the-input-imagery">2. Loading the input imagery</h3>
<p>To get started with object detection on satellite imagery using these pre-trained models, we need to define an Area of Interest (AOI) and load satellite imagery. Well do this by accessing Google Earth Engine from the Python notebook were working in, and creating an interactive map that will let us draw an AOI for analysis.</p>
<p>First, we first need to import a few packages:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="op">!</span>pip install geemap <span class="op">-</span>q</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> ee</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> geemap</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> requests</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> PIL <span class="im">import</span> Image</span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> PIL <span class="im">import</span> ImageDraw</span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> io <span class="im">import</span> BytesIO</span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> torch</span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> PIL</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Once weve done this, well also need to log in to Google Earth Engine using its Python API in order to access the satellite imagery. Running these two lines of code will generate a prompt with instructions; you have to click the link, confirm that you give the notebook permission to access your Earth Engine account, and paste the authentication code in the provided dialogue box.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>ee.Authenticate()</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>ee.Initialize()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Great now we can load high resolution imagery from the National Agriculture Imagery Program (NAIP) and create an interactive map. For this example, Im centering the map on the <a href="https://en.wikipedia.org/wiki/309th_Aerospace_Maintenance_and_Regeneration_Group">Davis-Monthan Airplane Boneyard</a>. This is where the airforce retires and restores aircraft, so it will have lots of airplanes of different kinds for us to identify.</p>
<p>First, we want to define a function called <code>detect</code> that will accept four arguments:</p>
<ul>
<li><code>input</code>: the satellite imagery we want to analyze.</li>
<li><code>visParams</code>: a dictionary of visualization parameters for the imagery.</li>
<li><code>weight</code>: the name of the pre-trained model we want to use.</li>
<li><code>labels</code>: a boolean indicating whether we want to display the labels on the processed image.</li>
</ul>
<div class="sourceCode" id="cb6"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> detect(<span class="bu">input</span>, visParams, weight, labels<span class="op">=</span><span class="va">True</span>):</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># Get the AOI from the map</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> aoi <span class="op">=</span> ee.FeatureCollection(Map.draw_features)</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> mapScale<span class="op">=</span>Map.getScale()</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> <span class="co"># Visualize the raster in Earth Engine and get a download URL</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> image_url<span class="op">=</span><span class="bu">input</span>.visualize(bands<span class="op">=</span>visParams[<span class="st">'bands'</span>], <span class="bu">max</span><span class="op">=</span>visParams[<span class="st">'max'</span>]).getThumbURL({<span class="st">"region"</span>:aoi.geometry(), <span class="st">'scale'</span>:mapScale})</span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> <span class="co"># Load the image into a PIL image</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> response <span class="op">=</span> requests.get(image_url)</span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> img <span class="op">=</span> Image.<span class="bu">open</span>(BytesIO(response.content))</span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a> <span class="co"># Load the model</span></span>
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a> model <span class="op">=</span>torch.hub.load(<span class="st">'.'</span>,<span class="st">'custom'</span>, path<span class="op">=</span><span class="st">'weights/</span><span class="sc">{}</span><span class="st">.pt'</span>.<span class="bu">format</span>(weight),source<span class="op">=</span><span class="st">'local'</span>,_verbose<span class="op">=</span><span class="va">False</span>)</span>
<span id="cb6-16"><a href="#cb6-16" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb6-17"><a href="#cb6-17" aria-hidden="true" tabindex="-1"></a> <span class="co"># Run inference</span></span>
<span id="cb6-18"><a href="#cb6-18" aria-hidden="true" tabindex="-1"></a> results <span class="op">=</span> model(img)</span>
<span id="cb6-19"><a href="#cb6-19" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-20"><a href="#cb6-20" aria-hidden="true" tabindex="-1"></a> <span class="co"># Count the number of detections</span></span>
<span id="cb6-21"><a href="#cb6-21" aria-hidden="true" tabindex="-1"></a> counts<span class="op">=</span>pd.DataFrame(results.pandas().xyxy[<span class="dv">0</span>].groupby(<span class="st">'name'</span>).size()).reset_index().rename(columns<span class="op">=</span>{<span class="dv">0</span>:<span class="st">'count'</span>,<span class="st">'name'</span>:<span class="st">'detected'</span>}).set_index(<span class="st">'count'</span>)</span>
<span id="cb6-22"><a href="#cb6-22" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-23"><a href="#cb6-23" aria-hidden="true" tabindex="-1"></a> <span class="co"># Display the results</span></span>
<span id="cb6-24"><a href="#cb6-24" aria-hidden="true" tabindex="-1"></a> results.show(labels<span class="op">=</span>labels)</span>
<span id="cb6-25"><a href="#cb6-25" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-26"><a href="#cb6-26" aria-hidden="true" tabindex="-1"></a> <span class="co"># Print the number of detections and the date of the image</span></span>
<span id="cb6-27"><a href="#cb6-27" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(ee.Date(<span class="bu">input</span>.get(<span class="st">'system:time_start'</span>)).<span class="bu">format</span>(<span class="st">"dd-MM-yyyy"</span>).getInfo())</span>
<span id="cb6-28"><a href="#cb6-28" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(counts)</span>
<span id="cb6-29"><a href="#cb6-29" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb6-30"><a href="#cb6-30" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> counts</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Now, we can load the NAIP imagery and create an interactive map.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="co"># load the past 10 years of NAIP imagery</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>naip <span class="op">=</span> ee.ImageCollection(<span class="st">'USDA/NAIP/DOQQ'</span>).<span class="bu">filter</span>(ee.Filter.date(<span class="st">'2012-01-01'</span>, <span class="st">'2022-01-01'</span>))</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="co"># set some thresholds</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a>trueColorVis <span class="op">=</span> {</span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="st">'bands'</span>:[<span class="st">'R'</span>, <span class="st">'G'</span>, <span class="st">'B'</span>],</span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="st">'min'</span>: <span class="dv">0</span>,</span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="st">'max'</span>: <span class="dv">300</span>,</span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a>}<span class="op">;</span></span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="co"># initialize our map</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a>Map <span class="op">=</span> geemap.Map()</span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a>Map.setCenter(<span class="op">-</span><span class="fl">110.84</span>,<span class="fl">32.16</span>,<span class="dv">17</span>)</span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a>Map.addLayer(naip.first(), trueColorVis, <span class="st">"naip"</span>)</span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a>Map</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>This will generate a small map with some drawing tools on the left side. We can use these tools to draw a polygon around the area we want to analyze. Use the drawing tools to draw a rectangle around an area of interest.</p>
<p>Finally, we can run the detection on the imagery. Well do this by iterating through the collection of images, and running the <code>detect</code> function on each one. Well also store the results in a dataframe so we can analyze them later.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Get the polygon we just drew on the map </span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a>aoi<span class="op">=</span>ee.FeatureCollection(Map.draw_features)</span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="co"># Get a list of all the images in the collection</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a>naip_list<span class="op">=</span>naip.filterBounds(aoi).toList(naip.size())</span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a><span class="co"># Iterate through the list of images and run detection on each one</span></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> num <span class="kw">in</span> <span class="bu">range</span>(<span class="dv">0</span>,(img_list.size()).getInfo()):</span>
<span id="cb8-9"><a href="#cb8-9" aria-hidden="true" tabindex="-1"></a> detect(ee.Image(naip_list.get(num)), trueColorVis,<span class="st">'general'</span>,labels<span class="op">=</span><span class="va">False</span>)</span>
<span id="cb8-10"><a href="#cb8-10" aria-hidden="true" tabindex="-1"></a> df<span class="op">=</span>df.append(detection) <span class="co"># store the results in a dataframe</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>Below is the result of the detection on the latest image in the collection:</p>
<div class="column-screen">
<p><img src="images/boneyard.jpg" class="img-fluid"></p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="images/boneyard.jpg" class="img-fluid figure-img"></p>
<p></p><figcaption class="figure-caption">Davis-Monthan Airplane Boneyard, Tucson AZ. 32.139498, -110.868549</figcaption><p></p>
</figure>
</div>
</div>
<p>This image shows a remarkable degree of accuracy being achieved by our model. Inference took just 822.2 milliseconds, and it seems to be doing pretty well. The model identifies over 100 different kinds of aircraft (orange boxes) of many shapes and sizes, civilian and military, without missing a single one. It also identifies around 20 different types of helicopter (blue boxes) in the top right and even spots the cars on the highway and in the parking lots (red boxes). Its not perfect it thinks theres a ship in the bottom left corner near the shed (yellow box); in reality this appears to be half of a planes fuselage, an understandable mistake given how long it took <em>me</em> to figure out what it was.</p>
<!--
Even through we trained our model on Sentinel-2 imagery (10 meters per pixel), it can still be used on imagery from different satellites as long as they have a broadly similar resolution. A ship in PlanetScope imagery (3 meters per pixel) will look roughly similar to a ship in Sentinel-2 imagery. Using PlanetScope has another big over Sentinel-2 beyond its higher spatial resolution: it has a much higher revisit rate (daily instead of 5 days). Though *downloading* PlanetScope imagery isn't free, you *can* generate a timelapse image of any area on Earth using Planet's [Planet Stories](https://www.planet.com/stories/create) tool. Simply create a free account and follow the instructions to generate a timelapse of an area of interest. You can then download the timelapse video and use it as input to our model.
Once you've done this, you can run the following line of code to automatically identify ships in the timelapse video:
![](./images/mikolayiv.mp4)
-->
</section>
@@ -705,6 +828,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
</div>
</nav>
</div> <!-- /content -->
<script>videojs(video_shortcode_videojs_video1);</script>

View File

@@ -1,43 +0,0 @@
# Deep Learning {.unnumbered}
---
title-block-banner: "#34a832"
title-block-banner-color: 'white'
---
# Introduction
The Ship Detection tutorial explored a use case in which we might want to monitor the activity of ships in a particular location. That was a fairly straightforward task: the sea is very flat, and ships (especially large cargo and military vessels) protrude significantly. Using radar imagery, we could just set a threshold because if anything on the water is reflecting radio waves, it's probably a ship.
One shortcoming of this approach is that it doesn't tell us what *kind* of ship we've detected. Sure, you could use the shape and size to distinguish between a fishing vessel and an aircraft carrier. But what about ships of similar sizes? Or what if you wanted to use satellite imagery to identify things other than ships, like airplanes, cars, or bridges? This sort of task-- called **"object detection"** is a bit more complicated.
In this tutorial,
1. Object detection in satellite imagery
2. Training a deep learning model on a custom dataset
3. Dynamic inference using Google Earth Engine
## Object Detection in Satellite Imagery
Object detction in satellite imagery has a variety of useful applications. Immediately prior to the invasion of Ukraine, for example, a number of articles emerged
- monitoring a large area
- monitoring a smaller area over time
- lenvls
:::{.column-screen}
![](images/obj_det2.jpg)
:::
## Training
YOLO is
## Inference

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - Refinery Identification</title>
<title>Remote Sensing for OSINT - Refinery Identification</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -166,19 +166,21 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -210,14 +212,9 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">A. Introduction</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -225,44 +222,24 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
@@ -270,6 +247,36 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">C. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
</div>
</li>
@@ -287,6 +294,11 @@ gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>

File diff suppressed because one or more lines are too long

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Google Earth Engine for OSINT - Ship Detection</title>
<title>Remote Sensing for OSINT - Ship Detection</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@@ -135,12 +135,6 @@ function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-RK9ZLZQ6GL', { 'anonymize_ip': true});
</script>
<style>
.quarto-title-block .quarto-title-banner {
color: white;
background: #34a832;
}
</style>
</head>
@@ -160,23 +154,7 @@ background: #34a832;
</nav>
</header>
<!-- content -->
<header id="title-block-header" class="quarto-title-block default page-columns page-full">
<div class="quarto-title-banner page-columns page-full">
<div class="quarto-title column-body">
<h1 class="title d-none d-lg-block">Ship Detection</h1>
</div>
</div>
<div class="quarto-title-meta">
</div>
</header><div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse sidebar-navigation floating overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header sidebar-header-stacked">
@@ -184,19 +162,21 @@ background: #34a832;
<img src="./logo_white.png" alt="" class="sidebar-logo py-0 d-lg-inline d-none">
</a>
<div class="sidebar-title mb-0 py-0">
<a href="./">Google Earth Engine for OSINT</a>
<a href="./">Remote Sensing for OSINT</a>
<div class="sidebar-tools-main tools-wide">
<a href="https://github.com/oballinger/GEE_OSINT/" title="Source Code" class="sidebar-tool px-1"><i class="bi bi-github"></i></a>
<a href="" title="Download" id="sidebar-tool-dropdown-0" class="sidebar-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-download"></i></a>
<ul class="dropdown-menu" aria-labelledby="sidebar-tool-dropdown-0">
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.pdf">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.pdf">
<i class="bi bi-bi-file-pdf pe-1"></i>
Download PDF
</a>
</li>
<li>
<a class="dropdown-item sidebar-tools-main-item" href="./Google-Earth-Engine-for-OSINT.epub">
<a class="dropdown-item sidebar-tools-main-item" href="./Remote-Sensing-
-for-OSINT.epub">
<i class="bi bi-bi-journal pe-1"></i>
Download ePub
</a>
@@ -228,64 +208,69 @@ background: #34a832;
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./index.html" class="sidebar-item-text sidebar-link">Introduction</a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">Learning</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">A. Introduction</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Remote Sensing</span></a>
<a href="./index.html" class="sidebar-item-text sidebar-link">Overview</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./ch2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Data Acquisition</span></a>
<a href="./ch1.html" class="sidebar-item-text sidebar-link">Remote Sensing</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Interpreting Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F6.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Advanced Topics</span></a>
<a href="./ch2.html" class="sidebar-item-text sidebar-link">Data Acquisition</a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">B. Google Earth Engine</a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F1.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span>&nbsp; <span class="chapter-title">Getting Started</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F2.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Interpreting Images</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F4.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Image Series</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./F5.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Vectors and Tables</span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">C. Case Studies</a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./lights.html" class="sidebar-item-text sidebar-link">War at Night</a>
@@ -305,6 +290,11 @@ background: #34a832;
<div class="sidebar-item-container">
<a href="./blast.html" class="sidebar-item-text sidebar-link">Blast Damage Assessment</a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./object_detection.html" class="sidebar-item-text sidebar-link">Object Detection</a>
</div>
</li>
</ul>
</li>
@@ -317,10 +307,7 @@ background: #34a832;
<h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#introduction" id="toc-introduction" class="nav-link active" data-scroll-target="#introduction">Introduction</a>
<ul class="collapse">
<li><a href="#how-it-works" id="toc-how-it-works" class="nav-link" data-scroll-target="#how-it-works">How it Works</a></li>
</ul></li>
<li><a href="#how-it-works" id="toc-how-it-works" class="nav-link active" data-scroll-target="#how-it-works">How it Works</a></li>
<li><a href="#building-the-application" id="toc-building-the-application" class="nav-link" data-scroll-target="#building-the-application">Building the Application</a>
<ul class="collapse">
<li><a href="#setup" id="toc-setup" class="nav-link" data-scroll-target="#setup">Setup</a></li>
@@ -336,20 +323,32 @@ background: #34a832;
<li><a href="#taking-it-for-a-spin" id="toc-taking-it-for-a-spin" class="nav-link" data-scroll-target="#taking-it-for-a-spin">Taking it for a spin</a>
<ul class="collapse">
<li><a href="#north-korea" id="toc-north-korea" class="nav-link" data-scroll-target="#north-korea">North Korea</a></li>
</ul></li>
<li><a href="#ukraine" id="toc-ukraine" class="nav-link" data-scroll-target="#ukraine">Ukraine</a></li>
</ul></li>
</ul></li>
</ul>
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/oballinger/GEE_OSINT/edit/main/ships.qmd" class="toc-action">Edit this page</a></p></div></div></nav>
</div>
<!-- main -->
<main class="content quarto-banner-title-block page-columns page-full" id="quarto-document-content">
<main class="content page-columns page-full" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title d-none d-lg-block">Ship Detection</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<section id="introduction" class="level1 page-columns page-full">
<h1>Introduction</h1>
<p>Theres a huge amount of data available on the internet about ship movements, most of which draw on the Automatic Identification System (AIS) which is a system that uses radio to broadcast the identity, position, course, speed, and other data about ships. <a href="https://www.marinetraffic.com/en/ais-api-services">MarineTraffic</a>, for example, provides an API that allows you to query the location of ships in real time as well as historical vessel tracks and lots of other useful data. Unfortunately most sources of AIS data are paywalled, and AIS can be turned off or manipulated to hide the identity or position of the ship. In fact, most of the stuff were interested in investigating probably happens when AIS is turned off.</p>
<p>Though ships can hide by turning off their AIS transponders, they cant hide from satellites. In this tutorial, were going to build an application that uses Synthetic Aperture Radar (SAR) from the European Space Agencys Sentinel-1 satellite to automatically identify ships, regardless of whether theyve got their transponders turned on or off. Heres the finished application:</p>
<div class="column-page">
@@ -370,7 +369,6 @@ background: #34a832;
<p>If youre closely zoomed in to the map and load imagery from different days by clicking on the graph, you can compare the bright spots on the Sentinel image and the green dots. The ship detection process is pretty accurate, and we typically see one green dot per ship. However, you may notice that we occasionally miss a ship. This is because the ship detection process is based on a threshold, and if the ship is too small it may not generate a high enough return signal to be detected. You can increase the sensitivity of the ship detection process by moving the slider below the graph. This will increase the number of ships detected, but it may also increase the number of false positives.</p>
<p>The next section focuses on building this application. After that, well have a look at a few different use cases for this sort of maritime surveillance.</p>
</section>
</section>
<section id="building-the-application" class="level1">
<h1>Building the Application</h1>
<section id="setup" class="level2">
@@ -655,18 +653,21 @@ background: #34a832;
<h2 class="anchored" data-anchor-id="taking-it-for-a-spin">Taking it for a spin</h2>
<section id="north-korea" class="level3">
<h3 class="anchored" data-anchor-id="north-korea">North Korea</h3>
<p>Information on North Koreas economy is pretty hard to come by. Ship traffic in and out of the countrys largest port, Nampo, is probably a pretty good indicator of the countrys economic activity. But we cant just head on down to Marine Tracker or other services that use AIS data to track ship movements. According to the <a href="https://home.treasury.gov/system/files/126/dprk_vessel_advisory_02232018.pdf">U.S. Treasury</a>, “North Korean-flagged merchant vessels have been known to intentionally disable their AIS transponders to mask their movements. This tactic, whether employed by North Korean-flagged vessels or other vessels involved in trade with North Korea, could conceal the origin or destination of cargo destined for, or originating in, North Korea.” They should know theyre the ones imposing the sanctions that make it illegal to trade with North Korea.</p>
<p>A New York Times <a href="https://www.nytimes.com/2019/07/16/world/asia/north-korea-luxury-goods-sanctions.html">investigation</a> tracked the maritime voyage of luxury Mercedes cars from Germany to North Korea via the Netherlands, China, Japan, South Korea, and Russia. AIS transponders were turned off at several points throughout this journey, and the investigation had to rely on satellite imagery to fill in the gaps. Though they used high resolution optical imagery to follow individual ships,</p>
<p>In 2020, North Korea implemented one of the most severe COVID-19 lockdowns in the world including a near-total ban on <a href="https://thediplomat.com/2023/01/north-korea-likely-to-lift-pandemic-border-restrictions-in-2023/">“all cross-border exchanges, including trade, traffic, and tourism”.</a>. Measures have been so severe that country appears to have experienced a significant <a href="https://foreignpolicy.com/2022/05/16/kim-north-korea-covid-outbreak-pandemic/">famine</a>. Though there were signs that things have gradually returned to normal, information on North Koreas economy is pretty hard to come by. Ship traffic in and out of the countrys largest port, Nampo, is probably a pretty good indicator of the countrys economic activity.</p>
<p>But we cant just head on down to Marine Tracker or other services that use AIS data to track ship movements. According to the <a href="https://home.treasury.gov/system/files/126/dprk_vessel_advisory_02232018.pdf">U.S. Treasury</a>, “North Korean-flagged merchant vessels have been known to intentionally disable their AIS transponders to mask their movements. This tactic, whether employed by North Korean-flagged vessels or other vessels involved in trade with North Korea, could conceal the origin or destination of cargo destined for, or originating in, North Korea.” They should know theyre the ones imposing the sanctions that make it illegal to trade with North Korea.</p>
<p>A New York Times <a href="https://www.nytimes.com/2019/07/16/world/asia/north-korea-luxury-goods-sanctions.html">investigation</a> tracked the maritime voyage of luxury Mercedes cars from Germany to North Korea via the Netherlands, China, Japan, South Korea, and Russia. AIS transponders were turned off at several points throughout this journey, and the investigation had to rely on satellite imagery to fill in the gaps.</p>
<p>Though they used high resolution optical imagery to follow individual ships, we want to identify lots of ships in a large area over a long period. That would get very expensive, and automatic ship detection in optical imagery is relatively difficult. Heres how our SAR tool fares when we draw a box in the bay of Nampo:</p>
<p><img src="./images/ships_north_korea.jpg" class="img-fluid"></p>
<p>Looking at imagery from 2021, we can see ship traffic increasing from nearly zero to around 40 ships per day.</p>
</section>
</section>
<section id="ukraine" class="level2">
<h2 class="anchored" data-anchor-id="ukraine">Ukraine</h2>
<p>The port of Odessa is Ukraines largest port, and Following its invasion of Ukraine in February 2022, Russia instituted a naval blockade against Ukrainian ports. The impact of this blockade is clearly visible using the tool weve just built:</p>
<section id="ukraine" class="level3">
<h3 class="anchored" data-anchor-id="ukraine">Ukraine</h3>
<p>Odessa is Ukraines largest port. Following its invasion of Ukraine in February 2022, Russia instituted a naval blockade against Ukrainian ports. The impact of this blockade is clearly visible using the tool weve just built:</p>
<p><img src="./images/ships_ukraine.jpg" class="img-fluid"></p>
<p>The daily number of ships detected in the port of Odessa dropped from 40-50 to 0-5 following the invasion, and remained near zero until the blockade was lifted in September 2022.</p>
</section>
</section>
</section>