'Google Earth Engine: Clip ImageCollection with a grid (FeatureCollection) into several segments

I want to clip an ImageCollection with a grid (FeatureCollection) in Google Earth Engine. Every image in the ImageCollection should be clipped with every feature in the FeatureCollection. I need all images as separate segments for further calculations. Therefore, the result should be a new ImageCollection with each image segment including all properties of the original ImageCollection.

I work with Sentinel-1 images (SAR) and generated a grid over my study area. The clipping between the ImageCollection and the grid works (see Code snippet or the link for the GEE script). My problem is that I don't know how I can address the several image segments now for further processing.

var imagecollection = Sent1;
var featurecollection = grid;


var clip_fc = function(col) {
  return col.clipToCollection(featurecollection);
};
var map_ic = imagecollection.map(clip_fc);

print ('New ImageCollection:', map_ic);
Map.addLayer(map_ic, imageVisParam, 'New ImageCollection');

https://code.earthengine.google.com/?scriptPath=users%2Fbwagner%2Fpublic%3AClip%20ImageCollection%20with%20grid

Does anyone have an idea? I'm not that advanced with JavaScript and short explanations or links would be very helpful as well!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source