I tried to clip using a loaded shapefile. It enables me to download but crushes at few seconds not completing the downloading task.
var clipToCol = function(image){
return image.clip(export_geometry_2);
};
var dataset = ee.ImageCollection("WorldPop/GP/100m/pop").map(clipToCol)
.filterDate('2017');
var worldPop = dataset.select('population');
var populationVis = {
min: 0.0,
max: 50.0,
palette: ['24126c', '1fff4f', 'd4ff50'],
};
Map.addLayer(worldPop, populationVis, 'Population');
var export_geometry_2 = ee.FeatureCollection("users/gabiklm01/polyMosaic");
Export.image.toDrive({
image: dataset.select('population'),
description: 'worldPop',
scale: 100,
region: export_geometry_2
})
Best Answer
Without your geometry, I used one stored in my GEE assets and the following version of your code ran but, the downloading task also crushes at few seconds as you said.
So, I printed worldPop for evaluating its properties and, I found out that this Image Collection has 248 images (one for each country). I think that it's too much for being handled by Google Drive when you try to export it. As my clip area is located in USA (country code 233 in the Image Collection), I modified above code as follows and, in this case, the downloading task was completed without any problem (after downloading the image stored in Google Drive, it was also visualized in QGIS as expected).
Editing Note:
I created a rectangle geometry in that zone and ran following script that includes Israel, Jordan, Syria, and Lebanon.
After running the script, layers look as follows:
In my case, exporting task to my Google Drive took 21 minutes only for israel clipped image by export_geometry_2. For this reason I didn't export the rest of images (but, if it works for one it should work for remaining images).
After downloading israel_clip image, it looks as expected in QGIS: