1

I've imported two shape files into Google Earth engine and am trying to combine them to form a feature collection. I do this using the code;

var ROI = ee.FeatureCollection([
ee.Feature(OSPAR_II.geometry(), {'id': 'OSPAR_II'}),
ee.Feature(OSPAR_III. geometry(), {'id': 'OSPAR_III'}) 
]);

This seems to print fine, but when I try and add this layer to the map;

Map.addLayer(ROI, {}, 'ROI');

I get the error ROI: Layer error: Description length exceeds maximum.

What is causing this? I've done something similar before and never had this issue.

My code can be found here

1

You can merge your two FeatureCollections instead. I don't know why that works better, but it happily displays on the map.

var ROI = OSPAR_II.merge(OSPAR_III)

https://code.earthengine.google.com/b47e64be67cd2869573737c87388571f

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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