一组帮助函数,使在开源工具中处理空间数据更容易。这个软件包是由地球实验室维护的,最初是为了支持地球分析教育项目而设计的。
earthp的Python项目详细描述
土性
earthpy使得在python中绘制和操作空间数据更加容易。
为什么是土的?
python是一种通用编程语言,旨在支持许多不同的应用程序。因此,很多人 为科学执行空间任务,包括绘制和处理空间数据,需要执行许多代码步骤。土的 利用为光栅数据(光栅)和矢量数据(Geopandas)开发的功能,简化 所需代码:
- Stack and crop raster bands from data such as Landsat into an easy to use numpy array
- Work with masks to set bad pixels such a those covered by clouds and cloud-shadows to NA (^{
}) - Plot rgb (color), color infrared and other 3 band combination images (^{
}) - Plot bands of a raster quickly using ^{
} - Plot histograms for a set of raster files.
- Create discrete (categorical) legends
- Calculate vegetation indices such as Normalized Difference Vegetation Index (^{
}) - Create hillshade from a DEM
- Clip point, line, and polygon geometries
Earthpy还有一个IO模块,允许用户
- 快速访问托管的地球分析课程中使用的预先创建的数据子集 在www.earthdatascience.org
- 下载他们可能希望在其工作流中使用的其他数据集。
在我们的文档库中查看示例Earthy应用程序
查看我们的vignette gallery了解 在公共空间工作流中使用Earthy的应用示例。
安装
要安装,请使用pip
或conda-forge
。如果您是conda用户,我们鼓励您使用conda-forge
。
通过PIP安装
要通过pip
安装接地,请使用:
$ pip install --upgrade earthpy
使用Conda/Conda Forge通道安装
如果您在水蟒环境中工作,我们建议您使用
conda-forge
$ conda install -c conda-forge earthpy
注意:如果要将conda forge设置为默认conda通道,可以使用以下安装工作流。 我们重新推荐这种方法。一旦运行conda config,就可以在不指定通道的情况下安装earthpy。
$ conda config --add channels conda-forge $ conda install earthpy
一旦成功安装了earthpy,就可以将其导入python。
>>>importearthpyaset
下面是以numpy数组格式绘制多个标注栏的快速示例。
>>>arr=np.random.randint(4,size=(3,5,5))>>>ep.plot_bands(arr,titles=["Band 1","Band 2","Band 3"])>>>plt.show()
活跃贡献者
我们欢迎对Earthpy的贡献。下面是当前活动的包维护程序。请看我们的 contributors file完整的列表 我们的贡献者。
如何贡献
我们欢迎对地球人的贡献!请务必查看我们的 contributing guidelines 有关向Earthy提交请求或更改的详细信息。