2

I am quite new to javascript and I am trying to apply a mask on an image to exclude areas inside a feature collection, I have seen that for the case of image collections the "mask" and "mask.not" expressions have opposite effects, however for "clip" that is not the case, then what would be the opposite expression to clip?

Here is my code with the mentioned mask missing, I would like to mask out the protected areas:


///load collections country boundaries
var country =ee.FeatureCollection('USDOS/LSIB/2013');

// load protected areas
var PA= ee.FeatureCollection('WCMC/WDPA/current/polygons');

// load elevation and mask for a country
var srtm = ee.Image('USGS/SRTMGL1_003').clip(country.filter(ee.Filter.eq('cc', 'CO')));
Map.addLayer(srtmmask, {min: 1, max: 100, palette:['green', 'yellow', 'red']}, 'Elevation');


0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.