https://github.com/open-eo/openeo-julia-client
The Julia client for openEO
https://github.com/open-eo/openeo-julia-client
Last synced: about 1 year ago
JSON representation
The Julia client for openEO
- Host: GitHub
- URL: https://github.com/open-eo/openeo-julia-client
- Owner: Open-EO
- License: apache-2.0
- Created: 2023-05-16T20:57:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T11:31:32.000Z (over 1 year ago)
- Last Synced: 2025-01-25T11:42:36.133Z (over 1 year ago)
- Language: Julia
- Homepage:
- Size: 1.8 MB
- Stars: 9
- Watchers: 6
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# OpenEOClient.jl
[](https://Open-EO.github.io/openeo-julia-client/stable/)
[](https://open-eo.github.io/openeo-julia-client/dev/)
[](https://github.com/Open-EO/openeo-julia-client/actions/workflows/CI.yml?query=branch%3Amain)
A Julia client for [openEO](https://openeo.org/) to access big Earth observation cloud back-ends in a simple and unified way.
## Important Note
This project is currently under intensive development.
The API is not considered stable yet.
There may be errors in some outputs.
We do not take any warranty for that.
Please test this package with caution.
Bug reports and feature requests are welcome.
Please create a [new issue](https://github.com/Open-EO/openeo-julia-client/issues/new) for this.
## Get Started
Install the package using:
```julia
using Pkg
Pkg.add(url="https://github.com/Open-EO/openeo-julia-client.git")
```
Connect to an openEO backend server and list available collections of raster image datasets:
```julia
using OpenEOClient
con = connect("openeo.dataspace.copernicus.eu/openeo", "")
con.collections
# 8-element Vector{OpenEOClient.Collection}:
# SENTINEL3_OLCI_L1B: Sentinel 3 OLCI
# SENTINEL3_SLSTR: Sentinel 3 SLSTR
# SENTINEL_5P_L2: Sentinel 5 Precursor
# SENTINEL2_L1C: Sentinel-2 L1C
# SENTINEL2_L2A: Sentinel-2 L2A
# SENTINEL1_GRD: Sentinel-1 SAR GRD: C-band Synthetic Aperture Radar Ground Range Detected.
# COPERNICUS_30: Copernicus Global 30 meter Digital Elevation Model dataset.
# LANDSAT8_L2: Landsat 8 level 2 ARD, European Coverage
```
Further computations require a free registration at an openEO backend.
Here, we use the [Copernicus Data Space](https://dataspace.copernicus.eu).
Calculate the enhanced vegetation index (EVI) analog to this [tutorial](https://documentation.dataspace.copernicus.eu/APIs/openEO/Python_Client/Python.html):
```julia
using OpenEOClient
using Statistics
con = connect("openeo.dataspace.copernicus.eu/openeo", "", OpenEOClient.oidc_auth)
cube = DataCube(con, "SENTINEL2_L2A",
BoundingBox(west=5.14, south=51.17, east=5.17, north=51.19),
("2021-02-01", "2021-02-10"), ["B02", "B04", "B08"]
)
blue = cube["B02"] * 0.0001
red = cube["B04"] * 0.0001
nir = cube["B08"] * 0.0001
evi = @. 2.5 * (nir - red) / (nir + 6.0 * red - 7.5 * blue + 1.0)
mean_evi = mean(evi, dims = "t")
#openEO DataCube
# collection: SENTINEL2_L2A
# dimensions: ["x", "y"]
# bands: Unknown
# spatial extent: nothing
# temporal extent: nothing
# license: proprietary
# connection: https://openeo.dataspace.copernicus.eu/openeo/
```
Up to now, the analysis workflow is just being constructed on the client.
It can be executed on the server using `compute_result(mean_evi)` which returns the file name of the downloaded result.
## Funding
This project was supported by the ESA Network of Resources Initiative.