-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLandslide.html
239 lines (193 loc) · 11 KB
/
Landslide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>Lavanya- Landslide</title>
<link rel="stylesheet" href="slick.css"/>
<link rel="stylesheet" href="slick-theme.css"/>
<link rel="shortcut icon" href="Images/favicon-32x32.png">
<!-- Bootstrap -->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.no-icons.min.css" rel="stylesheet">
<!-- Icon font -->
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alice|Open+Sans:400,300,700">
<!-- Custom styles -->
<link rel="stylesheet" href="Home.css">
<style>
.slider-before, .slider-after {
user-select: none;
}
</style>
</head>
<body>
<link href="https://fonts.googleapis.com/css?family=DM+Serif+Text&display=swap" rel="stylesheet">
<header id="header">
<div id="head" class="parallax" parallax-speed="2">
<h1 id="logo" class="text-center">
<a href="https://lavs5.github.io/" target="_self"><img class="img-circle" src="Images/Photo_lavs.jpg"></a>
<span class="title"><strong>Lavanya Gopal</strong></span>
<span class="tagline">
<strong>GIS | Data Science | Remote Sensing | Engineering</strong>
<span class="widget-body">
<a href="mailto:[email protected]" style="color: #a7fdc8">
<i class="fa fa-envelope-o fa-fw"></i></a>
<a href="https://www.linkedin.com/in/lavanyagopal/" target="_blank" style="color: #a7fdc8">
<i class="fa fa-linkedin fa-2"></i></a>
</span>
</span>
</h1>
</div>
<nav class="navbar navbar-default navbar-sticky">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" aria-expanded="true" >
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="https://lavs5.github.io/" class="highlight">
<strong>Home</strong></a></li>
<li><a href="Resume.html" class="highlight">Resume</a></li>
<li><a href="Blog.html" class="highlight">Blog</a></li>
</ul>
</div>
</div>
</nav>
</header>
<main id="main">
<div class="container">
<div class="row topspace">
<header class="page-header">
<h2 class="custom-header">Chilcotin River Landslide Using Google Earth Engine</h2><br>
</header>
<!-- Article main content -->
<article class="col-sm-6">
<ul class="list-group">
<li> The Chilcotin River located in Southern British Columbia is a 241km long tributary of the Fraser River. A <a href="https://news.gov.bc.ca/releases/2024EMCR0035-001244" target="_blank">landslide</a> occured in the last week of July 2024 at Farwell Canyon located about 22km south of Williams Lake. This landslide dammed the Chilcotin river and created a lake about 11km behind the slide.
</li>
<li>The images below show a comparison of <b>pre vs. post</b> terrain conditions. These images were prepared using Sentinel imagery available from Google Earth Engine collections. The Near Infrared and the Green band were used to calculate a Normalized Difference Water Index (NDWI).</li>
<li><b>NDWI</b> is helpful in visualizing and identifying water pixels as well as soil (landslide) pixels. This is because water has the least reflectance and soil has higher redlectance in the near infrared band. The satellite imagery used for this comparison includes available imagery from the following time periods: <i>Pre- July 1st to 25th, 2024; Post- August 1st to August 4th, 2024</i></li>
<li>Note, the pixels in bright yellow to the north of the dammed river in the post image are crop circles, these are unrelated to the landslide.</li>
</ul>
</article>
<div class="col-sm-6">
<!-- Images to compare -->
<div class="custom-image-slider" id="customImageSlider">
<img class="slider-before" src="Images/PreNDWI.png" alt="Before Image">
<img class="slider-after" src="Images/PostNDWI.png" alt="After Image">
<div class="slider-handle"></div>
</div>
<br>
</div>
</div><br>
<div class="row">
<div class="col-sm-6">
<ul class="list-group">
<li>Normalized Difference Vegetation Index (NDVI) uses near infrared and the red band to identify areas of increased water flow along the river. The <b>spectral reflectance</b> curve shows how soil and vegetation have a higher reflectance than water in the near infrared band. We use this concept to identify change and calculate Normalized Difference Vegetation Index for the pre and post periods of time. <b>NDVI= NIR-R/NIR+R.</b> </li>
<li>The values range from -1 to 1 where the pixels closer to -1 (white) represent low reflectance such as water and pixels closer to +1 represent higher reflectance such as soil/vegetation. The circled area shows displacement in soil and in the area to the left of this displacement, we see the river water being blocked. </li>
<li>Check out the GEE source code used to create these maps.</li>
</ul>
</div>
<div class="your-class col-sm-6">
<div><a href="Images/SpectralReflectanceCurves.png" target="_blank"><img src="Images/SpectralReflectanceCurves.png"></a></div>
<div><a href="Images/PreNDVI.png" target="_blank"><img src="Images/PreNDVI.png"></a></div>
<div><a href="Images/PostNDVI.png" target="_blank"><img src="Images/PostNDVI.png"></a></div>
<div><a href="Images/ChilcotinCode.png" target="_blank"><img src="Images/ChilcotinCode.png"></a></div>
</div>
</div>
</div>
<!-- Script for image slider -->
<script>
document.addEventListener("DOMContentLoaded", function () {
const container = document.querySelector(".custom-image-slider");
const afterImage = document.querySelector(".slider-after");
const handle = document.querySelector(".slider-handle");
// Set initial handle position and clipPath
const initialPercentage = 50;
handle.style.left = `${initialPercentage}%`;
afterImage.style.clipPath = `inset(0 ${100 - initialPercentage}% 0 0)`;
let dragging = false;
let lastX = 0;
// Add mouse event listeners
handle.addEventListener("mousedown", (e) => {
dragging = true;
lastX = e.clientX;
e.preventDefault();
});
document.addEventListener("mouseup", () => {
dragging = false;
});
document.addEventListener("mouseleave", () => {
dragging = false;
});
document.addEventListener("mousemove", (e) => {
if (!dragging) return;
const rect = container.getBoundingClientRect();
const x = e.clientX - rect.left;
let widthPercentage = (x / rect.width) * 100;
// Add constraint to keep the handle within 1% of either edge
widthPercentage = Math.max(0, Math.min(widthPercentage, 100));
// Update handle position using requestAnimationFrame
window.requestAnimationFrame(() => {
handle.style.left = `${widthPercentage}%`;
afterImage.style.clipPath = `inset(0 ${100 - widthPercentage}% 0 0)`;
});
lastX = x;
});
// Add touch event listeners
handle.addEventListener("touchstart", (e) => {
dragging = true;
lastX = e.touches[0].clientX;
e.preventDefault();
});
document.addEventListener("touchend", () => {
dragging = false;
});
container.addEventListener("touchcancel", () => {
dragging = false;
});
container.addEventListener("touchmove", (e) => {
if (!dragging) return;
const rect = container.getBoundingClientRect();
const x = e.touches[0].clientX - rect.left;
let widthPercentage = (x / rect.width) * 100;
// Add constraint to keep the handle within 1% of either edge
widthPercentage = Math.max(0, Math.min(widthPercentage, 100));
// Update handle position using requestAnimationFrame
window.requestAnimationFrame(() => {
handle.style.left = `${widthPercentage}%`;
afterImage.style.clipPath = `inset(0 ${100 - widthPercentage}% 0 0)`;
});
lastX = x;
});
});
</script>
<!-- /container -->
</main>
<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="template.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="slick.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.your-class').slick({
arrows: true,
dots: true,
adaptiveHeight: true,
fade: true,
autoplay: true
});
});
</script>
</body>
</html>