Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awesome-spectral-indices/SpectralIndices.jl
Awesome Spectral Indices in Julia
https://github.com/awesome-spectral-indices/SpectralIndices.jl
List: SpectralIndices.jl
gis landsat modis remote-sensing satellite-imagery sentinel spectral spectral-dataset spectral-index spectral-indices
Last synced: 16 days ago
JSON representation
Awesome Spectral Indices in Julia
- Host: GitHub
- URL: https://github.com/awesome-spectral-indices/SpectralIndices.jl
- Owner: awesome-spectral-indices
- License: mit
- Created: 2022-05-27T18:06:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-25T00:45:29.000Z (about 1 month ago)
- Last Synced: 2024-06-11T19:13:42.117Z (20 days ago)
- Topics: gis, landsat, modis, remote-sensing, satellite-imagery, sentinel, spectral, spectral-dataset, spectral-index, spectral-indices
- Language: Julia
- Homepage: https://awesome-spectral-indices.github.io/SpectralIndices.jl/dev/
- Size: 6.81 MB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.bib
Lists
- awesome-spectral-indices - SpectralIndices.jl
- awesome-ASI - SpectralIndices.jl - Official ASI Julia Package. Spectral Indices can be computed for Python objects with third party libraries (e.g., `DataFrames`, `YAXArrays`). (Julia)
- Awesome-Geospatial - SpectralIndices.jl - Julia package for working with spectral indices commonly used in remote sensing and earth observation applications. (Julia)
README
# SpectralIndices.jl
![]()
| **Documentation** | **Build Status** | **Julia** | **Testing** |
|:-----------------:|:----------------:|:---------:|:---------|
| [![docs][docs-img]][docs-url] | [![CI][ci-img]][ci-url] [![codecov][cc-img]][cc-url] | [![Julia][julia-img]][julia-url] [![Code Style: Blue][style-img]][style-url] | [![Aqua QA][aqua-img]][aqua-url] |[docs-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-url]: https://awesome-spectral-indices.github.io/SpectralIndices.jl/dev/[ci-img]: https://github.com/awesome-spectral-indices/SpectralIndices.jl/actions/workflows/CI.yml/badge.svg
[ci-url]: https://github.com/awesome-spectral-indices/SpectralIndices.jl/actions/workflows/CI.yml[cc-img]: https://codecov.io/gh/awesome-spectral-indices/SpectralIndices.jl/graph/badge.svg?token=0IRRDAZM0U
[cc-url]: https://codecov.io/gh/awesome-spectral-indices/SpectralIndices.jl[julia-img]: https://img.shields.io/badge/julia-v1.9+-blue.svg
[julia-url]: https://julialang.org/[style-img]: https://img.shields.io/badge/code%20style-blue-4495d1.svg
[style-url]: https://github.com/invenia/BlueStyle[aqua-img]: https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg
[aqua-url]: https://github.com/JuliaTesting/Aqua.jl[jet-img]: https://img.shields.io/badge/%E2%9C%88%EF%B8%8F%20tested%20with%20-%20JET.jl%20-%20red
[jet-url]: https://github.com/aviatesk/JET.jl## Overview 📖
SpectralIndices.jl is a Julia package for working with spectral indices commonly used in remote sensing and earth observation applications. It provides a convenient way to compute various spectral indices using Julia's high-performance capabilities.
## Features 🚀
- Computation for a wide range of spectral indices
- Computation support for `Float64`, `Float32` and `Float16` at index formula level to support fast computation for ML applications
- Support for various data types, including but not limited to (see this [issue](https://github.com/awesome-spectral-indices/SpectralIndices.jl/issues/8) for an updated list and WIP)
- [x] Arrays
- [x] DataFrames
- [x] YAXArrays
- Flexible parameter input options
- Compatibility with multiple remote sensing platforms and sensors## Installation 💻
SpectralIndices.jl is registered in the general registry, please install it using the following:
```julia_repl
julia> ]
pkg> add SpectralIndices
```
or
```julia
using Pkg
Pkg.add("SpectralIndices")
```## Usage 🛠️
You can compute spectral indices either by specifying the index and its parameters or using predefined SpectralIndex instances.
### Using `compute_index`
```julia
using SpectralIndices
using DataFrames# Compute NDVI with direct parameter input
result = compute_index("NDVI", N = 0.643, R = 0.175)# Compute NDVI with direct parameter input and direct NDVI call
result = compute_index(NDVI, N = 0.643, R = 0.175)# Compute multiple indices with array inputs
multi_result = compute_index(["NDVI", "SAVI"], N = fill(0.643, 5), R = fill(0.175, 5), L = fill(0.5, 5))# use Dataframes
df = DataFrame(N = [0.643, 0.560], R = [0.175, 0.225])
result_df_single = compute_index("NDVI", df)
# Multiple inputs in a dataframe
df = DataFrame(N = [0.643, 0.560], R = [0.175, 0.225], L = [0.5, 0.5])
result_df_multiple = compute_index(["NDVI", "SAVI"], df)
```To compute at custom Float precision input the bands at the chosen precision and specify the Float type to the `compute_index` function
```julia
# Compute NDVI with direct parameter input
result = compute_index(Float32, "NDVI", N = Float32(0.643), R = Float32(0.175))
```### Using `compute`
```julia
# Define a SpectralIndex instance# Compute using the instance with keyword arguments
result = compute(NDVI, N = 0.643, R = 0.175) #NDVI is autmatically in namespace with the import of SpectraIndices.jl# Compute with array inputs
array_result = compute(NDVI, N = fill(0.643, (5, 5)), R = fill(0.175, (5, 5)))
```For more advanced usage and detailed documentation, please refer to the documentation.
## Code Structure
![fig1](https://github.com/awesome-spectral-indices/SpectralIndices.jl/assets/10376688/fb680f5a-7130-49fc-ae20-386fed3777ed)
## Contributing 🤝
Contributions to SpectralIndices.jl are welcome! If you would like to contribute, please see our Contribution Guidelines for more information.
## License 📜
SpectralIndices.jl is licensed under the MIT License. See [LICENSE](https://github.com/awesome-spectral-indices/SpectralIndices.jl/blob/main/LICENSE) for more information.
## Acknowledgments ✨
This package is inspired by the [Spyndex](https://github.com/awesome-spectral-indices/spyndex) Python library for spectral indices. The logo is AI-generated by dalle3 through ChatGPT and modified by the talented [David Montero](https://github.com/davemlz).
## Support 🆘
If you have any questions, issues, or feature requests, please open an issue or contact us via email.
## Citation 🔗
If you use SpectralIndices.jl in your research, please consider citing it using the following DOI:
```bibtex
@article{montero2023standardized,
title={A standardized catalogue of spectral indices to advance the use of remote sensing in Earth system research},
author={Montero, David and Aybar, C{\'e}sar and Mahecha, Miguel D and Martinuzzi, Francesco and S{\"o}chting, Maximilian and Wieneke, Sebastian},
journal={Scientific Data},
volume={10},
number={1},
pages={197},
year={2023},
publisher={Nature Publishing Group UK London}
}
```
[![RSC4Earth](https://github.com/davemlz/sen2nbar/raw/main/docs/_static/esds.png)](https://rsc4earth.de/authors/esds/)