Skip to content
Snippets Groups Projects
Commit 5a7eb172 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Adapted code to new utils server release.

parent 8f299861
No related branches found
No related tags found
No related merge requests found
FROM python:3.9.16-slim-bullseye
# update system and install required software
RUN apt update && /usr/local/bin/python -m pip install --upgrade pip && pip install poetry
RUN apt update && /usr/local/bin/python -m pip install --upgrade pip && apt install git zip -y
# copy zipped data
COPY data /root/data
......
......@@ -7,7 +7,7 @@ The docker container can be started with the following code:
The service could be queried passing the JSON polygon object as in:
```
curl -X POST http://localhost:5004/band_statistics \
curl -X POST http://localhost:5004/band_statistics/2017 \
-H "Content-Type: application/json" \
-d '{
"polygon_wkt": "POLYGON (())"
......
#!/bin/bash
# it requires zipped geotiff in "data"
apt update
apt install zip -y
echo "*** Unzipping files." # expected number of records in DB:
#for y in {2017..2021}
......
#!/usr/bin/env bash
# initialize project
poetry init
# confif repo
poetry config repositories.gitlab https://git.nilu.no/api/v4/projects/1217/packages/pypi
poetry config http-basic.gitlab FACT_token glpat-1zG-TQx___xLsPjj2vsG
# add package
poetry add polygonqueryonraster --source gitlab
pip install git+https://FACT_token:glpat-1zG-TQx___xLsPjj2vsG@git.nilu.no/fact/utils/polygonqueryonraster.git
......@@ -27,7 +27,7 @@ if __name__ == "__main__":
Python environment. Modify the 'data_directory' and 'port_number' variables as needed for your setup.
"""
data_directory = '/app/data/aster30m' # Specify your local data directory
data_directory = '/root/data' # Specify your local data directory
port_number = 5000 # Specify the custom port number
categorical = False # Specify whether the analysis is categorical
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment