I want to make an animation of fires using MCD64A1 with a base map something similar to this Sentinel 5-P animation:
What I could make until now using this code is:
// Define a collection
var col = ee.ImageCollection('MODIS/006/MCD64A1').filterDate('2019-01-01', '2020-12-31').select('BurnDate')
// Define a mask to clip the data by.
var mask = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017')
.filter(ee.Filter.eq('wld_rgn', 'South America'));
print(mask);
// Add outline to the Map as a layer.
Map.centerObject(mask, 3);
Map.addLayer(mask);
// Define the regional bounds of animation frames.
var region =
ee.Geometry.Polygon(
[[[-86.88829713135783, 12.937849176033298],
[-86.88829713135783, -30.715685432081326],
[-30.81407838135783, -30.715685432081326],
[-30.81407838135783, 12.937849176033298]]], null, false);
print('Region', region)
// Define RGB visualization parameters.
var visParams = {
min: 0.0,
max: 366,
palette: ['FF0000']
};
// Create RGB visualization images for use as animation frames.
var rgbVis = col.map(function(img) {
return img.visualize(visParams).clip(mask);
});
// Define GIF visualization parameters.
var gifParams = {
'region': region,
'dimensions': 600,
'crs': 'EPSG:3857',
'framesPerSecond': 5
};
// Print the GIF URL to the console.
print(rgbVis.getVideoThumbURL(gifParams));
which gives the following result:
I didn't find a way to do it.