Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
FACT Elevation Computer
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 Elevation Computer
Commits
3a7eeb0f
Commit
3a7eeb0f
authored
1 year ago
by
Riccardo Boero
Browse files
Options
Downloads
Patches
Plain Diff
Added docstrings and updated code to new release of service package.
parent
58453cf6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
other/load_server_package.sh
+1
-1
1 addition, 1 deletion
other/load_server_package.sh
other/start.py
+28
-1
28 additions, 1 deletion
other/start.py
with
29 additions
and
2 deletions
other/load_server_package.sh
+
1
−
1
View file @
3a7eeb0f
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
poetry config repositories.gitlab https://git.nilu.no/api/v4/projects/1217/packages/pypi
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
poetry config http-basic.gitlab FACT_token glpat-1zG-TQx___xLsPjj2vsG
poetry add polygonqueryonraster
@0.1.0
--source
gitlab
poetry add polygonqueryonraster
--source
gitlab
This diff is collapsed.
Click to expand it.
other/start.py
+
28
−
1
View file @
3a7eeb0f
from
polygonqueryonraster.app
import
GeoTIFFService
from
polygonqueryonraster.app
import
GeoTIFFService
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
"""
Main execution point for running the GeoTIFFService as a standalone application.
This script initializes and starts the GeoTIFFService with a predefined data directory and port number.
It
'
s designed to be run directly from the command line and is useful for quick setups or testing.
The GeoTIFFService is configured to analyze the GeoTIFF files located in the specified directory.
It sets up a Flask-based web server to listen for incoming requests for geospatial analysis.
Configuration:
- Data Directory: The directory where GeoTIFF files are stored. This should be an absolute path.
- Port Number: The port number on which the Flask web server will run.
- Categorical Analysis: Indicates whether the analysis should be categorical. It
'
s set to
'
false
'
by default.
Example:
When this script is run, it starts the GeoTIFFService on the specified port and ready to process
requests on GeoTIFF files located in the specified data directory.
Usage:
python scriptname.py
Note:
To use this script, ensure that the
'
polygonqueryonraster
'
package is installed and accessible in your
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
=
'
/app/data/aster30m
'
# Specify your local data directory
port_number
=
5000
# Specify the custom port number
port_number
=
5000
# Specify the custom port number
categorical
=
False
# Specify whether the analysis is categorical
service
=
GeoTIFFService
(
directory
=
data_directory
,
port
=
port_number
)
service
=
GeoTIFFService
(
directory
=
data_directory
,
port
=
port_number
,
categorical
=
categorical
)
service
.
run
()
service
.
run
()
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