当前位置:网站首页>How Google earth engine realizes the arrangement and selection of our time list
How Google earth engine realizes the arrangement and selection of our time list
2022-07-30 17:11:00 【HUAWEI CLOUD】
The main purpose of this tutorial is to solve our very simple and practical function,The original problem was that this should be simple,But I didn't find a good solution.I want to create a variable that contains the earlier of two dates,But I haven't found a way to compare two dates and extract the earlier date,因为 .min() 或 .first() 不适用于列表.
This article needs to make use of several functions:
ee.Date.fromYMD(year, month, day, timeZone)
Returns a given year、月、日的Date.
参数.
年 (整数)
月 (整数)
day (整数)
timeZone (String, default: null).
时区(例如 "America/Los_Angeles");默认为UTC.
返回.日期
get(unit, timeZone)
Returns the specified unit for this date.
参数.
this:date (Date)
单位(字符串).
年"、"月"(返回1-12)、"周"(1-53)、"日"(1-31)、"小时"(0-23)、"分钟"(0-59)或 "秒"(0-59)之一.
timeZone(字符串,默认为空).
时区(例如:'America/Los_Angeles');默认为UTC.
返回.Long
sort(keys)
Sort the list in ascending order.如果提供了'keys'参数,then it will be sorted first,'list'The elements in will be in the same order.
参数.
this:list (列表).
要排序的列表.
keys (List, default: null):
Optional key value,用于排序.如果提供'keys',它的长度必须与'list'相同.
返回.列表
先看代码:
The overall solution is to merge the lists,Follow after mergingsort进行筛选,You can get a list of time series,And the list is sorted from low to high,So we just have the list merged,You can sort and choose the first one(或第 n 个)索引.If you want to keep the list separate,Then compare and find the relative position between the two lists(小于或大于),就可以了.
Our default list:
Our sorted list:
我们用get获取index,That is the position of the list,get0 It means to get the first parameter in the list:
Here time is expressed in milliseconds.
We can also acquire images in the same way,But you have to get the systemidvalue to load,Or we can use cloud images to filter for loading and so on.
这个公开的github可以查看:GitHub - jdbcode/Snazzy-EE-TS-GIF: Apps for creating Landsat time series animations
(1307条消息) Google earth engine——Display animations onlineui.Thumbnail_此星光明的博客-CSDN博客
往期推荐:
Error: Image.clipToBoundsAndScale, argument 'input': Invalid
Google Earth Engine ——Landsat 5 TOA数据集中的QA_PIXEL和QA_RADSAT波段
Google Earth Engine(GEE)——神级辅助插件(开放地球引擎扩展 (OEEex))
Google Earth Engine——1980-Worldwide so far50m pressure、2 meter temperature、Surface pressure dataset
边栏推荐
- Promise入门到精通(1.5w字详解)
- 每日一题:两数之和
- 中文字符集编码Unicode ,gb2312 , cp936 ,GBK,GB18030
- Tensorflow模型量化(Quantization)原理及其实现方法
- 简易的命令行入门教程
- 基于模糊PID的液压舵机伺服系统
- Discuz magazine/news report template (jeavi_line) UTF8-GBK template
- crontab报错,但本地执行正常
- 大厂面试官眼中的好简历到底长啥样
- Security business revenue growth rate exceeds 70% 360 builds digital security leader
猜你喜欢

Summary of String Copy, Concatenation, Comparison and Split Functions (1)

What does a good resume look like in the eyes of a big factory interviewer?

全职做自媒体靠谱吗?

You are a first-class loser, you become a first-class winner
![[MRCTF2020]Ezaudit](/img/80/d4656abdff20703591ffdc3f5a5ebc.png)
[MRCTF2020]Ezaudit

微信小程序picker滚动选择器使用详解

【AAAI2020】阿里DMR:融合Matching思想的深度排序模型

JMeter笔记3 | JMeter安装和环境说明

C# 连接SQL Sever 数据库与数据查询实例 数据仓库

WeChat applet picker scroll selector use detailed explanation
随机推荐
每日练习------生成13位条形, Ean-13码规则:第十三位数字是前十二位数字经过计算得到的校验码。
查询表中开始日期与结束日期
将 APACHE 日志解析到 SQL 数据库中
新零售saas小程序如何探索数字化门店的破局之路?
Chapter 5 Advanced SQL Processing
Security business revenue growth rate exceeds 70% 360 builds digital security leader
FP6600QSO SOP-8 USB专用充电端口控制器 用于快充电协议和QC2.0/3.0
哎,这要人老命的缓存一致问题啊
向量检索基础方法总结
matlab simulink锂离子电池智能充电策略研究
SQLServer下载与安装
Deep Feedback Network for Recommendation
[NCTF2019]Fake XML cookbook-1|XXE漏洞|XXE信息介绍
线程同步 控制执行顺序
华为云数据治理生产线DataArts,让“数据'慧'说话”
论文阅读 (63):Get To The Point: Summarization with Pointer-Generator Networks
真正懂经营管理的CIO具备哪些特质
data storage
中文字符集编码Unicode ,gb2312 , cp936 ,GBK,GB18030
Daily practice------Generate 13-digit bar, Ean-13 code rule: The thirteenth digit is the check code obtained by the calculation of the first twelve digits.


