Tuesday, 20 August 2019

javascript - Failed connection to Earth Engine servers


I'm trying to export a multi-layer image to drive on Earth Engine, but the task fails with the following error:




Error creating or submitting task. Failed to contact Earth Engine servers. Please check your connection, firewall, or brows



and then the message cuts off.


I've tried getting around this by logging out and logging back in, restarting my computer, and even using separate Earth Engine accounts both on my home wifi and university VPN for internet, so I don't think it's specific to one Earth Engine account or internet situation. Also tried over two days now, so I don't think it's a temporary server problem either.


Repeatable code below; wondering if anyone can provide insight.


// Generate Region of Interest
var ROI = ee.FeatureCollection('USDOS/LSIB/2013')
.filter(ee.Filter.eq('cc','GL'));

// Compile the data

var dataset = ee.ImageCollection('MODIS/006/MOD13Q1')
.filter(ee.Filter.date('2005-01-01', '2005-12-31'));

// Select the data you're interested in
var ndvi = dataset.select('NDVI');

// Prep data for export
// https://gis.stackexchange.com/a/254778/67264
var stackCollection = function(collection) {
var first = ee.Image(collection.first()).select([]);

var appendBands = function(image, previous) {
var dateString = ee.Date(image.get('system:time_start')).format('yyyy-MM-dd');
return ee.Image(previous).addBands(image.rename(dateString));
};
return ee.Image(collection.iterate(appendBands, first));
};

var ndvi_img = stackCollection(ndvi);
print("NDVI Image", ndvi_img);


// Export the data
// Export a cloud-optimized GeoTIFF.
// See https://developers.google.com/earth-engine/exporting
Export.image.toDrive({
image: ndvi_img,
description: 'MOD13Q1_NDVI',
scale: 250,
region: ROI,
fileFormat: 'GeoTIFF',
formatOptions: {

cloudOptimized: true
}
});


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...