Skip to content

agstack/OpenAgri-IrrigationManagement

Repository files navigation

Irrigation service

🇪🇺 "This service was created in the context of OpenAgri project (https://horizon-openagri.eu/). OpenAgri has received funding from the EU’s Horizon Europe research and innovation programme under Grant Agreement no. 101134083."

Description

The OpenAgri Irrigation service provides the calculation of referent evapotranspiration (ETo) as well as the analysis of
the soil moisture of parcels/plots of land.
These functionalities can be used via the REST APIs, which provide these them in a linked data format (using JSON-LD).
This service conforms to the OpenAgri Common Semantic Model (OCSM).

Requirements

  • git
  • docker
  • docker-compose

Docker version used during development: 27.0.3

Installation

There are two ways to install this service, via docker (preferred) or directly from source.

Deploying from source

When deploying from source, use python 3:11.
Also, you should use a venv when doing this.

A list of libraries that are required for this service is present in the "requirements.txt" file.
This service uses FastAPI as a web framework to serve APIs, alembic for database migrations and sqlalchemy for database ORM mapping.

Deploying via docker

After installing docker-compose you can run the following commands to run the application:

docker compose build
docker compose up

A List of APIs

A full list of APIs can be viewed here.

For a more detailed view of the APIs, checkout API.md.

Quick Start Guide

Evapotranspiration (ETo) Workflow

  • Register your location: Use POST /api/v1/location/ or POST /api/v1/location/parcel-wkt/ to register single or multiple parcels. The system automatically fetches weather data daily at midnight.

  • Retrieve ETo Calculations: Call POST /api/v1/eto/get-calculations/{location_id} to get ETo calculations for your registered location across available dates.

Soil Moisture Analysis

  • Upload Dataset: Use POST /api/v1/dataset/ to upload your soil moisture data.

  • Manage Your Data: Use GET /api/v1/dataset/ to fetch all datasets. To fetch full dataset use GET /api/v1/dataset/{dataset_id}, and for removing it use DELETE /api/v1/dataset/{dataset_id}.

  • Generate Analysis: Call GET /api/v1/dataset/{dataset_id}/analysis to get detailed soil moisture analysis from your uploaded dataset.

Contribution

Please contact the maintainer of this repository.

License

This project code is licensed under the EUPL 1.2 license, see the LICENSE file for more details. Please note that each service may have different licenses, which can be found their specific source code repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages