G3W-ADMIN plugin for use the processing features of QGIS application-
Project description
G3W-ADMIN-QPROCESSING v1.3.0-beta.0
A dedicated QGIS Processing module for G3W-SUITE framework:
- upload a
.model3file into G3W-ADMIN. - get QGIS Processing tools available within G3W-CLIENT.
Supported features
QGIS Processing Inputs:
- VectorLayer → QgsProcessingParameterVectorLayer
- VectorFeatures → QgsProcessingParameterFeatureSource
- VectorField → QgsProcessingParameterField
- RasterLayer → QgsProcessingParameterRasterLayer
- Distance → QgsProcessingParameterDistance
- DateTime → QgsProcessingParameterDateTime
- Boolean → QgsProcessingParameterBoolean
- Range → QgsProcessingParameterRange
- Number → QgsProcessingParameterNumber
- Extent → QgsProcessingParameterExtent
QGIS Processing Outputs:
- VectorLayer → QgsProcessingOutputVectorLayer
- RasterLayer → QgsProcessingOutputRasterLayer
Installation
Install qprocessing module into g3w-admin applications folder:
# Install module from github (v1.0.0)
pip3 install git+https://github.com/g3w-suite/g3w-admin-processing.git@v1.0.0
# Install module from github (dev branch)
# pip3 install git+https://github.com/g3w-suite/g3w-admin-processing.git@dev
# Install module from local folder (git development)
# pip3 install -e /g3w-admin/plugins/qprocessing
# Install module from PyPi (not yet available)
# pip3 install g3w-admin-processing
Enable 'qprocessing' module adding it to G3W_LOCAL_MORE_APPS list:
# local_settings.py
G3WADMIN_LOCAL_MORE_APPS = [
...
'qprocessing'
...
]
Refer to g3w-suite-docker repository for more info about running this on a docker instance.
NB On Ubuntu Jammy you could get an UNKNOWN package install instead of g3w-admin-processing, you can retry installing it as follows to fix it:
# Fix: https://github.com/pypa/setuptools/issues/3269#issuecomment-1254507377
export DEB_PYTHON_INSTALL_LAYOUT=deb_system
# And then install again the module
pip3 install ...
Configuration
By default Qprocessing works sin synchronous mode
To make QProcessing works in asynchronous mode (in batch mode) you need set setting QPROCESSING_ASYNC_RUN TO True and Huey and have a message broker such as Redis, here it is an example:
QPROCESSING_ASYNC_RUN = True
HUEY = { # Huey implementation to use.
'huey_class': 'huey.RedisExpireHuey',
'name': 'g3w-suite',
'url': 'redis://localhost:6379/?db=0',
'immediate': False, # If True, run synchronously.
'consumer': {
'workers': 1,
'worker_type': 'process',
},
}
Then start huey:
python3 manage.py tun_huey -k process
Other settings:
QPROCESSING_ASYNC_RUN
Activate/deactivate the asynchronous mode running models.
QPROCESSING_OUTPUT_PATH
Directory to save the processing outputs. Default '/tmp/'.
QPROCESSING_INPUT_UPLOAD_PATH
Directory to upload the processing inputs. Default same value of QPROCESSING_OUTPUT_PATH.
QPROCESSING_OUTPUT_VECTOR_FORMAT_DEFAULT
Default processing output vector format. Default 'geojson'
QPROCESSING_OUTPUT_RASTER_FORMAT_DEFAULT
Default processing output raster format. Default 'tiff'
QPROCESSING_OUTPUT_FILE_FORMAT_DEFAULT
Default processing output file format. Default 'pdf'
QPROCESSING_OUTPUT_HTML_FORMAT_DEFAULT
Default processing output html format. Default 'html'
QPROCESSING_INPUT_SHP_EXTS
List of input shapefile extensions. Default ['shp', 'shx', 'prj', 'dbf', 'shx']
QPROCESSING_INPUT_UPLOAD_VECTOR_FORMATS
List of input vector formats to upload. Default:
[
{
'value': 'zip',
'key': 'Shapefile'
},
{
'value': 'geojson',
'key': 'GeoJSON'
},
{
'value': 'kml',
'key': 'KML'
},
{
'value': 'gpkg',
'key': 'GeoPackage'
},
{
'value': 'sqlite',
'key': 'Sqlite/Spatialite'
}
]
QPROCESSING_OUTPUT_VECTOR_FORMATS
List of output vector formats. Default:
[
{
'value': 'zip',
'key': 'Shapefile'
},
{
'value': 'geojson',
'key': 'GeoJSON'
},
{
'value': 'kml',
'key': 'KML'
},
{
'value': 'gpkg',
'key': 'GeoPackage'
},
]
QPROCESSING_OUTPUT_FILE_FORMATS
List of output file formats. Default:
[
{
'value': 'pdf',
'key': 'PDF'
},
]
QPROCESSING_OUTPUT_HTML_FORMATS
List of output html formats. Default:
[
{
'value': 'html',
'key': 'HTML'
},
]
QPROCESSING_OUTPUT_RASTER_FORMATS
List of output raster formats. Default:
[
{
'value': 'vrt',
'key': 'VRT'
},
{
'value': 'tiff',
'key': 'TIFF'
},
{
'value': 'png',
'key': 'PNG'
},
{
'value': 'jpeg',
'key': 'JPEG'
},
{
'value': 'jpg',
'key': 'JPG'
},
]
QPROCESSING_CRYPTO_KEY
Encryption key for download links.
License: MPL-2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file g3w_admin_processing-1.2.1b1.dev1.tar.gz.
File metadata
- Download URL: g3w_admin_processing-1.2.1b1.dev1.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c2ca54ad5028595659e0656cfc81fac60fdc3ca7975da8439f17d638608b5e
|
|
| MD5 |
d1cef3372d684326bb468f92f9392c61
|
|
| BLAKE2b-256 |
c529e59c404a12a302f4c8b5c42e401d446b4b980c36b0009b4bfd5dc3ff0f16
|
File details
Details for the file g3w_admin_processing-1.2.1b1.dev1-py3-none-any.whl.
File metadata
- Download URL: g3w_admin_processing-1.2.1b1.dev1-py3-none-any.whl
- Upload date:
- Size: 129.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e90090e8b8c1fe4f5855aef25ecda1abf87e7f5fea486c1471c2be758b3648a0
|
|
| MD5 |
fd1268cb3e760b1429c6a3fd7f4f7891
|
|
| BLAKE2b-256 |
e32e536460ee7b9006efa5e7cb4e78960e2bd13c43eda6b41041cc58f38ce9e7
|