当前位置:网站首页>Google Earth Engine(GEE)——将字符串的转化为数字并且应用于时间搜索( ee.Date.fromYMD)
Google Earth Engine(GEE)——将字符串的转化为数字并且应用于时间搜索( ee.Date.fromYMD)
2022-06-30 12:57:00 【此星光明】
之前写过一篇关于如何将字符串转化为时间的,但是没有提到应用,这一次,当我们想使用一个字符串中提供的信息,用于切割的时候,我们就可以有效的将字符串转化为数字类型。
问题:
Date (Error)
Number.int8, argument 'input': Invalid type. Expected type: Number. Actual type: String. Actual value: 1

原有代码:
var string1 = ee.String('daymet_11_20150101');
print('26 firstring', string1);
var yearstr = ee.Number(string1.slice(10,14));
print('29 year', yearstr);
var monthstr = ee.Number(string1.slice(14,16));
print('32 month', monthstr);
var daystr = ee.Number(string1.slice(16,18));
print('35 day', daystr);
var hrstr = string1.slice(7,9);
print('38边栏推荐
- 【刷题篇】避免洪水泛滥
- Unity animator parameter
- The spiral matrix of the force buckle rotates together (you can understand it)
- ABAP toolbox v1.0 (with implementation ideas)
- 华为帐号多端协同,打造美好互联生活
- Today's sleep quality record 80 points
- Wechat applet reports an error: typeerror: cannot read property 'SetData' of undefined
- Rk356x u-boot Institute (command section) 3.2 usage of help command
- golang 基础 —— 字符串 与 int 、int64 互转
- Multi terminal collaboration of Huawei accounts to create a better internet life
猜你喜欢

可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹

Assertions of regular series

VisualStudio and SQL

Motor control Clarke( α/β) Derivation of equal amplitude transformation

我如何才能保护我的私钥?

Matlab tips (22) matrix analysis -- stepwise regression

Wechat applet reports an error: typeerror: cannot read property 'SetData' of undefined

Machine learning notes - Introduction to autocorrelation and partial autocorrelation

Loss function: Diou loss handwriting implementation

Idea 2021.3 golang error: rning: undefined behavior version of delve is too old for go version 1.18
随机推荐
商品服务-平台属性
我如何才能保护我的私钥?
Golang Basics - string and int, Int64 inter conversion
Rk356x u-boot Institute (command section) 3.2 usage of help command
Goods and services - platform properties
With the development of industrial Internet, the landing and application of the Internet has become wider
ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately
科普达人丨漫画图解什么是eRDMA?
[recruitment (Guangzhou)] Chenggong Yi (Guangzhou) Net core middle and Senior Development Engineer
【系统分析师之路】第五章 复盘软件工程(敏捷开发)
【刷题篇】供暖器
golang模板(text/template)
VisualStudio and SQL
RK356x U-Boot研究所(命令篇)3.3 env相关命令的用法
Unity animator parameter
这个编辑器即将开源!
JS converts an array to a two-dimensional array based on the same value
【精选】资源变现资讯、新闻、自媒体、博客小程序(可引流,开通流量主,带pc后台管理)
Introduction to the renewal of substrate source code: the pledge amount is greatly reduced, and rocksdb can be completely disabled
Ffmpeg miscellaneous