Installation¶
The Brazil Data Cube STAC implementation depends essentially on Flask, SQLAlchemy, JSONSchema and the Brazil Data Cube Database Module.
Development Installation¶
Clone the software repository:
$ git clone https://github.com/brazil-data-cube/bdc-stac.git
Go to the source code folder:
$ cd bdc-stac
Install in development mode:
$ pip3 install -e .[all]
Generate the documentation:
$ python setup.py build_sphinx
The above command will generate the documentation in HTML and it will place it under:
doc/sphinx/_build/html/
Running in Development Mode¶
In the source code folder, enter the following command:
$ FLASK_APP="bdc_stac" \
FLASK_ENV="development" \
DB_HOST="localhost:5432" \
DB_USER="postgres" \
DB_PASS="secret" \
DB_NAME="bdcdb" \
BASE_URI="http://localhost:5000" \
API_VERSION="0.8.0" \
FILE_ROOT="http://localhost:5001" \
flask run
You may need to replace the definition of some environment variables:
DB_HOST="localhost:5432": set the database host address that will be used by the STAC service.
DB_USER="postgres": the user name for connecting to the database server.
DB_PASS="secret": the user password for connecting to the database server.
DB_NAME="bdcdb": the name of the database containing the image and data cube collections 1.
BASE_URI="http://localhost:8080": Base URI of the service.
API_VERSION="0.8.0": STAC Version used in the service.
FILE_ROOT="http://localhost:8081": File root for the Assets.
Footnotes
- 1
Make sure you have a database prepared with the schema for Image and Data Cube collections from the Brazil Data Cube Database Module