导出视频的官方文档:
Export.video.toDrive(collection, description, folder, fileNamePrefix, framesPerSecond, dimensions, region, scale, crs, crsTransform, maxPixels, maxFrames)
Creates a batch task to export an ImageCollection as a video to Drive. The collection must only contain RGB images. Tasks can be started from the Tasks tab. "crsTransform", "scale", and "dimensions" are mutually exclusive.
Arguments:
collection (ImageCollection):
The image collection to export.
description (String, optional):
A human-readable name of the task. Defaults to "myExportVideoTask".
folder (String, optional):
The Google Drive Folder that the export will reside in.
fileNamePrefix (String, optional):
The filename prefix. Defaults to the description.
framesPerSecond (Number, optional):
The framerate of the exported video. Must be a value between 0.1 and 100. Defaults to 1.
dimensions (Number|String, optional):
The dimensions to use for the exported image. Takes either a single positive integer as the maximum dimension or
"WIDTHxHEIGHT" where WIDTH and HEIGHT are each positive integers.
region (Geometry.LinearRing|Geometry.Polygon|String, optional):
A LinearRing, Polygon, or coordinates representing region to export. These may be specified as the Geometry objects or coordinates serialized as a string. If not specified, the region defaults to the viewport at the time of invocation.
scale (Number, optional):
Resolution in meters per pixel.
crs (String, optional):
CRS to use for the exported image. Defaults to the Google Maps Mercator projection, SR-ORG:6627.
crsTransform (String, optional):
Affine transform to use for the exported image. Requires "crs" to be defined.
maxPixels (Number, optional):
Restrict the number of pixels in the export. By default, you will see an error if the export exceeds 1e8 pixels. Setting this value explicitly allows one to raise or lower this limit.
maxFrames (Number, optional):
Set the maximum number of frames to export. By default, a maximum of 1000 frames may be exported. By setting this explicitly, you may raise or lower this limit.
右下角这个图是动图不间断显示澳大利亚的动图
例子是奥蒂利亚'2018-01-01', '2019-01-01'之间的植被覆盖度
// The region of interest - a planar rectangle around Australia.
var rect = ee.Geometry.Rectangle({
coords: [[110, -44], [155, -10]],
geodesic: false
});
Map.addLayer(rect);
Map.centerObject(rect, 3);
// Select MODIS vegetation composites from 2018.
var collection = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterDate('2018-01-01', '2019-01-01')
.select('NDVI');
// Add the first image to the map, just as a preview.
//用第一景影像作为集合进行预览设置
var im = ee.Image(collection.first());
Map.addLayer(im, {}, "first image");
// Visualization parameters.视觉参数的设置
var args = {
crs: 'EPSG:3857', // Maps Mercator
dimensions: '300',
region: rect,
min: -2000,
max: 10000,
palette: 'black, blanchedalmond, green, green',
framesPerSecond: 12,
};
// Create a video thumbnail and add it to the map.
//创造一个界面然后添加到地图上作为显示
//回头会专门进行这个讲解
var thumb = ui.Thumbnail({
// Specifying a collection for "image" animates the sequence of images.
image: collection,
params: args,
style: {
position: 'bottom-right',
width: '320px'
}});
Map.add(thumb);
/*
Export.video.toDrive({
collection:collection,
folder: '动图',
description: '澳大利亚',
fileNamePrefix:'ndvi_video',
dimensions: 720,
framesPerSecond: 10,
scale: 3000,
region: rect,
maxPixels:1e8,
});
*/