0

I was trying to generate to spectral chart for 'VV','VH','angle' using Google Earth Engine. But I am getting the error

Error generating chart: Remote Request too large

I was using the following code:

    var test1 = data
    .filterDate('2017-06-16', '2017-08-30')
    .select('VV','VH','angle')
    .filterBounds(boundary);

var stack = function(collection) 
{
  var bond = boundary
  var first = ee.Image(collection.first()).select([]);
  var appendBands = function(image, previous) 
  {

    return ee.Image(previous).addBands(image);
  };  
  return ee.Image(collection.iterate(appendBands, first));
};

var stacked = stack(test1)
var mosaic = ee.ImageCollection(stacked).mosaic()
var clip = mosaic.clip(boundary)
print (stacked,'stacked')
print (clip,'clip')
var bandNames = stacked.bandNames();
print (bandNames)


Map.addLayer(clip)
print (clip,'clip')


var chart = ui.Chart.image.series({
  imageCollection: clip,
  region: paddy,
  reducer: ee.Reducer.mean(),
  scale: 10
});


chart.style().set({
  position: 'bottom-right',
  width: '500px',
  height: '300px'
});
Map.add(chart);

What is wrong?

Earth Engine code link https://code.earthengine.google.co.in/82a90af6ef77a68d9e228b8aad76f17a

6
  • Does the error message really have an English error ("to large"), or was that a transcription error?
    – Vince
    Jun 2, 2019 at 16:15
  • Remote request too large (608174080 > 83886080) for output:[<Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>, <Object>].
    – Avik Betal
    Jun 2, 2019 at 17:00
  • i am getting the exact error massage as above
    – Avik Betal
    Jun 2, 2019 at 17:02
  • Then Edit the question to reflect the exact error.
    – Vince
    Jun 2, 2019 at 17:40
  • have you tried asking for a smaller image?
    – Ian Turton
    Jun 3, 2019 at 7:17

1 Answer 1

1

Don't use iterate(). Use collection.toBands(). But also, it looks like you could submit the original collection to the ui.Chart call w/o all the mosaicking and iterating.

1
  • Hi, I did the same i.e collection.toBands() but getting the error of duplicate bands. Image (Error) ImageCollection.toBands: Duplicate band name: 'null_VV'.
    – Avik Betal
    Jun 4, 2019 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.