generated from stactools-packages/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build collecton/item metadata system (#2)
- Loading branch information
Showing
42 changed files
with
77,892 additions
and
1,078 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,96 @@ | ||
# stactools-template | ||
|
||
This is a template repo used for creating new packages for `stactools`. | ||
|
||
## How to use | ||
|
||
1. Clone this template repository as your package name, e.g. `landsat`. | ||
This name should be short, memorable, and a valid Python package name (i.e. | ||
it shouldn't start with a number, etc). It can, however, include a hyphen, in | ||
which case the name for Python imports will be the underscored version, e.g. | ||
`landsat-8` goes to `stactools.landsat_8`. Your name will be used on PyPI to | ||
publish the package in the stactools namespace, e.g. `stactools-landsat`. | ||
2. Change into the top-level directory of your package and run `scripts/rename`. | ||
This will update _most_ of the files in the repository with your new package name. | ||
3. Update `pyproject.toml` with your package description and such. | ||
4. Install with the development requirements (`pip install -e '.[dev]'`). | ||
5. Update the LICENSE with your company's information (or whomever holds the copyright). | ||
6. Edit or replace the existing functions to create stac Items and Collections | ||
for your dataset. | ||
7. Add example Items (and Collections and Catalogs, if included) to an | ||
`examples/` directory. | ||
8. Delete this file, and rename `README-template.md` to `README.md`. Update your | ||
new README to provide information about how to use your package. | ||
# stactools-glad-glclu2020 | ||
|
||
[![PyPI](https://img.shields.io/pypi/v/stactools-glad-glclu2020?style=for-the-badge)](https://pypi.org/project/stactools-glad-glclu2020/) | ||
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/stactools-packages/glad-glclu2020/continuous-integration.yml?style=for-the-badge) | ||
|
||
- Name: glad-glclu2020 | ||
- Package: `stactools.glad_glclu2020` | ||
- [stactools-glad-glclu2020 on PyPI](https://pypi.org/project/stactools-glad-glclu2020/) | ||
- Owner: @hrodmn | ||
- [Dataset homepage](https://storage.googleapis.com/earthenginepartners-hansen/GLCLU2000-2020/v2/download.html) | ||
- STAC extensions used: | ||
- [proj](https://github.com/stac-extensions/projection/) | ||
- [item-assets](https://github.com/stac-extensions/item-assets/) | ||
- [scientific](https://github.com/stac-extensions/scientific/) | ||
- [version](https://github.com/stac-extensions/version/) | ||
- [classification](https://github.com/stac-extensions/classification/) | ||
- [render](https://github.com/stac-extensions/render/) | ||
- Browse the example in human-readable form | ||
- [`glad-glclu2020`](https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/stactools-packages/glad-glclu2020/main/examples/glad-glclu2020/collection.json) | ||
- [`glad-glclu2020-change`](https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/stactools-packages/glad-glclu2020/main/examples/glad-glclu2020-change/collection.json) | ||
- [Browse a notebook demonstrating the example item and collection](https://github.com/stactools-packages/glad-glclu2020/tree/main/docs/example.ipynb) | ||
|
||
A short description of the package and its usage. | ||
|
||
## STAC examples | ||
|
||
- [Collection](examples/glad-glclu2020/collection.json) | ||
- [Item](examples/glad-glclu2020/v2_2000_40N_080W/v2_2000_40N_080W.json) | ||
|
||
## Installation | ||
|
||
```shell | ||
pip install stactools-glad-glclu2020 | ||
``` | ||
|
||
## Command-line usage | ||
|
||
By default, `stactools-glad-glclu2020` will assume that you are generating STAC metadata for the original files which are stored in a Google storage container and publicly available over HTTP. | ||
|
||
```bash | ||
stac gladlclu2020 create-collection \ | ||
--sample-asset-href https://storage.googleapis.com/earthenginepartners-hansen/GLCLU2000-2020/v2/2000/50N_090W.tif \ | ||
{destination} | ||
|
||
stac gladlclu2020 create-item \ | ||
https://storage.googleapis.com/earthenginepartners-hansen/GLCLU2000-2020/v2/2000/50N_090W.tif \ | ||
{destination} | ||
``` | ||
|
||
> [!WARNING] | ||
> These files are not cloud-optimized geotiffs (COGs)! | ||
> Be aware that this has major performance implications for applications that consume the data from these assets. | ||
If you have created your own copy of the data in a different storage container, you can provide a custom URL format for the assets with the `--href-format` parameter in the `create-item` command: | ||
|
||
```bash | ||
|
||
stac gladlclu2020 create-collection \ | ||
--sample-asset-href {sample_tif_url} \ | ||
{destination} | ||
|
||
stac gladlclu2020 create-item \ | ||
--href-format s3://bucket/glad/GLCLU2000-2020/{version}/{year}/{loc}.tif \ | ||
{cog_href} \ | ||
{destination} | ||
``` | ||
|
||
Use `stac glad-glclu2020 --help` to see all subcommands and options. | ||
|
||
## Contributing | ||
|
||
We use [pre-commit](https://pre-commit.com/) to check any changes. | ||
To set up your development environment: | ||
|
||
```shell | ||
uv venv && uv sync --extra dev | ||
uv run pre-commit install | ||
``` | ||
|
||
To check all files: | ||
|
||
```shell | ||
uv run pre-commit run --all-files | ||
``` | ||
|
||
To run the tests: | ||
|
||
```shell | ||
uv run pytest -vv | ||
``` | ||
|
||
If you've updated the STAC metadata output, update the examples: | ||
|
||
```shell | ||
uv run scripts/update-examples | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.