GEE(一)补充:数据的上传和下载

首先,GEE为用户提供了三个存储空间,google drive、google assets、以及google cloud storage。

1.数据的上传

关于GEE的介绍有很多,主要使用的是Code Editor界面。进入之后数据的上传是在GEE界面左侧窗口的assets中,一共提供250G的存储,数量不超过10000个文件。

从类型中可以看出,可以上传tif文件和shp文件和表格文件,注意在上传shp文件的时候按照要求,需要四个文件(.shp \ .shx \ .dbf \ .prj)或者将四个文件打包为zip上传。
但无论是哪种文件格式,需要遵循的规则是:

  1. 文件的名称和本地的存放不要有中文;
  2. 文件格式最好是utf-8格式;
  3. 单个文件不超过10G;
  4. 上传过程不能关闭浏览器;
  5. 最好的WGS84投影,EPSG:4326

2. 数据的下载

数据下载命令运行完成之后在右侧界面点击Run即可。

  1. 在GEE运行的程序将被保存到google drive中,导出数据后下载即可。但是免费内存只有15G。

Google Drive: https://drive.google.com/drive/my-drive

example:

// Load a landsatimage and select three bands.
var landsat= ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
.select(['B4', 'B3', 'B2']);
// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([116.2621, 39.8412, 116.4849, 40.01236]);
// Export the image, specifying scale and region.
Export.image.toDrive({
image: landsat,
description: 'image To Drive Example',
scale: 30,
region: geometry
});

关于参数的具体解释,可以在左侧窗口的Docs中输入Export.image.toDrive查看。其它命令也是如此。
Docs
2. Assets一般是上传数据,需要处理大量数据的时候也可以将数据下载到assets中暂存之后进行分析,建议自己的高精度产品数据尽量不要上传。下载数据到Assets:
example:

// Load a landsatimage and select three bands.
var landsat= ee.Image('LANDSAT/LC08/C01/T1_TOA/LC08_123032_20140515')
.select(['B4', 'B3', 'B2']);
// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([116.2621, 39.8412, 116.4849, 40.01236]);
// Get band 4 from the Landsat image, copy it.
var band4 = landsat.select('B4').rename('b4_mean')
.addBands(landsat.select('B4').rename('b4_sample'))
.addBands(landsat.select('B4').rename('b4_max'));
// Export the image to an Earth Engine asset.
Export.image.toAsset({
image: band4,
description: 'image To Asset Example',
assetId: 'exampleExport',
scale: 30,
region: geometry,
pyramidingPolicy: {
'b4_mean': 'mean',
'b4_sample': 'sample',
'b4_max': 'max'
}
});
  1. Google Cloud Storage应用较少,不做介绍

案例引用:
1.《遥感云计算与科学分析——应用与实践》——董金玮等

  • 2
    点赞
  • 23
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值