opendatacube eo3数据集的打包、元数据和出处

eodatasets3的Python项目详细描述


地球观测数据集

Build StatusCoverage Status

一个易于编写、验证和转换ODC的工具 数据集和元数据。

安装

pip install eodatasets3

支持Python3.6+。

元数据创建API

todo:编写概述。

参见tests/integration/test_assemble.py

中的示例

验证器

eo3-validate检查ODC元数据的类似于lint的检查器。

 $ eo3-validate --help
Usage: eo3-validate [OPTIONS] [PATHS]...

  Validate ODC dataset documents

  Paths can be both product and dataset documents, but each product must
  come before its datasets to be matched against it.

Options:
  -W, --warnings-as-errors  Fail if any warnings are produced
  --thorough                Attempt to read the data/measurements, and check
                            their properties match the product
  -q, --quiet               Only print problems, one per line
  --help                    Show this message and exit.

转换为STAC元数据

eo3-to-stac:将odc元数据转换为stac项json文件(beta/不完整)

 $ eo3-to-stac --help
Usage: eo3-to-stac [OPTIONS] [ODC_METADATA_FILES]...

  Convert a new-style ODC metadata doc to a Stac Item.

Options:
  --help  Show this message and exit.

开发

使用pytest运行测试。

pytest

所有代码都使用black格式化,并选中 用pyflakes

在安装测试依赖项时,它们包括在内:

pip install -e .[test]

您可能需要将编辑器配置为在文件保存时自动运行黑色 (有关说明,请参见黑页),或在git中安装预提交挂钩:

预提交设置

提供一个pre-commit配置来自动格式化 并检查代码更改。这使您可以立即捕获并修复 在引发失败的拉取请求(在 特拉维斯)。

如果不使用conda,请从pip安装预提交:

pip install pre-commit

如果使用conda,请从conda forge安装(required,因为pip 版本使用与conda环境不兼容的virtualenvs)

conda install pre_commit

现在将预提交挂钩安装到当前存储库:

pre-commit install

现在,您的代码将在每次提交之前进行格式化和验证。你也可以 通过运行pre-commit run

DEA准备

包括编写现有DEA产品的脚本。

eo3-prepare:从命令行准备odc元数据。

一些准备程序需要辅助依赖项:pip install .[ancillary]

 $ eo3-prepare --help
Usage: eo3-prepare [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  landsat-l1     Prepare eo3 metadata for USGS Landsat Level 1 data.
  modis-mcd43a1  Prepare MODIS MCD43A1 tiles for indexing into a Data...
  noaa-prwtr     Prepare NCEP/NCAR reanalysis 1 water pressure datasets...
  s2-awspds      Preparation code for Sentinel-2 L1C AWS PDS Generates...
  s2-cophub      Preparation code for Sentinel-2 L1C SCIHUB ZIP Generates...

eo3-package-wagl:转换并打包wagl hdf5输出。

需要wagl依赖项组:pip install .[wagl]

 $ eo3-package-wagl --help
Usage: eo3-package-wagl [OPTIONS] H5_FILE

  Package WAGL HDF5 Outputs

  This will convert the HDF5 file (and sibling fmask/gqa files) into
  GeoTIFFS (COGs) with datacube metadata using the DEA naming conventions
  for files.

Options:
  --level1 FILE                   Optional path to the input level1 metadata
                                  doc (otherwise it will be loaded from the
                                  level1 path in the HDF5)
  --output DIRECTORY              Put the output package into this directory
                                  [required]
  -p, --product [nbar|nbart|lambertian|sbt]
                                  Package only the given products (can specify
                                  multiple times)
  --with-oa / --no-oa             Include observation attributes (default:
                                  true)
  --help                          Show this message and exit.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Maven中的java,为什么要运行“mvn clean”?   java会降低图像质量。OutOfMemory异常Android   在Java8中将函数传递到流的过滤方法   jboss6。x java。lang.NoClassDefFoundError,当我将<listenerclass>包含到web时。xml java   java读取图像像素时,像素Alpha始终为255   java在迭代后跳过一行   java如何创建我自己的单链表   意图上的java空指针异常。getStringExtra.:安卓   具有连接实体的java Hibernate onetoone映射   java需要帮助在自制的仓鼠模拟器上实现启动/恢复/暂停/停止线程操作   如何测试非主方法?[Java,IntelliJ]   java jdbc自动提交(false)不起作用   java在JADE中的同一容器中创建多个代理   java OkHttp获取失败的响应正文   java Webdriver flash按钮