-
Notifications
You must be signed in to change notification settings - Fork 8
/
RS_LandcvoerMapping_Variables.js
677 lines (526 loc) · 20.7 KB
/
RS_LandcvoerMapping_Variables.js
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
/////////////////////////////////////////////////////////////////////
//Boreal Probability of Wet Area Get Variables /
//Written by: /
////Evan R. DeLancey /
////GIS Land-use analyst Alberta Biodiversity Monitoring Institute /
////2017-08-24 /
////edelance@ualberta.ca /
/////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// START Get Sentinel-1 VH and NPOL
///////////////////////////////////////////////////////////////////
//get sentinel-1 images filtered by date, polarization, resolution, and orbit
var s1_1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2016-07-01', '2016-07-31')
.filterMetadata('transmitterReceiverPolarisation', 'equals', ['VV', 'VH'])
.filterMetadata('resolution_meters', 'equals' , 10);
//mask out edges of images by using angle
var maskAng1 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.gt(30.53993));
};
var s1_1 = s1_1.map(maskAng1);
//mask out edges of images by using angle
var maskAng2 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.lt(45.53993));
};
var s1_1 = s1_1.map(maskAng2);
var ClipImgColl = function(image){
return image.clip(July_Clip1);
};
var s1_1 = s1_1.map(ClipImgColl);
var s1_2 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2016-08-01', '2016-08-10')
.filterMetadata('transmitterReceiverPolarisation', 'equals', ['VV', 'VH'])
.filterMetadata('resolution_meters', 'equals' , 10);
//mask out edges of images by using angle
var maskAng1 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.gt(30.53993));
};
var s1_2 = s1_2.map(maskAng1);
//mask out edges of images by using angle
var maskAng2 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.lt(45.53993));
};
var s1_2 = s1_2.map(maskAng2);
var ClipImgColl = function(image){
return image.clip(August_Clip1);
};
var s1_2 = s1_2.map(ClipImgColl);
var s1_2b = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2016-08-11', '2016-08-31')
.filterMetadata('transmitterReceiverPolarisation', 'equals', ['VV', 'VH'])
.filterMetadata('resolution_meters', 'equals' , 10);
//mask out edges of images by using angle
var maskAng1 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.gt(30.53993));
};
var s1_2b = s1_2b.map(maskAng1);
//mask out edges of images by using angle
var maskAng2 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.lt(45.33993));
};
var s1_2b = s1_2b.map(maskAng2);
var ClipImgColl = function(image){
return image.clip(August_Clip2);
};
var s1_2b = s1_2b.map(ClipImgColl);
var s1_3 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2017-05-15', '2017-08-31')
.filterMetadata('transmitterReceiverPolarisation', 'equals', ['VV', 'VH'])
.filterMetadata('resolution_meters', 'equals' , 10);
//mask out edges of images by using angle
var maskAng1 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.gt(30.63993));
};
var s1_3 = s1_3.map(maskAng1);
//mask out edges of images by using angle
var maskAng2 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.lt(44.73993));
};
var s1_3 = s1_3.map(maskAng2);
var s1 = ee.ImageCollection(s1_1.merge(s1_2));
var s1 = ee.ImageCollection(s1.merge(s1_3));
var s1 = ee.ImageCollection(s1.merge(s1_2b));
print(s1);
//angle correction
function toGamma0(image) {
var vh = image.select('VH').subtract(image.select('angle').multiply(Math.PI/180.0).cos().log10().multiply(10.0));
return vh.addBands(image.select('VV').subtract(image.select('angle').multiply(Math.PI/180.0).cos().log10().multiply(10.0)));
}
//filter out windy days
var pctWat = function(image){
var d = image.date().format('Y-M-d');
var wx = ee.ImageCollection('NOAA/CFSV2/FOR6H')
.filterDate(d);
var vWind = wx.select(['v-component_of_wind_height_above_ground']);
var a = vWind.max();
var uWind = wx.select(['u-component_of_wind_height_above_ground']);
var b = uWind.max();
var a = a.pow(2);
var b = b.pow(2);
var ab = a.add(b);
var ws = ab.sqrt();
var ws = ws.multiply(3.6);
return image.updateMask(ws.lt(12));
};
var s1 = s1.map(pctWat);
//add in difference between vv and vh
var adddiff = function(image) {
return image.addBands(image.expression(
'(VH - VV) / (VH + VV)', {
'VH': image.select(['VH']),
'VV': image.select(['VV'])
}
));
};
var s1 = s1.map(toGamma0);
var s1 = s1.map(adddiff);
var VH = s1.select(['VH']);
var NPOL = s1.select(['VH_1']);
////////////////////////////////////////////////////
//Sigma Lee filter
////////////////////////////////////////////////////
function toNatural(img) {
return ee.Image(10.0).pow(img.select(0).divide(10.0));
}
function toDB(img) {
return ee.Image(img).log10().multiply(10.0);
}
// The RL speckle filter from https://code.earthengine.google.com/2ef38463ebaf5ae133a478f173fd0ab5
// by Guido Lemoine
function RefinedLee(img) {
// img must be in natural units, i.e. not in dB!
// Set up 3x3 kernels
var weights3 = ee.List.repeat(ee.List.repeat(1,3),3);
var kernel3 = ee.Kernel.fixed(3,3, weights3, 1, 1, false);
var mean3 = img.reduceNeighborhood(ee.Reducer.mean(), kernel3);
var variance3 = img.reduceNeighborhood(ee.Reducer.variance(), kernel3);
// Use a sample of the 3x3 windows inside a 7x7 windows to determine gradients and directions
var sample_weights = ee.List([[0,0,0,0,0,0,0], [0,1,0,1,0,1,0],[0,0,0,0,0,0,0], [0,1,0,1,0,1,0], [0,0,0,0,0,0,0], [0,1,0,1,0,1,0],[0,0,0,0,0,0,0]]);
var sample_kernel = ee.Kernel.fixed(7,7, sample_weights, 3,3, false);
// Calculate mean and variance for the sampled windows and store as 9 bands
var sample_mean = mean3.neighborhoodToBands(sample_kernel);
var sample_var = variance3.neighborhoodToBands(sample_kernel);
// Determine the 4 gradients for the sampled windows
var gradients = sample_mean.select(1).subtract(sample_mean.select(7)).abs();
gradients = gradients.addBands(sample_mean.select(6).subtract(sample_mean.select(2)).abs());
gradients = gradients.addBands(sample_mean.select(3).subtract(sample_mean.select(5)).abs());
gradients = gradients.addBands(sample_mean.select(0).subtract(sample_mean.select(8)).abs());
// And find the maximum gradient amongst gradient bands
var max_gradient = gradients.reduce(ee.Reducer.max());
// Create a mask for band pixels that are the maximum gradient
var gradmask = gradients.eq(max_gradient);
// duplicate gradmask bands: each gradient represents 2 directions
gradmask = gradmask.addBands(gradmask);
// Determine the 8 directions
var directions = sample_mean.select(1).subtract(sample_mean.select(4)).gt(sample_mean.select(4).subtract(sample_mean.select(7))).multiply(1);
directions = directions.addBands(sample_mean.select(6).subtract(sample_mean.select(4)).gt(sample_mean.select(4).subtract(sample_mean.select(2))).multiply(2));
directions = directions.addBands(sample_mean.select(3).subtract(sample_mean.select(4)).gt(sample_mean.select(4).subtract(sample_mean.select(5))).multiply(3));
directions = directions.addBands(sample_mean.select(0).subtract(sample_mean.select(4)).gt(sample_mean.select(4).subtract(sample_mean.select(8))).multiply(4));
// The next 4 are the not() of the previous 4
directions = directions.addBands(directions.select(0).not().multiply(5));
directions = directions.addBands(directions.select(1).not().multiply(6));
directions = directions.addBands(directions.select(2).not().multiply(7));
directions = directions.addBands(directions.select(3).not().multiply(8));
// Mask all values that are not 1-8
directions = directions.updateMask(gradmask);
// "collapse" the stack into a singe band image (due to masking, each pixel has just one value (1-8) in it's directional band, and is otherwise masked)
directions = directions.reduce(ee.Reducer.sum());
//var pal = ['ffffff','ff0000','ffff00', '00ff00', '00ffff', '0000ff', 'ff00ff', '000000'];
//Map.addLayer(directions.reduce(ee.Reducer.sum()), {min:1, max:8, palette: pal}, 'Directions', false);
var sample_stats = sample_var.divide(sample_mean.multiply(sample_mean));
// Calculate localNoiseVariance
var sigmaV = sample_stats.toArray().arraySort().arraySlice(0,0,5).arrayReduce(ee.Reducer.mean(), [0]);
// Set up the 7*7 kernels for directional statistics
var rect_weights = ee.List.repeat(ee.List.repeat(0,7),3).cat(ee.List.repeat(ee.List.repeat(1,7),4));
var diag_weights = ee.List([[1,0,0,0,0,0,0], [1,1,0,0,0,0,0], [1,1,1,0,0,0,0],
[1,1,1,1,0,0,0], [1,1,1,1,1,0,0], [1,1,1,1,1,1,0], [1,1,1,1,1,1,1]]);
var rect_kernel = ee.Kernel.fixed(7,7, rect_weights, 3, 3, false);
var diag_kernel = ee.Kernel.fixed(7,7, diag_weights, 3, 3, false);
// Create stacks for mean and variance using the original kernels. Mask with relevant direction.
var dir_mean = img.reduceNeighborhood(ee.Reducer.mean(), rect_kernel).updateMask(directions.eq(1));
var dir_var = img.reduceNeighborhood(ee.Reducer.variance(), rect_kernel).updateMask(directions.eq(1));
dir_mean = dir_mean.addBands(img.reduceNeighborhood(ee.Reducer.mean(), diag_kernel).updateMask(directions.eq(2)));
dir_var = dir_var.addBands(img.reduceNeighborhood(ee.Reducer.variance(), diag_kernel).updateMask(directions.eq(2)));
// and add the bands for rotated kernels
for (var i=1; i<4; i++) {
dir_mean = dir_mean.addBands(img.reduceNeighborhood(ee.Reducer.mean(), rect_kernel.rotate(i)).updateMask(directions.eq(2*i+1)));
dir_var = dir_var.addBands(img.reduceNeighborhood(ee.Reducer.variance(), rect_kernel.rotate(i)).updateMask(directions.eq(2*i+1)));
dir_mean = dir_mean.addBands(img.reduceNeighborhood(ee.Reducer.mean(), diag_kernel.rotate(i)).updateMask(directions.eq(2*i+2)));
dir_var = dir_var.addBands(img.reduceNeighborhood(ee.Reducer.variance(), diag_kernel.rotate(i)).updateMask(directions.eq(2*i+2)));
}
// "collapse" the stack into a single band image (due to masking, each pixel has just one value in it's directional band, and is otherwise masked)
dir_mean = dir_mean.reduce(ee.Reducer.sum());
dir_var = dir_var.reduce(ee.Reducer.sum());
// A finally generate the filtered value
var varX = dir_var.subtract(dir_mean.multiply(dir_mean).multiply(sigmaV)).divide(sigmaV.add(1.0));
var b = varX.divide(dir_var);
var result = dir_mean.add(b.multiply(img.subtract(dir_mean)));
return(result.arrayFlatten([['sum']]));
}
var VH = VH.map(toNatural);
var VH = VH.map(RefinedLee);
var VH = VH.map(toDB);
/////////////////////////////////////////////////
var VH = VH.mean();
var boxcar = ee.Kernel.circle({
radius: 3, units: 'pixels', normalize: true
});
var fltr = function(image) {
return image.convolve(boxcar);
};
var NPOL = NPOL.map(fltr);
var NPOL = NPOL.mean();
//Map.addLayer(VH, {min:-28, max:-8}, 'VH');
//Map.addLayer(NPOL, {min:0, max:0.5}, 'NPOL');
///////////////////////////////////////////////////////////////////
// END Get Sentinel-1 VH and NPOL
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
// START Get Sentinel-1 VVSD
///////////////////////////////////////////////////////////////////
var s1_1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2016-05-15', '2016-07-31')
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filterMetadata('resolution_meters', 'equals' , 10)
.map(function (img) {
return img.clip(img.geometry().buffer(-12000));
});
var s1_2 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2016-08-01', '2016-08-31')
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filterMetadata('resolution_meters', 'equals' , 10)
.map(function (img) {
return img.clip(img.geometry().buffer(-14000));
});
var s1_3 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2017-05-15', '2017-08-31')
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filterMetadata('resolution_meters', 'equals' , 10)
.map(function (img) {
return img.clip(img.geometry().buffer(-1000));
});
//mask out edges of images by using angle
var maskAng1 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.gt(30.63993));
};
var s1_3 = s1_3.map(maskAng1);
//mask out edges of images by using angle
var maskAng2 = function(image) {
var ang = image.select(['angle']);
return image.updateMask(ang.lt(45.23993));
};
var s1_3 = s1_3.map(maskAng2);
var s1_4 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filterBounds(geometry)
.filterDate('2015-05-15', '2015-08-31')
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filterMetadata('resolution_meters', 'equals' , 10)
.map(function (img) {
return img.clip(img.geometry().buffer(-10000));
});
var S1 = ee.ImageCollection(s1_1.merge(s1_2));
var S1 = ee.ImageCollection(S1.merge(s1_3));
var S1 = ee.ImageCollection(S1.merge(s1_4));
function toGamma01(image) {
return image.select('VV').subtract(image.select('angle').multiply(Math.PI/180.0).cos().log10().multiply(10.0));
}
var S1 = S1.map(toGamma01);
var S1 = S1.map(toNatural);
var S1 = S1.map(RefinedLee);
var S1 = S1.map(toDB);
print(S1);
var VV = S1.select(['sum']);
var VVSD = VV.reduce(ee.Reducer.stdDev());
Map.addLayer(VVSD, {min:1, max:5}, 'VVSD');
///////////////////////////////////////////////////////////////////
// END Get Sentinel-1 VVSDL
///////////////////////////////////////////////////////////////////
var prj = image.projection();
var VH = VH.resample('bicubic').reproject(prj, null, 10);
var VH = VH.clip(geometry);
var NPOL = NPOL.resample('bicubic').reproject(prj, null, 10);
var NPOL = NPOL.clip(geometry);
var VVSD = VVSD.resample('bicubic').reproject(prj, null, 10);
var VVSD1 = VVSD.clip(G1);
var VVSD2 = VVSD.clip(G2);
var VVSD3 = VVSD.clip(G3);
//////////////////////////////////////////////////////////////////
// START export Sentinel-1 variables
/////////////////////////////////////////////////////////////////
Export.image.toDrive({
image: VH,
description: 'VH',
scale: 10,
region: geometry,
maxPixels: 3E10
});
Export.image.toDrive({
image: NPOL,
description: 'NPOL',
scale: 10,
region: geometry,
maxPixels: 3E10
});
Export.image.toDrive({
image: VVSD1,
description: 'VVSD_1',
scale: 10,
region: Ge1,
maxPixels: 3E10
});
Export.image.toDrive({
image: VVSD2,
description: 'VVSD_2',
scale: 10,
region: Ge2,
maxPixels: 3E10
});
Export.image.toDrive({
image: VVSD3,
description: 'VVSD_3',
scale: 10,
region: Ge3,
maxPixels: 3E10
});
Map.addLayer(G3, {}, 'G1');
///////////////////////////////////////////////////////////////
// END export Sentinel-1 varibles
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
// START Get Sentinel-2 and cloud removal
///////////////////////////////////////////////////////////////
var S2 = ee.ImageCollection('COPERNICUS/S2')
//filter start and end date
.filterDate('2016-05-15', '2016-08-31')
//filter according to drawn boundary
.filterBounds(geometry);
//Get Sentinel-2 data
var S2_1 = ee.ImageCollection('COPERNICUS/S2')
//filter start and end date
.filterDate('2017-05-15', '2017-08-31')
//filter according to drawn boundary
.filterBounds(geometry);
var S2 = ee.ImageCollection(S2.merge(S2_1));
print(S2);
//mask cloud from built of cloud mask
var maskcloud1 = function(image) {
var QA60 = image.select(['QA60']);
return image.updateMask(QA60.lt(1));
};
var S2 = S2.map(maskcloud1);
//mask further cloud with B1 threshold
var maskcloud2 = function(image) {
var B1 = image.select(['B1']);
var B11 = image.select(['B11']);
var B12 = image.select(['B12']);
var bin = B1.gt(1500);
return image.updateMask(bin.lt(1));
};
var S2 = S2.map(maskcloud2);
// add NDVI to bands
var addNDVI = function(image) {
return image.addBands(image.normalizedDifference(['B8', 'B4']));
};
var S2 = S2.map(addNDVI);
var NDVI = S2.select(['nd']);
var NDVI = NDVI.median();
// add NDWI to bands
var addNDWI = function(image) {
return image.addBands(image.normalizedDifference(['B3', 'B8']));
};
var S2 = S2.map(addNDWI);
var NDWI = S2.select(['nd_1']);
var NDWI = NDWI.median();
// add ARI to bands
var addARI = function(image) {
return image.addBands(image.expression(
'(B8 / B2) - (B8 / B3)', {
'B8': image.select(['B8']),
'B2': image.select(['B2']),
'B3': image.select(['B3'])
}
));
};
var S2 = S2.map(addARI);
var ARI = S2.select(['B8_1']);
var ARI = ARI.median();
var addPSRI = function(image) {
return image.addBands(image.expression(
'(B4 - B2) / B5', {
'B4': image.select(['B4']),
'B2': image.select(['B2']),
'B5': image.select(['B5'])
}
));
};
var S2 = S2.map(addPSRI);
var PSRI = S2.select(['B4_1']);
var PSRI = PSRI.median();
var addREIP = function(image) {
return image.addBands(image.expression(
'705 + 35*((((RED + RE3)/2) - RE1) / (RE2 - RE1))', {
'RE1': image.select(['B5']),
'RE2': image.select(['B6']),
'RE3': image.select(['B7']),
'RED' : image.select(['B4'])
}
));
};
var S2 = S2.map(addREIP);
print(S2);
var REIP = S2.select(['constant']);
var REIP = REIP.median();
var ndvi_pal = ['#d73027', '#f46d43', '#fdae61', '#fee08b', '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850'];
Map.addLayer(NDVI, {min:-0.5, max:0.9, palette: ndvi_pal}, 'NDVI');
var ndwi_pal = ['#ece7f2', '#d0d1e6', '#a6bddb', '#74a9cf', '#3690c0', '#0570b0', '#045a8d', '#023858'];
Map.addLayer(NDWI, {min:-1, max:1, palette: ndwi_pal}, 'NDWI');
var ari_pal = ['#1b7837', '#5aae61', '#a6dba0', '#d9f0d3', '#e7d4e8', '#c2a5cf', '#9970ab', '#762a83'];
Map.addLayer(ARI, {min:-1, max:0.3, palette: ari_pal}, 'ARI');
Map.addLayer(PSRI, {min:-1, max:1, palette:ari_pal}, 'PSRI');
Map.addLayer(REIP, {min:715, max:730, palette:ari_pal}, 'REIP');
var B2 = S2.select(['B2']);
var B2 = B2.median();
var B3 = S2.select(['B3']);
var B3 = B3.median();
var B4 = S2.select(['B4']);
var B4 = B4.median();
var B8 = S2.select(['B8']);
var B8 = B8.median();
var NDVI = NDVI.reproject(prj, null, 10);
var NDVI = NDVI.clip(geometry);
var NDWI = NDWI.reproject(prj, null, 10);
var NDWI = NDWI.clip(geometry);
var ARI = ARI.reproject(prj, null, 10);
var ARI = ARI.clip(geometry);
var PSRI = PSRI.reproject(prj, null, 10);
var PSRI = PSRI.clip(geometry);
var REIP = REIP.reproject(prj, null, 10);
var REIP = REIP.clip(geometry);
var B2 = B2.reproject(prj, null, 10);
var B2 = B2.clip(geometry);
var B3 = B3.reproject(prj, null, 10);
var B3 = B3.clip(geometry);
var B4 = B4.reproject(prj, null, 10);
var B4 = B4.clip(geometry);
var B8 = B8.reproject(prj, null, 10);
var B8 = B8.clip(geometry);
Export.image.toDrive({
image: REIP,
description: 'REIP',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: PSRI,
description: 'PSRI',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: ARI,
description: 'ARI',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: NDWI,
description: 'NDWI',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: NDVI,
description: 'NDVI',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: B2,
description: 'B2',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: B3,
description: 'B3',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: B4,
description: 'B4',
scale: 10,
region: geometry,
maxPixels: 10E10
});
Export.image.toDrive({
image: B8,
description: 'B8',
scale: 10,
region: geometry,
maxPixels: 10E10
});