当前位置:网站首页>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
边栏推荐
猜你喜欢

实现web实时消息推送的7种方案

onenote使用

How does the new retail saas applet explore the way to break the digital store?

The first time I used debug query and found that this was empty, does it mean that the database has not been obtained yet?please help.

Discuz magazine/news report template (jeavi_line) UTF8-GBK template

华为无线设备配置Mesh业务

leetcode:1488. 避免洪水泛滥【二分 + 贪心】

LeetCode167: Sum of two numbers in sorted array

FP6606ACAW4 TQFN-20L (3mmx3mm) USB双端口充电控制器 百盛电子代理

登录模块调试-软件调试入门
随机推荐
Tensorflow中实现正则化
华为无线设备配置Mesh业务
Express框架连接MySQL及ORM框架
C# 连接SQL Sever 数据库与数据查询实例 数据仓库
MySQL索引常见面试题(2022版)
lotus 1.16.0 最小快照导出 导入
mysql进制安装与mysql密码破解
阿里巴巴CAN:Embedding前置的特征交互新思路
web服务通过用户访问请求判断设备来源
Summary of String Copy, Concatenation, Comparison and Split Functions (1)
一篇文 带你搞懂,虚拟内存、内存分页、分段、段页式内存管理(超详细)
Chapter 5 Advanced SQL Processing
How does the new retail saas applet explore the way to break the digital store?
《痞子衡嵌入式半月刊》 第 59 期
huato hot update environment construction (DLL method hot update C# code)
Lotus 1.16.0 minimum snapshot export import
You are a first-class loser, you become a first-class winner
shell快速移植
[MRCTF2020]Ezaudit
Gvim order record


