用于验证stac文件的包
stac-validator的Python项目详细描述
时空资产目录(stac)验证器
此实用程序允许用户根据STAC规范或本地stac扩展验证stac json文件。
它可以作为命令行实用程序安装,并与stac版本一起传递本地文件路径或url以进行验证。 示例用法可在下面找到
要求
- Python3.6
- 请求
- docopt
用于测试 *pytest
示例
pip install . stac_validator --help Description: Validate a STAC item or catalog against the STAC specification. Usage: stac_validator <stac_file> [--spec_dirs STAC_SPEC_DIRS][--version STAC_VERSION][--threads NTHREADS][--verbose][--timer][--log_level LOGLEVEL][--follow] Arguments: stac_file Fully qualified path or url to a STAC file. Options: -v, --version STAC_VERSION Version to validate against. [default: master] -h, --help Show this screen. --spec_dirs STAC_SPEC_DIRS Path(s) to local directory containing specification files. Separate paths with a comma. [default: None] --threads NTHREADS Number of threads to use. [default: 10] --verbose Verbose output. [default: False] --timer Reports time to validate the STAC. (seconds) --log_level LOGLEVEL Standard level of logging to report. [default: CRITICAL] --follow Follow any child links and validate those links. [default: False] stac_validator https://cbers-stac.s3.amazonaws.com/CBERS4/MUX/057/122/catalog.json -v v0.5.2
STAC扩展示例
stac-spec/extensions/eo/example-landsat8.json --spec_dirs stac-spec/extensions/eo,local_schema/item_v061/json-schema --verbose
有关不同用法的示例,请参见tests目录。