Skip to content

Commit 2167d02

Browse files
committed
Merge branch 'EP4053-compute-indices'
2 parents 2e091bd + 9bb461d commit 2167d02

File tree

16 files changed

+2273
-0
lines changed

16 files changed

+2273
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Add `options` argument to `DataCube.atmospheric_correction` ([Open-EO/openeo-python-driver#91](https://github.com/Open-EO/openeo-python-driver/issues/91))
1313
- Add `atmospheric_correction_options` and `cloud_detection_options` arguments to `DataCube.ard_surface_reflectance` ([Open-EO/openeo-python-driver#91](https://github.com/Open-EO/openeo-python-driver/issues/91))
1414
- UDP storing: add support for "returns", "categories", "examples" and "links" properties ([#242](https://github.com/Open-EO/openeo-python-client/issues/242))
15+
- Add `openeo.extra.spectral_indices`: experimental API to easily compute spectral indices (vegetation, water, urban, ...)
16+
on a `DataCube`, using the index definitions from [Awesome Spectral Indices](https://awesome-ee-spectral-indices.readthedocs.io/en/latest/)
1517

1618

1719
### Changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include openeo/extra/spectral_indices/resources/*.json
2+
include openeo/extra/spectral_indices/resources/*/*.json
3+
include openeo/extra/spectral_indices/resources/*/LICENSE*

docs/cookbook/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ OpenEO CookBook
88
ard
99
sampling
1010
udp_sharing
11+
spectral_indices

docs/cookbook/spectral_indices.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
====================================
2+
Spectral Indices
3+
====================================
4+
5+
.. warning::
6+
This is a new experimental API, subject to change.
7+
8+
.. automodule:: openeo.extra.spectral_indices
9+
:members: list_indices, compute_and_rescale_indices, append_and_rescale_indices, compute_indices, append_indices, compute_index, append_index

openeo/extra/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Easily calculate spectral indices (vegetation, water, urban etc.).
3+
4+
Supports the indices defined in the
5+
`Awesome Spectral Indices <https://awesome-ee-spectral-indices.readthedocs.io/>`_ project
6+
by `David Montero Loaiza <https://github.com/davemlz>`_.
7+
8+
9+
.. versionadded:: 0.9.1
10+
11+
"""
12+
13+
from openeo.extra.spectral_indices.spectral_indices import *
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
Spectral Index specification files, derived from and based on the
3+
[Awesome Spectral Indices](https://awesome-ee-spectral-indices.readthedocs.io/) project
4+
by [David Montero Loaiza](https://github.com/davemlz)
5+
6+
- `awesome-spectral-indices/spectral-indices-dict.json` comes straight from https://github.com/davemlz/awesome-spectral-indices/blob/main/output/spectral-indices-dict.json
7+
- `extra-indixes-dict.json` is a set of additional indices not (yet) provided by Awesome Spectral Indices
8+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 David Montero Loaiza
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)