简体   繁体   English

从 Google 地球引擎中的图像集合中导出图像 - 超出用户 memory 限制

[英]Exporting images from image collection in Google Earth Engine - user memory limit exceeded

I'm fairly new to GEE, and I'm trying to process some imagery, then download the results.我对 GEE 还很陌生,我正在尝试处理一些图像,然后下载结果。 I need to mask about 30 years of Landsat data to isolate different land cover types, remove clouds, and calculate vegetation indices.我需要掩盖大约 30 年的 Landsat 数据,以隔离不同的土地覆盖类型、去除云层并计算植被指数。 Then, I need to export these data to do further analyses in R.然后,我需要将这些数据导出到 R 中做进一步的分析。 I've managed to do all of the masking and calculating vegetation indices, but when I go to export the data, it gives me the user memory limit exceeded error.我已经设法完成了所有的掩蔽和计算植被指数,但是当我 go 导出数据时,它给了我user memory limit exceeded错误。 I tried to only download 1 year of data at a time but got the same error.我尝试一次只下载 1 年的数据,但遇到了同样的错误。 I'm not sure how to accomplish what I'm doing, which is to do the heavy processing of the data in GEE then export it to do the additional analyses elsewhere.我不确定如何完成我正在做的事情,即在 GEE 中对数据进行大量处理,然后将其导出以在其他地方进行额外的分析。 Any recommendations?有什么建议吗? Code below.代码如下。

Edit: Added the ROI information as recommended.编辑:按照建议添加了 ROI 信息。

var l8sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
  .filterDate('2013-07-01','2018-06-30');
  
//Function to mask forest
var maskForest = function(img){
  var mask = forest.eq(1);
  return img.updateMask(mask);
};

// Function to mask flooded area
var maskFld = function(img){
  var mask = fldpln.eq(1);
  return img.updateMask(mask);
};

// Cloud masking function
var mask = require('users/fitoprincipe/geetools:cloud_masks');

var mask_fun = mask.landsatSR();

// Create EVI mapping functions
var EVI8 = function(img){
  var evi = img.expression(
  '2.5*((NIR/10000-RED/10000)/(NIR/10000 + 6 * RED/10000 - 7.5 * BLUE/10000 + 1))', {
    'NIR': img.select('B5'),
    'RED': img.select('B4'),
    'BLUE': img.select('B2')
  }).rename('EVI');
return(img.addBands(evi));
};

// Map the forest/savanna/cloud masks and indices to the image collections and select the VI bands
var l8srFldFor = l8sr.map(maskForest).map(maskFld).map(mask_fun).map(EVI8)

// Download images from collection to Drive
var batch = require('users/fitoprincipe/geetools:batch');

var roi = ee.Geometry.Rectangle([[-48.425,-9.577],[-48.036,-8.390]]);

batch.Download.ImageCollection.toDrive(l8srFldFor, 'LandsatTiles', 
                {scale: 30, 
                region: roi,
                 type: 'float'});```

Are you trying to download from all over the world?你想从世界各地下载吗?

I think the problem is that you are not applying any spatial filter to the landsat 8 collection.我认为问题在于您没有对 landsat 8 集合应用任何空间过滤器。 Therefore, the resulting collection is including every landsat 8 image acquired from '2013-07-01' to '2018-06-30'.因此,生成的集合包括从“2013-07-01”到“2018-06-30”获取的幅 landsat 8 图像。 So probably that was causing the user memory limit exceeded error.所以这可能是导致user memory limit exceeded错误。 To apply a spatial filter based on your roi you should use filterBounds .要根据您的roi应用空间过滤器,您应该使用filterBounds

var roi = ee.Geometry.Rectangle([[-48.425,-9.577],[-48.036,-8.390]]);
var l8sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
  .filterDate('2018-05-01','2018-06-30')
  .filterBounds(roi);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导出 Google Earth Engine 图像集合中的所有图像(Google Earth Engine API) - Exporting all images in a Google Earth Engine image collection (Google Earth Engine API) 导出图像集合 - Landsat-8 表面温度(Google 地球引擎) - Exporting Image Collection - Landsat-8 Surface Temperature (Google Earth Engine) 减少图像集合 Google Earth Engine - Reduction over an image collection Google Earth Engine 如何使用 Google 地球引擎中的元数据属性为图像集合 select 特定图像? - How to select specific images for an image collection using metadata properties in Google Earth Engine? 如何根据其位置在Google Earth Engine中对图像集合进行子集化? - How to subset an image collection in Google Earth Engine based on their position? Google Earth Engine:将波段添加到具有时间平均值的图像集合 - Google Earth Engine: Add band to Image Collection with mean value in time 从Google Earth引擎的imageCollection的特定月份中选择一张图像 - select one image from a specific month of an imageCollection in google earth engine 从 Google 地球引擎上的 NEX-GDDP 产品导出每日气候数据 - Exporting daily climatology data from NEX-GDDP product on Google Earth Engine 如何在 Google Earth Engine 中合并图像? - How to combine the images in Google Earth Engine? 使用Google地球引擎将Landsat图像集合减少为长格式列表时缺少ND​​VI值 - Missing NDVI values when reducing Landsat Image Collection to long format list using Google Earth Engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM