javascript - 请求负载大小超过限制:4194304 字节
问题描述
我收到此错误,因为我正在尝试导出以驱动分类图像,该图像相当大,因为它包括澳大利亚新南威尔士州的整个地区。手册说在这种情况下它将以许多较小的文件导出,但对我来说并非如此。请查看我的代码,并帮助我弄清楚如何最终将其导出为 1 个图像或更多图像。提前致谢。
//SPECIFY AND MODIFY THE AREA OF INTEREST
var S2 = ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(geometry);
var S2 = S2.filterMetadata('CLOUD_COVERAGE_ASSESSMENT', 'less_than', 5);
var S2 = S2.filterDate('2019-12-14','2020-01-16');
print(S2.size());
var S2_image = S2.first();
var S2_clipped_collection = S2.map(function (S2_image){
return S2_image.clip(geometry);
});
print(S2_clipped_collection);
var S2_image = S2_image.select('B2');
var S2_clipped_collection = S2_clipped_collection
.reduce(ee.Reducer.mean());
print(S2_clipped_collection);
var S2_clipped_collection = S2_clipped_collection.select( 'B2_mean', 'B3_mean', 'B4_mean', 'B5_mean', 'B6_mean', 'B7_mean', 'B8_mean', 'B11_mean','B12_mean');
Map.addLayer(S2_clipped_collection, {bands:['B4_mean', 'B3_mean', 'B2_mean'], min:500, max:2800}, "222");
var classnames = burned.merge(unburned);
var bands = ['B2_mean', 'B3_mean', 'B4_mean', 'B5_mean', 'B6_mean', 'B7_mean', 'B8_mean', 'B11_mean','B12_mean'];
var training = S2_clipped_collection.select(bands).sampleRegions({
collection: classnames,
properties: ['landcover'],
scale: 10
});
print(training);
var classifier = ee.Classifier.smileRandomForest(100).train({
features: training,
classProperty: 'landcover',
inputProperties: bands
});
//Run the classification
var classified = S2_clipped_collection.select(bands).classify(classifier);
//Display classification
Map.centerObject(classnames, 11);
Map.addLayer(classified,
{min: 0, max: 3, palette: ['red', 'blue', 'green','yellow']},
'classification');
Export.image.toDrive({
image: classified,
description: 'description',
region: geometry,
scale: 10,
crs: 'EPSG:25832',
maxPixels: 1e19
});
解决方案
这里的简单建议,您的比例当前设置为 10 m,这非常小。除非您绝对需要高分辨率,否则我建议至少将其增加到 100 m。如果它仍然无法导出,请减小几何图形的大小或进一步增加比例。
推荐阅读
- json - 气象学家试图创建预报页面
- docker - docker pull 没有基本的身份验证凭据
- python - 需要删除 Python 停用词和停用词组吗?删除哪个订单?它们都可以成为停用词/短语的列表吗?
- python - numpy nansum 跨第一个索引
- sequelize.js - 有没有办法在 sequelize findall 查询中结合 LIKE 和 IN 运算符?
- python - 使用参数调用python函数并在autohotkey中获取返回值
- laravel - 在 eloquent 中使用 [IF] 时无法存储不起作用
- java - 围绕中心点旋转一条线
- java - 如何从 jtextfield 获取文本并根据文本跳到 jtable 行?
- r - 如何在复杂的肥皂膜 GAM 平滑器中设置边界条件?