Tried to export transition classes for a region of interest. I cant export image to drive for my selected feature collection. Getting an error after running for a while,"A region must be a GeoJSON Polygon or LinearRing. Got: 'MultiPolygon'. Here is the code below- how can i export image for a region that i selected from my shapefiles?
var reg = ee.FeatureCollection('users/karmakersourav/shape')
.filter(ee.Filter.eq('NAME_1', 'Chittagong'));
Map.addLayer(reg);
var gsw = ee.Image('JRC/GSW1_0/GlobalSurfaceWater');
var transition = gsw.select('transition');
Map.addLayer({
eeObject: transition,
name: 'Transition classes (2010-2015)',
});
Export.image.toDrive({
image: gsw,
description: 'imageToCOGeoTiffExample',
scale: 30,
region: reg,
fileFormat: 'GeoTIFF',
maxPixels: 1e12,
formatOptions: {
cloudOptimized: true
}
});