GEE 如何进行单幅的栅格统计

想要实现的功能:统计单幅栅格图像的数据统计,例如最大值,最小值,均值,value分布。

在网络上搜了很多方法,发现最方便的还是使用chart

// Define the chart and print it to the console.
var chart =
    ui.Chart.image.histogram({image: FormaTrend, region: roi, scale: 1000})
        .setSeriesNames(['long-trend', 'long-tstat', 'short-trend','hansen-stat'])
        .setOptions({
          title: ' Histogram',
          maxPixels: 1e13,
          hAxis: {
            title: 'Reflectance (scaled by 1e4)',
            titleTextStyle: {italic: false, bold: true},
          },
          vAxis:
              {title: 'Count', titleTextStyle: {italic: false, bold: true}},
          colors: ['cf513e', '1d6b99', 'f0af07','cf578e']
        });
print(chart);

1.maxPixels必须要设置,否则会报错。
2.scalez的设置不同会影响结果


scale5000

scale1000, 明显出现了异常值
scale1000, 明显出现了异常值

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值