当前位置:网站首页>GEE:计算image区域内像素最大最小值
GEE:计算image区域内像素最大最小值
2022-06-26 20:13:00 【BetterQ.】
GEE:计算image区域内像素最大最小值
使用GEE统计指定区域内像素的最大最小值(如DEM)时,需要使用到GEE中的.regionReducer和reducer函数。
min & max
最大值:ee.Reducer.max()
最小值:ee.Reducer.min()
最大最小值:ee.Reducer.minMax()
代码实现
最大值
//给定区域
var CQ =
/* color: #98ff00 */
/* shown: false */
ee.Geometry.Polygon(
[[[107.81231551184783, 29.581711188146137],
[108.25176863684783, 30.49472925792531],
[110.00958113684783, 31.173930341237376],
[108.60333113684783, 31.922923346675326],
[106.84551863684783, 30.418966567079185],
[105.35137801184783, 30.418966567079185],
[105.35137801184783, 29.428726935782418],
[107.10919051184783, 28.89146956313381]]]);
//选择数据集,这里选择DEM
var DEM=ee.Image("CGIAR/SRTM90_V4");
//统计最大值
var max=DEM.reduceRegion({
reducer:ee.Reducer.max(),
geometry:CQ,
scale:90
});
print(max)
输出结果:
最小值
//给定区域
var CQ =
/* color: #98ff00 */
/* shown: false */
ee.Geometry.Polygon(
[[[107.81231551184783, 29.581711188146137],
[108.25176863684783, 30.49472925792531],
[110.00958113684783, 31.173930341237376],
[108.60333113684783, 31.922923346675326],
[106.84551863684783, 30.418966567079185],
[105.35137801184783, 30.418966567079185],
[105.35137801184783, 29.428726935782418],
[107.10919051184783, 28.89146956313381]]]);
//选择数据集,这里选择DEM
var DEM=ee.Image("CGIAR/SRTM90_V4");
//统计最大值
var min=DEM.reduceRegion({
reducer:ee.Reducer.min(),
geometry:CQ,
scale:90
});
print(min)
输出结果:
同时计算最大最小值
可以同时获取区域像素的最大最值,如下:
//给定区域
var CQ =
/* color: #98ff00 */
/* shown: false */
ee.Geometry.Polygon(
[[[107.81231551184783, 29.581711188146137],
[108.25176863684783, 30.49472925792531],
[110.00958113684783, 31.173930341237376],
[108.60333113684783, 31.922923346675326],
[106.84551863684783, 30.418966567079185],
[105.35137801184783, 30.418966567079185],
[105.35137801184783, 29.428726935782418],
[107.10919051184783, 28.89146956313381]]]);
//选择数据集,这里选择DEM
var DEM=ee.Image("CGIAR/SRTM90_V4");
var maxmin=DEM.reduceRegion({
reducer:ee.Reducer.minMax(),
geometry:CQ,
scale:90
});
print(maxmin)
输出结果:
边栏推荐
- MongoDB实现创建删除数据库、创建删除表(集合)、数据增删改查
- 抖音实战~分享模块~复制短视频链接
- 黑客用机器学习发动攻击的九种方法
- MySQL - subquery usage
- Mongodb implements creating and deleting databases, creating and deleting tables (sets), and adding, deleting, modifying, and querying data
- Sword finger offer II 091 Paint the house
- Chain game development finished product source code chain game system development details
- Disruptor local thread queue_ Use transprocessor processor and workpool to compare consumption - Notes on inter thread communication 005
- The successfully resolved idea cannot use the log normally after referencing Lombok's @slf4j
- Garbage collection mechanism of browser
猜你喜欢

Feign远程调用

Good thing recommendation: mobile terminal development security tool

关于Qt数据库开发的一些冷知识
Detailed explanation of stored procedures in MySQL

Convex hull problem

Tiktok practice ~ homepage video ~ pull-down refresh

Database SQL statement writing

Tiktok practice ~ search page ~ scan QR code

数据库范式和主码的选择
![[recommended collection] these 8 common missing value filling skills must be mastered](/img/ab/353f74ad73ca592a3f97ea478922d9.png)
[recommended collection] these 8 common missing value filling skills must be mastered
随机推荐
抖音实战~首页视频~下拉刷新
Summary of several common UML diagrams
Detailed explanation of retrospective thinking
好物推荐:移动端开发安全工具
抖音实战~分享模块~复制短视频链接
Why don't I recommend going to sap training institution for training?
Review of watermelon book (VII): Bayesian classifier (manual push + code demo)
Basic and necessary common plug-ins of vscade
【推荐收藏】这8个常用缺失值填充技巧一定要掌握
Unity——Mathf. Similarities and differences between atan and atan2
Development of NFT for digital collection platform
Wechat applet custom pop-up components
Keep alive cache component in Vue
Six necessary threat tracking tools for threat hunters
好物推薦:移動端開發安全工具
Project practice 4: user login and token access verification (reids+jwt)
Web resource preloading - production environment practice
stm32和电机开发(直流有刷电机和步进电机)
抖音实战~搜索页面~扫描二维码
抖音实战~分享模块~生成短视频二维码