1219:
SIF 的地类聚合位置放错,导致 .gt(0.5) 无效;而且2022年的cropland并没有 .gt(0.5)
GEE(13):使用GEE绘制影像直方图_gee直方图-优快云博客
// 方法1:统计像元个数及值(无经纬度)
var allCount = ee.Image.pixelArea().addBands(IMAGE).reduceRegion({
reducer: ee.Reducer.count(),
geometry: MLYR_China,
scale: 5550,
maxPixels: 10e15,
})//.get("area");
print("allCount", allCount)
// 使用.sample()方法提取每个像素的值
var pixelValues = IMAGE.sampleRegions({ collection:MLYR_China, properties:ee.List(['name']), scale:5550 })
Export.table.toDrive({
collection: pixelValues,
description: 'sample_get',
fileFormat: 'CSV'
});
// 方法2:有经纬度、值的信息
// 计数缩减器将返回多边形区域重叠的像素中心数。
var count &