Skip to content

YutingYao/openeo-geopyspark-driver

 
 

Repository files navigation

OpenEO Geopyspark Driver

Status Build Status

Python version: 3.6

This driver implements the GeoPySpark/Geotrellis specific backend for OpenEO.

It does this by implementing a direct (non-REST) version of the OpenEO client API on top of GeoPySpark.

A REST service based on Flask translates incoming calls to this local API.

Technology stack

Operating environment dependencies

This backend has been tested with:

  • Something that runs Spark: Kubernetes or YARN (Hadoop), standalone or on your laptop
  • Accumulo as the tile storage backend for Geotrellis
  • Reading GeoTiff files directly from disk or object storage

Public endpoint

https://openeo.vito.be/openeo/

Running locally

Set up your (virtual) environment with necessary dependencies:

# Install Python package and its depdendencies
pip install .[dev] --extra-index-url https://artifactory.vgt.vito.be/api/pypi/python-openeo/simple

# Get necessary jars for Geopyspark
python scripts/get-jars.py

For development, you can run the service:

export SPARK_HOME=$(find_spark_home.py)
export HADOOP_CONF_DIR=/etc/hadoop/conf
export FLASK_DEBUG=1
python openeogeotrellis/deploy/local.py

For production, a gunicorn server script is available: PYTHONPATH=. python openeogeotrellis/server.py

Running on the Proba-V MEP

The web application can be deployed by running: sh scripts/submit.sh This will package the application and it's dependencies from source, and submit it on the cluster. The application will register itself with an NginX reverse proxy using Zookeeper.

Running the unit tests

The unit tests expect that environment variable SPARK_HOME is set, which can easily be done from within your development virtual environment as follows:

export SPARK_HOME=$(find_spark_home.py)
pytest

Run specific test or subset of test: use -k option, e.g. run all tests with "udp" in function name:

pytest -k udp

To disable capturing of print and logging, use something like this:

pytest --capture=no --log-cli-level=INFO

About

OpenEO driver for GeoPySpark (Geotrellis)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.8%
  • Shell 4.6%
  • Jinja 0.6%