I have uploaded a table containing information on river basins within countries (https://code.earthengine.google.com/?asset=users/basins/TFDD_BCU). I want to calculate the mean population density in the basins from an image. However, I obtain many missing values though the image covers the whole world. Is there a way to obtain the mean for all regions?
According to Taras' and Ricacardo's proposal, I changed the code to this:
var Pop1975 = ee.Image('JRC/GHSL/P2016/POP_GPW_GLOBE_V1/1975');
var BCU = ee.FeatureCollection('users/basins/TFDD_BCU');
var Pop1975filtered = Pop1975.filter(ee.Filter.gt('BCU', 0));
var Pop1975mean = Pop1975filtered.reduceRegions({
collection: BCU,
reducer: ee.Reducer.mean(),
scale: 50,
});
Export.table.toDrive({
collection: Pop1975mean,
description: 'Pop1975mean',
fileFormat: 'CSV'
});
However, I get this error message when execuding the code: "Pop1975.filter is not a function". Any suggestions?
No comments:
Post a Comment