目录
地下水的全球生态系统 (GDEs)
简介
地下水是最广泛的液态淡水来源,但它在支持多样化生态系统方面的关键作用却往往不被人们所认识。 在许多地区,依赖地下水的生态系统(GDEs)的位置和范围在很大程度上仍不为人所知,导致保护措施不足。 该数据集提供了一张高分辨率(约 30 米)的 GDEs 地图,揭示了全球三分之一以上的旱地(包括主要的生物多样性热点地区)存在 GDEs 的情况。 在地下水枯竭率较低的牧业区,全球生态系分布更为广泛和连续,这表明由于不可持续的水资源和土地利用方式,许多全球生态系分布很可能已经消失。 在绘制的全球生态系分布图中,约 53% 位于地下水呈下降趋势的地区,这表明迫切需要采取保护措施。 尽管它们非常重要,但只有 21% 的全球地下水资源评估区位于保护区或具有可持续地下水管理政策的地区内,这凸显了保护工作中的巨大差距。 此外,该数据集还探讨了大萨赫勒地区的全球地下水资源与文化、社会经济因素之间的联系,强调了它们在支持生物多样性和农村生计方面的作用。 对于政策制定者、保护主义者和利益相关者来说,全球海洋生态系统地图是一个重要的工具,可帮助他们在地方、区域和国际层面确定保护这些重要生态系统的优先次序并制定相关战略。
代码
var imageCollection = ee.ImageCollection("projects/codefornature/assets/GlobalGDEMap_v6_TNC");
print(imageCollection)
var ic_class = imageCollection.select('gde_class');
var ic_prob = imageCollection.select('gde_prob');
var GDEmap = ee.Image(ic_class.mosaic());
var GDEprob = ee.Image(ic_prob.mosaic());
var dataset = ee.ImageCollection("ESA/WorldCover/v100").first();
var land = dataset.neq(80).updateMask(dataset.neq(80));
///
// rename "land" band to match "GDEmap" band names
// set land raster = 0
var land_renameBand = land.remap([1], [0], 0, 'Map').select(['remapped']).rename(['gde_class']);
// mask out non-analyzed areas from GDE layer
var mask = GDEmap.gt(0)
var GDEmasked = GDEmap.updateMask(mask) // GDE and no GDE; excludes areas not analyzed
var GDEprob_masked = GDEprob.updateMask(mask) // probability of GDEs; excludes areas not analyzed
var GDEprob_80 = GDEprob_masked.gte(80) // high probability of GDEs; excludes areas not analyzed
// Use the image as its own mask to hide zero values
var GDEprob_80_masked = GDEprob_80.mask(GDEprob_80);
// composite "land" and "GDEmap" images (taking the maximum value)
var GDEmap_land_composite = ee.ImageCollection.fromImages([GDEmasked, land_renameBand]).max(); // composite layer (GDE, no GDE, land area not analyzed)
// add composite image to map
// 0 = not analyzed
// 1 = GDE
// 2 = no GDE
// Palette with the colors
//var palette_colors =['#c6c6c6','#00cc00','white'];
var palette_colors = ['#c6c6c6', '#018571', '#a6611a'];
var palette_colors_prob = ['#a6611a', '#dfc27d', '#f5f5f5', '#80cdc1', '#018571'];
var classProbVisualization = {
min: 0,
max: 100,
palette: palette_colors_prob
};
var vizParams = {
palette: ['006400'] // dark green
};
// name of the legend
var names = ['Not Analyzed', 'Likely GDE', 'Not GDE'];
//Map.addLayer(GDEprob_80_masked, vizParams, 'High probability GDEs');
Map.setCenter(-28, 33, 3)
// Add in the download grid
var finalGrid = ee.FeatureCollection('projects/codefornature/assets/global_gde_tiles_URL');
print(finalGrid)
// Define the style for the grid layer
var gridStyle = {
color: 'white',
fillColor: '#FFFFFF80', // Transparent white fill (50% opacity)
width: 2
};
// Add the styled grid layer to the map
Map.addLayer(GDEmap_land_composite, {
min: 0,
max: 2,
palette: palette_colors,
opacity: .8
}, 'Groundwater Dependent Ecosystems')
Map.addLayer(GDEprob_masked, classProbVisualization, 'GDE Certainty', 0);
Map.addLayer(finalGrid.style(gridStyle), {}, 'Download Tiles', 0);
// Global variable to store the pop-up
var popup;
// Function to create a pop-up with the URL
var createPopup = function(feature) {
var url = feature.get('URL');
url.evaluate(function(clientUrl) { // Convert the URL to a client-side string
if (popup) {
Map.remove(popup); // Remove the existing pop-up if it exists
}
popup = ui.Label({
value: 'Download the GDE data for this tile',
style: {
fontSize: '12px',
margin: '1px 8px 1px 8px',
textAlign: 'left',
color: 'blue',
textDecoration: 'underline'
},
targetUrl: clientUrl
});
Map.add(popup);
});
};
// Add a click event to show the pop-up
Map.onClick(function(coords) {
var point = ee.Geometry.Point([coords.lon, coords.lat]);
var clickedFeature = finalGrid.filterBounds(point).first();
clickedFeature.evalua