-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvideo_test
69 lines (62 loc) · 1.71 KB
/
video_test
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
/**** Start of imports. If edited, may not auto-convert in the playground. ****/
var africa = /* color: #00d6cc */ee.Geometry.Polygon(
[[[-19.69, 37.72],
[-19.69, -35.46],
[53.44, -35.46],
[53.44, 37.72]]]);
/***** End of imports. If edited, may not auto-convert in the playground. *****/
var us = ee.Geometry.Rectangle(64.34, 36.88, 128.32, -5.97)
var imgArr = [];
var year = 2001;
while (year < 2017) {
var month = 1;
while (month < 13) {
var start = ee.Date(year + '-' + month + '-01');
month++;
var end;
if(month == 13) {
var y = year + 1;
month--;
end = ee.Date(y + '-' + month + '-01');
break;
} else {
end = ee.Date(year + '-' + month + '-01');
}
var FIRMS = ee.ImageCollection('FIRMS')
.filterDate(start, end)
var sum = FIRMS.reduce(ee.Reducer.sum())
var binary = sum.divide(sum).select('T21_sum')
.rename('binary')
.visualize({palette: ['FF0000']})
imgArr.push(binary)
}
month = 1
year++
}
var images = ee.ImageCollection(imgArr)
print(images)
Map.addLayer(images)
Export.video.toDrive({
collection: images,
description: 'videoTest',
dimensions: 720,
framesPerSecond: 5,
region: us
});
Map.addLayer(us)
Map.centerObject(us)
//var geom = ee.Geometry.Rectangle(-121.8645, 36.4069, -121.6035, 36.5262)
//var start = ee.Date('2016-01-01')
//var finish = ee.Date('2016-10-01')
//
//var images = ee.ImageCollection('LANDSAT/LC8_L1T_TOA')
// .filterBounds(geom).filterDate(start, finish)
// .select(['B4', 'B3', 'B2'])
// .map(function(image) {
// return image.visualize()
// .clip(geom)
// })
//print(images)
//Map.addLayer(geom)
//Map.centerObject(geom)
//Export.video.toDrive(images)