A dedicated QGIS Processing module for G3W-SUITE framework:
.model3
file into G3W-ADMIN.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 ...
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
Activate/deactivate the asynchronous mode running models.
Directory to save the processing outputs. Default '/tmp/'.
Directory to upload the processing inputs. Default same value of QPROCESSING_OUTPUT_PATH.
Default processing output vector format. Default 'geojson'
Default processing output raster format. Default 'tiff'
Default processing output file format. Default 'pdf'
Default processing output html format. Default 'html'
List of input shapefile extensions. Default ['shp', 'shx', 'prj', 'dbf', 'shx']
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'
}
]
List of output vector formats. Default:
[
{
'value': 'zip',
'key': 'Shapefile'
},
{
'value': 'geojson',
'key': 'GeoJSON'
},
{
'value': 'kml',
'key': 'KML'
},
{
'value': 'gpkg',
'key': 'GeoPackage'
},
]
List of output file formats. Default:
[
{
'value': 'pdf',
'key': 'PDF'
},
]
List of output html formats. Default:
[
{
'value': 'html',
'key': 'HTML'
},
]
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'
},
]
Encryption key for download links.
License: MPL-2