最近很多研究遥感的人都在使用Google Earth Engine,简称Gee。它是Google提供的对大量全球尺度地球科学资料(尤其是卫星数据)进行在线可视化计算和分析处理的云平台。该平台能够存取卫星图像和其他地球观测数据数据库中的资料并足够的运算能力对这些数据进行处理。简单的说,上面有海量影像、存储空间、丰富的计算资源,可以供你在线进行遥感方便计算研究,它也支持用户使用Python、JavaScript调用它的API在线开发调试程序。这里简述一下如何搭建本地的基于python的Gee开发运算环境。
前端准备
- 可以科学上网
- Chrome浏览器
- Anaconda
- python3的环境(我使用的是3.9)
- 注册Gee的账号
依赖安装
主要是利用anaconda创建python3的虚拟环境
- 安装gee
conda install geemap -c conda-forge
- 安装jupyter和相关库
conda install jupyter
conda install jupyterthemes -c conda-forge #主题变更库
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
#jupyter访问虚拟环境包
conda install nb_conda -c conda-forge
- 启动jupyter,简单配置
jupyter notebook
开发第一段代码
启动jupyter后,新建一个python3片段
输入如下代码
import geemap
map = geemap.Map()
map
运行后效果如下
到这里一个简单的开发环境就已经配置完成了