I am filtering a feature collection using some adapted code from other scripts I have, is it a way to obtain only the outer geometry and not the union of all features? Simplify don't do that.
var region = ee.Geometry.Polygon(
[[[-168.4122049619641, 71.96304726349818],
[-168.4122049619641, 37.15429194943178],
[-43.78329871196412, 37.15429194943178],
[-43.78329871196412, 71.96304726349818]]], null, false);
var congo = ee.Feature(
region
);
// Load a FeatureCollection from a table dataset: 'RESOLVE' ecoregions.
var ecoregions = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017');
//Map.addLayer(ecoregions, {}, 'default display');
// Subset protected areas to the bounds of the ecoregion feature
// and other criteria. Clip to the intersection with congo.
var protectedAreas = ecoregions
.filter(ee.Filter.and(
ee.Filter.bounds(region),
ee.Filter.eq('BIOME_NUM', 6) // 4. Temperate broadleaf and mixed forests
))
.map(function(feat){
return congo.intersection(feat);
});
Map.addLayer(protectedAreas, {}, 'NA Boreal Forest');