当前位置:网站首页>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
边栏推荐
- golang 基础 —— 字符串 与 int 、int64 互转
- Tronapi wave field interface PHP version - interface document attached - package based on thinkphp5 - source code without encryption - can be opened in two - detailed guidance of the author - 11:49:56
- Understanding and mastery of ffmpeg avbufferpool
- Introduction to two types of rxjs observable operators
- 随着产业互联网的发展,有关互联网的落地和应用也就变得宽阔了起来
- Wechat applet reports an error: typeerror: cannot read property 'SetData' of undefined
- [the path of system analyst] Chapter 5 Software Engineering (Agile Development)
- JS 二维数组变一维数组的方法
- Introduction to the new source code of substrat: fix the memory leak of the mission engine of beefy, and optimize the smart contract deletion queue
- 60 divine vs Code plug-ins!!
猜你喜欢
逆向调试入门-PE中的VA与RVA换算04/07
All the abnormal knowledge you want is here
一文讲清楚什么是类型化数组、ArrayBuffer、TypedArray、DataView等概念
为基础性语言摇旗呐喊
Loss function: Diou loss handwriting implementation
这个编辑器即将开源!
In line with the trend of media integration, Zhongke Wenge and Meishe jointly create digital intelligence media publicity
Resource realization applet opening traffic main tutorial
[KALI] KALI系统、软件更新(附带镜像源)
数据湖(十一):Iceberg表数据组织与查询
随机推荐
Golang foundation -- slicing several declaration methods
ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately
MySQL access denied, opened as Administrator
Basic syntax of unity script (2) -record time in unity
Resource realization applet opening wechat official small store tutorial
All the abnormal knowledge you want is here
ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately
navicat数据库建表是没有utf8选项。
Tronapi wave field interface PHP version - interface document attached - package based on thinkphp5 - source code without encryption - can be opened in two - detailed guidance of the author - 11:49:56
[Title brushing] heater
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
数据湖(十一):Iceberg表数据组织与查询
PG Basics - logical structure management (table inheritance, partition table)
波卡跨链通信源码探秘: 要素篇
一次 Keepalived 高可用的事故,让我重学了一遍它!
Basics of golang -- the difference between slicing and array
防火墙基础之总部双机热备与分支基础配置
Goods and services - platform properties
深度长文探讨Join运算的简化和提速
数字时代,XDR(扩展检测与响应)的无限可能