Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Land Use Land Cover
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FACT
FACT Data Services
FACT Land Use Land Cover
Commits
5a7eb172
Commit
5a7eb172
authored
1 year ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Adapted code to new utils server release.
parent
8f299861
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Dockerfile
+1
-1
1 addition, 1 deletion
Dockerfile
README.md
+1
-1
1 addition, 1 deletion
README.md
other/install_data.sh
+0
-4
0 additions, 4 deletions
other/install_data.sh
other/load_server_package.sh
+1
-9
1 addition, 9 deletions
other/load_server_package.sh
other/start.py
+1
-1
1 addition, 1 deletion
other/start.py
with
4 additions
and
16 deletions
Dockerfile
+
1
−
1
View file @
5a7eb172
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
poetr
y
RUN
apt update
&&
/usr/local/bin/python
-m
pip
install
--upgrade
pip
&&
apt
install
git zip
-
y
# copy zipped data
COPY
data /root/data
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
5a7eb172
...
...
@@ -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 (())"
...
...
This diff is collapsed.
Click to expand it.
other/install_data.sh
+
0
−
4
View file @
5a7eb172
#!/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}
...
...
This diff is collapsed.
Click to expand it.
other/load_server_package.sh
+
1
−
9
View file @
5a7eb172
#!/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
This diff is collapsed.
Click to expand it.
other/start.py
+
1
−
1
View file @
5a7eb172
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment