Welcome to G3W-SUITE 3.4 documentation!¶
G3W-SUITE is a frame-work, based on Django and written in Python language, which allows to manage in an integrated way the different components of QGIS for the realization of its own Geographic Information System and for the publication on WebGis of its own projects in a simple and intuitive way.
G3W-SUITE is entirely based on tested Open Source software components built around QGIS:
QGIS Desktop: for cartographic data management, editing and realization of high quality graphic projects
QGIS Server: for the publication of QGIS projects as OGC services
The current development policy provides for the compatibility of the G3W-SUITE application only with the latest LTR version of QGIS
The current release (3.4) is compatible with QGIS 3.22 LTR (Server and Desktop).
G3W-SUITE is a modular client-server application for the publication and management of QGIS cartographic projects, consisting of 3 components:
G3W-ADMIN: Administration component (project management, ACL, OGC proxy server, API rest server)
G3W-CLIENT: Cartographic client for consultation and interaction with OGC services
Front-end geographic portal: access to information, thematic groups and WebGis services
Through the web interface of the G3W-SUITE framework it is possible to:
publish QGIS projects directly on WebGis in a structured way
organize webgis services in thematic-functional containers of various levels
manage users and groups of users by defining each of them different functional roles
create and manage research methods
allow online editing
activate specific functional modules
define permissions to access services and to use functional modules at the individual user level


Raw installation¶
The following instructions are for a Ubuntu 18.04 LTS.
Installation of node.js and Yarn¶
G3W-ADMIN use javacript package manager Yarn and Node.js
sudo apt-get install -y nodejs-legacy npm
for install Yarn follow main installation instructions:
https://yarnpkg.com/en/docs/install#debian-stable
note
If your account is connected to the provider, we’ll try to setup the webhook automatically. If something fails, you can still setup the webhook manually.
Create virtualenv¶
The following instructions are for python 3.6
Install python pip
sudo apt-get install python3-pip
now we can install virtualenvwrapper
sudo pip3 install virtualenvwrapper
To activate virtuenvwrapper on system login, add follow lines to ‘bashrc’ config file of your user
nano ~/.bashrc
....
export WORKON_HOME=<path_to_virtualenvs_directory>
source /usr/local/bin/virtualenvwrapper.sh
Virtualenv creation¶
To create a virtualnenv is sufficent call mkvirtualenv commando follow by the identification name for virtualenv (to use QGIS API into a virtualenv only solution is to give access python system site-packages to it using –system-site-packages option)
mkvirtualenv g3wsuite
Install G3W-SUITE¶
First step is install dev libraries packages for python module to install with requiriments.txt
sudo apt-get install -y \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python-dev
after is necessary install the correct python module for GDAL library, check your version and install correct module
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install GDAL==<installed_version or closest>
Set local_config.py file¶
G3W-ADMIN is a Django application, and to work is necessary set a config.py file. To start copy local_settings.example.py and set the databse and other:
cd g3w-admin/g3w-admin/base/settings
cp local_settings_example.py local_settings.py
set database, media root and session cookies name:
...
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': '<db_name>',
'USER': '<db_user>',
'PASSWORD': '<db_user_password>',
'HOST': '<db_host>',
'PORT': '<db_port>',
}
}
...
DATASOURCE_PATH = '<static_path_to_gis_data_source>'
...
MEDIA_ROOT = '<path_to_media_root>'
...
SESSION_COOKIE_NAME = '<unique_session_id>'
With paver commands¶
G3W-ADMIN has a series of paver CLI commands to administrate the suite. After prepared environment if sufficient invoce paver install task
paver install
Run G3W-SUITE¶
To run the application with paver
paver start
and for stop
paver stop
G3W-ADMIN is a django application so is possibile run app by standard django manage.py commands
./manage.py runserver
Deploy G3W-SUITE¶
As other Django application, G3W-SUITE can be deployed by its wsgi capabilities. On the web if simple to find tutorial for deploy a Django application.
The simpler way is to use Apache2 as server WEB and its mod_wsgi module.
Alternative solutions are:
Manual installation steps¶
The preferred installation is by using the paver
script as mentioned above, but in case you need to customize the installation process, here are the build and setup steps:
Build static js code¶
# Install yarn (requires root):
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
tee /etc/apt/sources.list.d/yarn.list
apt-get update && sudo apt install -y yarn
# Back to unprivileged user, from the repository directory, run:
yarn --ignore-engines --ignore-scripts --prod
nodejs -e "try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'g3w-admin/core/static/bower_components', 'junction') } catch (e) { }"
Make sure build components are available in static and collected later
cd g3w-admin/core/static
ln -s "../../../node_modules/@bower_components" bower_components
Django setup¶
python manage.py collectstatic --noinput
python manage.py migrate --noinput
Install some fixtures for EPSG and other suite options:
for FIXTURE in 'BaseLayer.json' 'G3WGeneralDataSuite.json' 'G3WMapControls.json' 'G3WSpatialRefSys.json'; do
python manage.py loaddata core/fixtures/${FIXTURE}
done
Sync menu tree items (re-run this command in case you installed optional modules and they are not visible in the admin menu tree):
python manage.py sitetree_resync_apps
Continuous integration testing¶
CI tests are automatically run on CircleCI for the dev
branch only.
The Docker compose configuration used in the CI tests is available at docker-compose.yml.
Another configuration for running local tests is provided with docker-compose-local.yml and can also be used for local testing by running:
docker-compose -f docker-compose-local.yml up
The testing image is built from the dependency image and it will run all install and build steps from the local repository.
The dependency image is built from the Dockerfile.deps.
Dockerization¶
This repository contains scripts and recipes for deploy of the G3W-SUITE web-gis application with Docker and Docker compose .
Deploy¶
Follow steps to deploy G3W-SUITE on a Ubuntu Server (20.04)
Configuration¶
Create a file .env
(or copy .env.example
and rename it in .env
) and place it in the main directory, the file
will contain the database credentials (change <your password>
) and other settings:
# External hostname, for docker internal network aliases
WEBGIS_PUBLIC_HOSTNAME=demo.g3wsuite.it/
# This volume is persistent and mounted by all
# containers as /shared-volume
WEBGIS_DOCKER_SHARED_VOLUME=/tmp/shared-volume-g3w-suite
# DB setup
G3WSUITE_POSTGRES_USER_LOCAL=g3wsuite
G3WSUITE_POSTGRES_PASS=<your_password>
G3WSUITE_POSTGRES_DBNAME=g3wsuite
G3WSUITE_POSTGRES_HOST=postgis
G3WSUITE_POSTGRES_PORT=5432
Description of other environment variables that can be used, are available on Docker environment variables
G3W-SUITE with consumer image¶
G3W-SUITE use huey
for bach processing (https://github.com/coleifer/huey), so if you want to use it,
use docker-compose-consumer.yml
file on deploy:
docker-compose -f docker-compose-consumer.yml up -d
Builds¶
Docker compose will download images from docker hub (https://hub.docker.com/u/g3wsuite), but is also possible build main image of G3W-SUITE and other docker-compose images.
G3W-SUITE¶
The main suite docker image can be built with:
docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite:dev --no-cache .
The image is build from https://github.com/g3w-suite/g3w-admin.git --branch dev
and from a dependencies base image Dockerfile.g3wsuite-deps.ltr.dockerfile
, the dependencies image can be built with:
docker build -f Dockerfile.g3wsuite-deps.ltr.dockerfile -t g3wsuite/g3w-suite-deps-ltr:dev --no-cache .
Usually is sufficient make build of main docker image g3wsuite/g3w-suite:dev, the build of dependence image g3wsuite/g3w-suite-deps-ltr:dev is done to update last QGIS LTR version.
Postgis¶
Postgis image can be built with:
docker build -f Dockerfile.postgis.dockerfile -t g3wsuite/postgis:11.0-2.5 .
The Docker hub name for this image is g3wsuite/postgis:11.0-2.5
Setups¶
PG_SERVICE¶
To use of PostgreSql Service, put your service setups into ./scripts/pg_service.conf file
,
the conf file will be mounted into docker container at runtime to PGSERVICEFILE path position.
HTTPS additional setup¶
To active https with LetsEncrypt just follow the following instructions:
move
config/_nginx/django_ssl.conf
toconfig/nginx/django_ssl.conf
check the domain name in the
.env
file and inconfig/nginx/django_ssl.conf
run:
docker pull certbot/certbot
launch
./run_certbot.sh
activate 301 redirect into
config/nginx/django.conf
restart compose
make sure the certs are renewed by adding a cron job with
crontab -e
and add the following line:0 3 * * * /<path_to_your_docker_files>/run_certbot.sh
if you disabled HTTPS, you can move
config/nginx/django_ssl.conf
back to its original location now, and restart the Docker compose to finally enable HTTPS
Volumes¶
Data, projects, uploads and the database are stored in a shared mounted volume shared-volume
, the volume should be on a persistent storage device and a backup
policy must be enforced.
Currently, the volume is mounted in /tmp/shared-volume-g3wsuite-dev
. In production
environments it is encouraged to change this to a permanent location.
This can be done by modifying the .env
file.
First time setup¶
log into the application web administation panel using default credentials (admin/admin)
change the password for the admin user and for any other example user that may be present
Caching¶
Tile cache can be configured and cleared per-layer through the webgis admin panel and lasts forever until it is disabled or cleared.
Tip: enable cache on linestring and polygon layers.
Editing¶
Editing module is active by default, to avoid simultaneous feature editing by two or more users, the editing module works with a feature lock system. This locking system can remain active if users do not exit the editing state correctly, to avoid this it is advisable to activate a cron job on host machine that checks the features that have been locked for more than 4 hours and frees them:
0 */1 * * * docker exec -e DISPLAY=:99 g3w-suite-docker_g3w-suite_1 python3 /code/g3w-admin/manage.py check_features_locked
Front-end App¶
Set the environment variable
FRONTEND=True
This will set the front end app as the default app
Style customization¶
Templates can now be overridden by placing the overrides in the config/g3w-suite/overrides/templates
, a Docker service restart is required to make the changes effective.
The logo is also overridden (through config/g3w-suite/settings_docker.py
which is mounted as a volume), changes to the settings file require the Docker service to be restarted.
A custom CSS is added to the pages, the file is located in config/g3w-suite/overrides/static/style.css
and can be modified directly, changes are effective immediately.
Performances optimization¶
General rules (in no particular order: they are all mandatory):
set scale-dependent visibility for the entire layer or for some filtered features (example: show only major roads until at scale 1:1E+6)
when using rule-based/categorized classification or scale-dependent visibility create indexes on the column(s) involved in the rule expression (example: “create index idx_elec_penwell_ious on elec_penwell_ious (owner);” )
start the project with only a few layers turned on by default
do not turn on by default base-layers XYZ such as (Google base maps)
do not use rule-based/categorized rendering on layers with too many categories (example: elec_penwell_public_power), they are unreadable anyway
enable redering simplification for not-point layers, set it to
Distance
1.2
and checkEnable provider simplification if available
PostgreSQL administration¶
Postgres is running into a Docker container, in order to access the container, you can follow the instruction below:
Check the container name¶
$ docker ps | grep postgis
84ef6a8d23e6 g3wsuite/postgis:11.0-2.5 "/bin/sh -c /docker-…" 2 days ago Up 2 days 0.0.0.0:5438->5432/tcp g3wsuitedocker_postgis_1
In the above example the container name is g3wsuitedocker_postgis_1
Log into the container¶
$ docker exec -it g3wsuitedocker_postgis_1 bash
Become postgres user¶
root@84ef6a8d23e6:/# su - postgres
Connect to postgis¶
postgres@84ef6a8d23e6:~$ psql
psql (11.2 (Debian 11.2-1.pgdg90+1))
Type "help" for help.
postgres=#
Portainer¶
Portainer(https://www.portainer.io) is a software for build and manage Docker environments in an easy and graphical way.
For Portainer use docker-compose-portainer.yml
file and in plus of env vars before, set the follow mandatory env vars:
G3WSUITE_DOCKER_INSTALL_DIR: host directory where this code is.
PG_PUBLIC_PORT: host port to map Docker PostgreSql default port (5432).
WEBGIS_HTTP_PORT: host port to map Docker Nginx port (8080).
WEBGIS_HTTPS_PORT: host port to map Docker Nginx port (443).
Contributors¶
Walter Lorenzetti - Gis3W (@wlorenzetti)
Alessandro Pasotti - ItOpen (@elpaso)
Mazano - Kartoza (@NyakudyaA)
Docker environment variables¶
The following environment variables used to deploy G3W-SUITE by docker (https://github.com/g3w-suite/g3w-suite-docker).
They must added to .env
deploy file.
Requirements variables¶
WEBGIS_PUBLIC_HOSTNAME
¶
The domain to which the application will respond.
G3WSUITE_POSTGRES_USER_LOCAL
¶
Database username to connect to G3W-SUITE database. If you are going to use docker postgis image, it’ll be created on first run of container.
G3WSUITE_POSTGRES_PASS
¶
Database username password to connect to G3W-SUITE database. If you are going to use docker postgis image, it’ll be created on first run of container.
G3WSUITE_POSTGRES_DBNAME
¶
Database name of G3W-SUITE database connect to. If you are going to use docker postgis image, it’ll be created on first run of container.
G3WSUITE_POSTGRES_HOST
¶
Database host value connect to. If you are going to use docker postgis image, it’ll be set to postgis
G3WSUITE_POSTGRES_PORT
¶
Database port value connect to. If you are going to use docker postgis image, it’ll be set to 5432
Other not required settings¶
TILESTACHE_CACHE_TOKEN
¶
A custom unique token to use for internal caching request. Default value is : 374h5g96831hsgetvmkdel.
TILESTACHE_CACHE_BUFFER_SIZE
¶
Tile width/height tile map dimension. Default value is: 256.
G3WSUITE_TILECACHE_PATH
¶
Internal path to folder to save tiles of map. Dafault value is: /shared-volume/tile_cache/.
Gunicorn settings¶
G3W-SUITE with docker is deployed with Gunicorn.
G3WSUITE_GUNICORN_NUM_WORKERS
¶
Number of workers Gunicorn has to start with. Default: 8. Usually then number of workers is equal to number of processor x 2.
G3WSUITE_GUNICORN_MAX_REQUESTS
¶
Number of requests after that gunicorn worker restart. Default: 200. Thi is used to compensate the python/gunicorn memory leaks.
QGIS server variables¶
Every QGIS environment variables available as specified on manual https://docs.qgis.org/3.22/en/docs/server_manual/config.html#environment-variables can be set, important is remember to add thy to docker-compose.yml o docker-compose-consument.yml.
The following varaible are just set into docker-compose files:
PGSERVICEFILE
¶
Put your pg services into ./scripts/pg_service.conf file, the conf file will be mounted into docker container at runtime to PGSERVICEFILE path position.
QGIS_SERVER_LOG_FILE
¶
ORS_API_ENDPOINT
¶
Openrouteservice API end point. Default: ‘https://api.openrouteservice.org/v2’.
ORS_API_KEY
¶
Openrouteservice API key Optional, can be blank if the key is not required by the endpoint
ORS_MAX_RANGES
¶
Max number of ranges (it depends on the server configuration) Default: 6.
ORS_MAX_LOCATIONS
¶
Max number of locations(it depends on the server configuration) Default: 2.
Frontend module¶
FRONTEND
¶
If true install and activate G3W-SUITEfrontend module https://github.com/g3w-suite/g3w-admin-frontend
Settings¶
The following variables can be added to or edited in the project’s local_settings.py
:
Base settings¶
G3WADMIN_PROJECT_APPS
¶
Custom django map server module other than qdjango (QGIS-Server provider)
G3WADMIN_LOCAL_MORE_APPS
¶
Custom django modules that is possible to add, i.e. g3w-admin-frontend
(https://github.com/g3w-suite/g3w-admin-frontend) module and other third part django modules.
G3W-SUITE accessory modules:
g3w-admin-frontend
(https://github.com/g3w-suite/g3w-admin-frontend)
caching
filemanager
editing
DATASOURCE_PATH
¶
Path to geo data directory (shp, Spatialite, raster, etc..).
G3WFILE_FORM_UPLOAD_FORMATS
¶
List of formats file that file form ajax uploader can manage at global level. Default is [‘qgs’, ‘qgz’, ‘png’, ‘jpg’, ‘jpeg’, ‘pdf’, ‘doc’, ‘docx’, ‘xls’, ‘xlsx’, ‘ods’]
Important
Last part of path could be common with QGIS project datasource path. I.e.:
QGIS project: <datasource>/<path>/<to>/project_data/<geodata>.shp</datasource>
local_settings.py: DATASOURCE_PATH = /<local_server_<path>/<to>/project_data
Mandatory.
G3WADMIN_VECTOR_LAYER_DOWNLOAD_FORMATS
¶
- Default is [‘shp’, ‘xls’], set download data format. Values possible:
shp: download into Esri Shape format.
xls: download into Excel format
gpx: download into GPS format (only for Point and Line layers)
RESET_USER_PASSWORD
¶
Default is False, set tot True to activate reset user password by email workflow. If set to True remember to set Django emailing settings (https://docs.djangoproject.com/en/2.2/topics/email/).
CLIENT_OWS_METHOD
¶
Default is ‘GET’, set to ‘POST’ to change default http call method.
Frontend portal setting¶
FRONTEND
¶
Default is False
, set to True
for activate G3W-SUITE frontend portal like g3w-admin-frontend
.
If it’s set to True
base url path for G3W-SUITE admin section become /admin/.
FRONTEND_APP
¶
Module name added to G3WADMIN_LOCAL_MORE_APPS
to use as portal-frontend. I.e.:
G3WADMIN_LOCAL_MORE_APPS = [
...
'frontend',
...
]
FRONTEND = True
FRONTEND_APP = 'frontend'
General layout settings¶
G3WSUITE_POWERD_BY
¶
Default is True
, set to False
for don’t show bottom attribution informations.
G3WSUITE_CUSTOM_STATIC_URL
¶
A custom url from to load custom static files as images, css, etc..
G3WSUITE_MAIN_LOGO
¶
Main admin section logo image.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_RID_LOGO
¶
Main admin section reduced logo image.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_LOGIN_LOGO
¶
Login logo image.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_CUSTOM_TITLE
¶
G3W-SUITE html page title. If is not set, title is: g3w-admin for admin section and g3w-client for webgis client.
G3WSUITE_FAVICON
¶
Favorite icon image.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
G3WSUITE_CUSTOM_CSS
¶
A list of custom css files added to admin pages and to the client.
Mandatory is set G3WSUITE_CUSTOM_STATIC_URL
.
I.e.:
G3WSUITE_CUSTOM_CSS = [
G3WSUITE_CUSTOM_STATIC_URL +'css/custom.css'
]
Client layout settings¶
G3W_CLIENT_SEARCH_TITLE
¶
Custom webgis client search section title.
G3W_CLIENT_SEARCH_ENDPOINT
¶
- Search url endpoint for ‘searches calling’, default ows.
ows: by wms search;
api: by g3w-suite layer vector API.
G3W_CLIENT_HEADER_CUSTOM_LINKS
¶
A list of dict of custom links to add into main top bar of webgis client. I.e.:
G3W_CLIENT_HEADER_CUSTOM_LINKS = [
{
'url': 'https://gis3w.it',
'title': 'Gis3W company',
'i18n', True, #(False as default value)
'target': '_blank'
'img': 'https://gis3w.it/wp-content/uploads/2016/10/logo_qgis-1-100x100.png?x22227'
},
{
'title': 'Modal 1',
'content': '<p>Html example content to show in modal</p>',
'type': 'modal',
'position': 10
},
]
i18n (optional) set True if you want lent client try to translate title.
G3W_CLIENT_LEGEND
¶
A dict to customize QGIS-server legend image generate with WMS GetLegendGraphics request. I.e.:
G3W_CLIENT_LEGEND = {
'color': 'red',
'fontsize': 8,
'transparent': True,
'boxspace': 4,
'layerspace': 4,
'layertitle': True,
'layertitlespace': 4,
'symbolspace': None,
'iconlabelspace': 2,
'symbolwidth': 8,
'symbolheight': 4
}
G3W_CLIENT_RIGHT_PANEL
¶
Custom properties settings for webgis right panel section (default, width 33%). A the moment only width is managed. I.e.:
G3W_CLIENT_RIGHT_PANEL = {
'width': 33
}
G3W_CLIENT_NOT_SHOW_EMPTY_VECTORLAYER
¶
Default is False
. Set to True
for remove from webgis TOC vector layer empty, without data.
Editing settings¶
Settings params for editing
module.
EDITING_SHOW_ACTIVE_BUTTON
¶
Default is True
. Set to False
for not show editing button activate/deactivate into layers project list.
EDITING_ANONYMOUS
¶
Default is False
. Set to True
to render possible give to anonymous user editing permissions.
EDITING_LOGGING
¶
Default is False
. Set to True
to log users editing action into database.
Caching settings¶
Settings params for caching
module
TILESTACHE_CACHE_NAME
¶
A name to identify caching
TILESTACHE_CACHE_TYPE
¶
Default is Disk
to save tile on a disk. Set to Memcache
for to use Memcached caching framework (https://www.memcached.org/)
TILESTACHE_CACHE_DISK_PATH
¶
Path to disk space where to save tile created by tilestache if TILESTAHCE_CACHE_TYEPE
is se to Disk
.
TILESTACHE_CACHE_TOKEN
¶
Mandatory, strign to use as token for internal WMS call for caching module.
Filemanger settings¶
Settings params for filemanager
module.
FILEMANAGER_ROOT_PATH
¶
Mandatory, path to disk space where to CRUD geo data files i.e. Shp Raster, etc.
FILEMANAGER_MAX_UPLOAD_N_FILES
¶
Default is 5, max number files to upload simultaneously.
Qplotly settings¶
LOAD_QPLOTLY_FROM_PROJECT
¶
Default is False
, set to True
to import DataPlotly settings from QGIS project.
Openrouteservice settings¶
ORS_API_ENDPOINT
¶
Default is http://localhost:8080/ors/v2/
, this is the endpoint for Openrouteservice API.
ORS_API_KEY
¶
Openrouteservice API key, optional, can be blank if the key is not required by the endpoint.
ORS_PROFILES
¶
List of available Openrouteservice profiles, default: ("driving-car", "driving-hgv")
Introduction¶
G3W-SUITE is a modular client-server application for the management and publication of interactive map projects.
The framework was born from the need to have a software capable of publishing, in total autonomy and in a simple and fast way on a webgis client, cartographic projects realized with QGIS.
The following aspects will be analyzed within the manual:
organization and optimization of data and QGIS projects for web publishing
organization of cartographic contents in a hierarchical way: macro groups and cartographic groups
user management and access control systems for consultation and management of webgis services
management of the online editing function for the creation of web cartographic management systems
publishing and managing QGIS projects as WebGis services
creation of searches, visualization of graphics created with the DataPlotly plugin and definition of constraints (geographic and alphanumeric) on visualization and editing permissions
The current release (3.4) is compatible with QGIS 3.22.x LTR
(Server and Desktop).
Version¶
At the moment it’s not used a classic versioning system for the suite, this branches are avialable.
Branch | Python version | Django version | QGIS | QGIS API | Status |
---|---|---|---|---|---|
dev | 3.6 | 2.2 | 3.22 | Used | Continuous development |
v3.4 | 3.6 | 2.2 | 3.22 | Used | Bug fixing |
v3.3 | 3.6 | 2.2 | 3.16 | Used | Bug fixing |
v3.2 | 3.6 | 2.2 | 3.16 | Used | Not longer supported |
v3.1 | 3.6 | 2.2 | 3.10 | Used | Not longer supported |
v3.0 | 3.6 | 2.2 | 3.10 | Used | Not longer supported |
Main contributors¶
Walter Lorenzetti - Gis3W (@wlorenzetti)
Leonardo Lami - Gis3W (@leolami)
Francesco Boccacci - Gis3W (@volterra79)
Alessandro Pasotti - QCooperative (@elpaso)
Luigi Pirelli - QCooperative (@luipir)
Mazano - Kartoza (@NyakudyaA) (Dockerization refactoring)
Technological infrastructure¶
The publishing system is based on a series of OS tools and software
PostgreSQL/PostGis
: for the management of application dataPostgreSQL/PostGis
orSpatiaLite
: for the management of gegraphic dataQGIS Server LTR
as OGC services serverG3W-ADMIN
- the Administration component: developed inPython
usingDjango
G3W-CLIENT
- the Cartographic client: based onOpenLayer3
and developed with reactive tecnology byVue.js
The main libraries used for the management and the visualization of the geographical part and the interaction with the user are:
OpenLayer, Boostrap, jQuery, Lodash
andVue.js
.Gulp.js
as task runner
Below is a diagram relating to the standard workflow
Management and organization of geographic data and QGIS projects¶
This section describes how to organize QGIS data and projects locally and how to synchronize them on the server environment for publication purposes
Thanks to the integration with the APIs of QGIS it is now possible to manage the main formats (geographically and not) supported by QGIS Server:
reading and editing mode
PostGreSQL/PostGis
Oracle Spatial (compiling QGIS Server)
SQLite/SpatiaLite
GeoPackage
ShapeFile
reading mode
SQL Server
Virtual layer
The suite also allows you to manage in consultation ed editing:
simple join data with no nesting limits
1:N relation data
N:M relation data
Data on DB Server¶
If your geographical data are stored on Server DB
, it will be sufficient to allow access to the DB from the IP address on which the application is installed.
Data on SpatiaLite/GeoPackage or OGR format¶
If your geographical data are stored on SpatiaLite
, GeoPackage
or an other physical files (.shp
, .kml
, .tif
…) located on your local PC, you will need:
organize data and projects in predefined localy directories and subdirectories
upload/synchronize geographic data to the corresponding folder located on the server where the application is installed
Of course, mixed solutions with geographical data on PostGreSQL/PostGis, SpatiaLite and other formats will also be possible.
Organization of data and projects¶
Data on physical files and / or on GeoDB SpatiaLite and QGIS cartographic projects must be organized in compliance with the following indications:
a main directory named and positioned in according to need’s user
a
project_data
sub-directory that must contain the geographic data used for the various cartographic projects, such data can also be organized in subdirectories with no nesting limits.a
projects
sub-directory that must contain the QGIS cartographic projects (.qgz or .qgs files)
NB: The name of the local directory dedicated to geographic data must correspond to the name defined for the DATASOURCE_PATH
variable set during installation.
See dedicated paragraph.
That directory is also used to contain images used in the print layouts associated with the QGIS cartographic projects.
Geographic data synchronization on the server¶
The data stored in the local project_data
directory must be synchronized on the server where the G3W-SUITE application is installed.
The geographic data stored in the local project_data
folder must be loaded, reflecting any subdirectory structure.
To synchronize your data access to the Administration panel of G3W-ADMIN and click on the Configurations
icon located in the upper right corner.
Choose the File Manager
item in the linked menu.
Using this tool it is possible to manage the physical geographic data on the server in a simple and intuitive way.
The root directory of the File Manager corresponds to the local project_data
directory
It will therefore be necessary, in the case of using geographic files on the file system, to synchronize the contents of the local project_data
directory (and any sub-directories) before proceeding with the publication of QGIS projects.
Two specific directories can also be created within the root directory of the File Manager:
media_user
: a directory exposed on the web, to store your multimedia filessvg:
a directory to store extra SVG icons used your QGIS projects
All the directories can be organized in subdirectories with no nesting limits.
NB: The names of these directories are defined by the basic settings set during the installation of the suite. See dedicated paragraph.
The example shows the case in which in the local project_data directory there are two directories (geopackage and spatialite) in addition to the two system directories (svg and media_user).
Hierarchical organization of WebGis services and types of Users (roles)¶
This paragraph allows you to understand how G3W-SUITE makes it possible to manage the individual WebGis services in a structured and hierarchical way.
In G3W-SUITE it is possible to organize WebGis services on two thematic/functional levels
Cartographic MacroGroups
Cartographic groups
These organizational levels can be associated with different types of users (Editor 1, Editor2 and Viewer) in order to manage the access/management powers to the individual elements in a granular way.
The following image shows an example of the functional use of these organizational levels within a Union of Municipalities.
Access policies and individual functional modules may be associated with each WebGis service.
Types of Users (Roles)¶
In G3W-SUITE you can create Users and Users Groups and associate them with specific roles:
Admin1
: user with full powers including Django administration (basic suite configuration)Admin2
: user with full powers excluding those of Django administration (basic configuration of the suite)Editor1
: administrator of one or more Cartographic MacroGroups for which it will be possible:create users and/or user groups
create Cartographic Groups and, if necessary, assign them to an Editor 2 user
publish WebGis services and define their access policy
activate and configure some functional modules
Editor2
: administrator of one or more Cartographic Groups for which it will be possible:publish/update WebGis services and define their access policy
activate and configure some functional modules
Viewer
: user with access permission in consultation on WebGis services characterized by authentication. This user can also use individual functional Modules if the relative permissions have been attributed to himAnonymus User
: user to be associated with WebGis services and/or functional modules with free access
Hierarchical organization of contents¶
The following paragraph is dedicated to better understanding the relationships between the different types of users and the different elements of the suite (MacroGroups, Map Groups, WebGis services …).
In G3W-SUITE it is possible to manage Webgis services in a more or less structured way
an organizational level (Cartographic Groups):
two organizational levels (MacroGroups and Cartographic Groups)
These hierarchical levels can be used for organizational purposes (thematic containers) and/or functional (containers managed by different users/roles).
It is in fact possible to associate the two types of containers (MacroGroups and Cartographic Groups) to users with different roles/powers (Editor1 and Editor2) who will thus become the Administrators of all their contents.
In particular Editor1 users will also be able to create/manage users who can be associated with the Cartographic Groups and WebGis services present in the reference MacroGroup.
The cases relating to one or two organizational levels will be better described below.
One organization level (absence of MacroGroups)¶
In case it is not need use MacroGruppi, the Admin user will be the only administrator of the suite and can therefore:
create users (individuals and/or groups) of various types
create Cartographic Groups
publish WebGis services within the individual Cartographic Groups
activate some specific modules on individual WebGis services
When creating a cartographic group, the Admin user can define:
the eventual user (individual/group) Editor 2 to associate the Group with
Viewers users (individuals/groups) who will have access to this container
In the event that the Cartographic Group is assigned to Editor 2 (single or group users), they will may autonomously publish/update WebGis services inside in this container.
Editor 2 users will also be able to define the access policies to the published WebGis services, limited to the Viewers users associated with the Cartographic Group by the Admin user.
Even the Admin user can publish WebGis services within a Cartographic Group and, if necessary, associate them with a user (single and/or group) of Editor 2 type.
Two organization levels (presence of MacroGroups)¶
Macrogroups can be created only by Admin users.
Each Macrogroup can be associated with only one Editor1 user.
Each MacroGroup can be considered as a watertight compartment within which the associated Editor 1 user (administrator of the MacroGroup), will be able to create users and user groups that will be made available to define access permissions for content (Groups Maps, WebGis services, functional modules …) of the reference MacroGroup only.
In this way it will be possible to create totally independent entities, the MacroGroups, which will be managed exclusively by the user Editor 1 associated with them.
Clearly the Admin users (1 and 2) will continue to have full powers on all groups present in the system.
As previously specified, Editor 1 user will be able to:
create users (single and/or groups) of type Editor2 and Viewer
create Cartographic Groups within its Macro Group
publish WebGis services within his Cartographic Groups
activate specific modules on individual WebGis services
When Editor 1 user creates a Cartographic Group, he can define:
the eventual Editor2 user (individual/group) to associate with this Group
Viewers users (individuals/groups) who will have access to this container
Summary table of access/administration policies¶
Below is a summary table of the powers associated with the different roles.
QGIS: project settings¶
This section describes how to optimize your QGIS projects to publish as a WebGis service.
Thanks to the integration with QGIS Server, all the symbology aspects associated with the singoly layers are automatically reproduced on the WebGis service
In the QGIS cartographic projects you can set some parameters and options that affect functionalities and contents in the derivative WebGis service, such as:
the webgis service identification name
the associated basic metadata
the capabilities of the service
the possibility to exclude some associated print layouts on the WebGis service
which layers are queryable and searchable
which layers to expose with the different OGC services (WMTS, WFS, WCS)
which fields (for each vector data) are exposed as WMS and/or WFS
the Themes (Views) defined at the project level
layer/group management from embedded projects
the structure of the query form visible on the WebGis service
the editing widget, constraints and default values (also based on QGIS expressions) for every fields of vector layers
the associated print layouts, report included
The following paragraphs describe which QGIS project settings are more relevant in relation to the published WebGis service.
Project property¶
From the Project → Properties
menu, you can access the Project Properties
window and the three submenus of our interest:
General
Data sources
QGIS server
General¶
General Settings¶
In this section it is possible to define the title of the project, consequently the title of the WebGis service
.
This title will be used at the G3W-SUITE application level to uniquely identify the published project; for this reason it will not be possible to assign the same name to different projects published on the WebGis service.
We advise against using special characters, or numbers in the project name.
Data sources¶
The option Automatically create transaction group where possible
is automatically inherited in the online editing function.
Layers Capabilities¶
This submenu defines the querable and/or searchable layers at the WebGis service level.
Check the
Identifiable
column if you want that the layer will be searchable on the WebGisCheck the
Searchable
column if you want that the layer will be querable on the WebGis
NB: this differentiation is only possible by using the QGIS APIs such as Search URL endpoint. See dedicated paragraph
QGIS Server¶
Service capabilities¶
In this section it is possible to define the capabilities of the service
.
This information, together with info about the structure of the attribute tables of the layers present in the project, will be displayed in the Metadata session of the cartographic client.
See also dedicated paragraph
Capabilities WMS - Advertised extent¶
In this section it is possible to define the geographical extension
displayed when the WebGis service starts.
To define it, set the desired geographical view on the map and then click on the ‘Use Current Canvas Extent’ button.
WMS Capabilities - CSR restrictions¶
In this section it is possible to define the projection systems
for which the project is available in relation to OGC services
.
It is clearly necessary to insert the projection system on which the project was made, this SR is added by clicking on the ‘Used’ button.
Other geographic reference systems can be implemented by clicking on the ‘+’ button and choosing from the list of reference systems.
Capabilities WMS - Exclude layouts¶
In this section it is possible to exclude some of the print layouts
that are associated with the cartographic project from the availability of the WebGis service.
Capabilities WMS - General aspects¶
Two further aspects are manageable with regard to WMS capabilities
in general it is recommended to check
use the layer ids as names
optionthe option
Add geometry to feature response
must be checked to activate the zoom to the features on the WebGis service
WMTS Capabilities¶
In this section it is possible to define which layers are exposed as WMTS services
defining the various options
WFS Capabilities¶
In this section it is possible to define which layers are exposed as WFS services
.
The WFS service is needed if you want activate following types of query:
bbox query
bypolygon query
It is sufficient to check only the Published
column
WCS Capabilities¶
In this section it is possible to define which rasters are exposed as WCS services
General aspects¶
Themes (Views)¶
The creation of Themes (combination of off / on layers and differentiated simbology styles) is managed at the WebGis service level.
A specific menu on the webgis will allow you to choose the Theme to be displayed.
Layer order¶
The option to define the layer order different from the order in the TOC on the QGIS project is automatically supported.
Legend¶
The activation of the Filter legend by Map content
option on the QGIS project is automatically applied to the derived WebGis service.
Mutually exclusive groups¶
The activation on the QGIS project of the Mutually exclusive group
option for the layers groups is automatically applied to the derived WebGis service.
1:N and N:M relations¶
ATTENTION: to correctly manage these types of relations it is NECESSARY to insert the reference to the relations in the customized form
Embedded project¶
It is possible to publish QGIS projects that contain layers or groups of layers deriving from embedded projects. It is clearly necessary to publish the embedded project first and then those derived from it. An update of the embedded project will result in a consequent modification of all derived projects. The request to delete the basic embedded project causes a warning message as this operation will cause problems on all derived projects.
Layers properties¶
Simbology¶
The rendering style associated with the individual layers is replicated autonomously on the WebGis service.
If external SVG icons are used (added to the basic ones of QGIS, via the Settings -> Options -> System -> SVG paths
), these must be uploaded to the server (through the File Manager
tool) in order to be used by QGIS Server.
Manage custom SVG icons¶
In the installation procedure of the G3W-SUITE application, an svg
named directory is created on the server.
Within this directory it is therefore possible to store SVG icons, also organized in subdirecory.
The Configurations icon
, located in the upper right corner of the Administration Panel, allows you to access a menu that includes the
File Manager
item.
Through this tool it is possible to manage SVG icons on the server in a simple and intuitive way.
The SVG folder on the server must reflect the structure in any subfolders present locally.
NB: The name of this directory is defined by the basic settings set during the installation of the suite. See dedicated paragraph.
PS: remember that the File Manager
tool also allows you to manage the synchronization of geographical data (in the case of using physical files) and the management of multimedia files.
See also dedicated paragraph
Multi-style layer¶
The suite manages the presence of multiple styles associated with a layer.
It will be possible to dynamically choose the style on the cartographic client.
It will be possible to manage the styles associated with a layer from the Administration component, also by loading .qml file styles and setting the default style among those present.
Definition of the fields that can be consulted for each layer¶
Within the QGIS project it is also possible to define, for each layer, which fields are available following query on the WebGis service.
To define these settings, you access the properties of one of the vectors previously defined as searchable and choose the Source Fields
submenu in the Layer Properties
window.
This submenu lists the fields associated to the table of the vector.
The check box relating to the WMS
column defines whether or not the values contained in this field will be available following the query on the WebGis service.
Definition of the attribute display form¶
For each layer it is possible to define the structure of the attributes form associated with displaying the results following query operations.
On QGIS we can build a personalized form (query form) by creating thematic tabs and groups and defining the distribution of the individual fields and their aliases.
This structural organization will be replicated directly on the query form on the WebGis service.
The current version of QGIS also handles conditional forms and cascade drill-downs
Temporal settings¶
This version of G3W-SUITE manages the temporal aspects for both vector and raster layers but with limitations:
vector layers: limited to the Single filed with Date/Time configuration
raster layers: only for NetCDF file upload as raster (no Mesh)
Viewing multimedia content¶
Multimedia contents (images, pdf, web URL …) can be viewed interactively on the map client following publication of the QGIS project.
In the case of web links, simply insert them (preceded by the prefix http://
or https://
) within the dedicated attribute fields
In the case of multimedia files it is necessary:
upload the media file to the
media_user
folder (folder exposed on the web) accessible through theFile Manager
tool in the Suite Administration Panelinsert the web link to this file in the dedicated attribute field
The link to the file can be obtained in the following way:
application domain + media_user + path of the file + file name
Example:
application domain:
https://dev.g3wsuite.it
file
file_A.pdf
located in the folder/media_user/form/
web link:
https://dev.g3wsuite.it/media_user/form/file_A.pdf
Following queries at the cartographic client level, we will have different behaviors based on the type of content:
image: preview display in the form, click on the preview to display the image in real size
web link or other multimedia file: display of an Open orange button to allow consultation of the content
Print layouts¶
Any print layouts associated with the published QGIS project will automatically be associated with the published WebGis service.
Print layouts can contain more than one Map
items and panoramic maps.
You can set also a custom title (definible in the WebGis side) setting an Item ID at a Label item.
Atlas and report are also supported.
Any images present in the print layouts must be placed in the local project_data
folder (in any subdirectory) and synchronized on the server.
See also the dedicated paragraph Geographic data synchronization on the server.
Performances optimization¶
Mandatory rules¶
PostGreSQL/PostGis, SQLite/Spatialite and GeoPKG layers must have a primary key
the primary key field and all fields involved in search, join, 1:n or N:M relations or editing function have to be published as WMS
don’t use commas for aliases associated with layers
style settings defined at the auxiliary data level are not supported
Tips¶
when using rule-based/categorized classification create indexes on the column(s) involved in the rule expression
start the project with only a few layers turned on by default
do not exceed three nesting levels in the groups of layers defined in the TOC
G3W-FRONTEND: the front end portal¶
This section describes the different sections of the access portal and how to login to the Administration Panel
The login portal sessions¶
The G3W-SUITE application is accessible via any internet browser (FireFox and Chrome recommended) via the URL address defined during installation
If you have also installed the front-end portal from the GitHub repository, access to the application will be via the portal itself.
The home page will contain, in addition to a brief and customizable presentation of the service, also:
a menu at the top right side
with the following items:
Change language
Go back to the home page
Login
a panel menu on the right with the following items:
Maps
Info
Most of the information shown in the access portal can be defined from the Configurations -> Edit General Data
session, accessible from the icon located in the upper right corner of the Administration Panel.
Info¶
The Info session can contains a small introduction and contact information for your company or public facility.
Maps¶
Within G3W-SUITE it is possible to organize webgis services in hierarchical containers (Cartographic Macrogroups and Cartographic Groups)
By accessing the Maps session, the Macrogroups (if present) will be displayed, access to the Macrogroup will allow you to view the associated Cartographic Groups and from these access the list of individual WebGis services.
The MacroGroups, Groups and WebGis services listed will be those defined as free access.
If you have a user for access, you can authenticate yourself through the Login session.
Following authentication, the Maps page will also show the MacroGroups, Groups and WebGis services with restricted access and on which the user has access permissions.
Login¶
If you have a user with login credentials, you can authenticate yourself through this session by entering your user and password.
If you are an Administrator or Editor of 1 or 2 level, you can also access the Administration session.
Once logged in, you access the Admin session and from here, via the “Backend” button to the Administration panel
G3W-ADMIN: the Administration panel¶
This section describes how to manage the various aspects and features of the Suite:
customization of the access portal
user creation and management (individuals and groups)
creation of MacroGroups and cartographic Groups and definition of access and management policies
publication of QGIS projects as WebGis services
updating and management of WebGis services (search tool and additional functions)
Description of the interface¶
The Administration Panel allows you to manage all aspects related to the publication of QGIS projects and configuration of related WebGis services
The main page of the Administration Panel shows:
a bar at the top
:Frontend: to return the landing page portal
Username: to edit your profile and log out
Language: to choose the interface language
A gear icon
: to access a menu with:
–> Edit general data: to set informations shown in the front-end portal
–> Django Administration (only for Admin01 user): to configure Django advanced settings
–> Files: to access the File Manager tool
a text menu on the left
:Dashboard: Administration dashboard
Cartographic Groups: to create/manage cartographic groups
Macro Cartographic Groups: to create/manage Cartographic MacroGroups
Users: to create/manage single users and/or user groups
List of active modules: to activate/manage the functional modules active in your installation
a dashboard in the center of the page
Dashboard: to access to list of Cartographic Groups
Module list: to access the respective settings
Front end portal customization¶
From the main page of the Administration Panel it is possible to customize the information shown on the Front End Portal.
Click on the Configurations icon located at the rigth bottom and choose the item Edit general data which will appear in the menu below.
In the General suite data
form you can define all the informations that will appear on the portal home page
Home data
: info that will appear on the front end landing pageAbout data
: info that will appear in the About it sessionGroup map data
: info that will appear in the Maps sessionLogin data
: info that will appear in the Login/Administration sessionSocial media data
: links to the social channels that will appear in the About it it sessionMap Client data
: main title to be displayed in the cartographic client bar
Front End Home Data¶
Informations that will appear on the front end landing page
ATTENTION: contents marked with * are mandatory.
Front End About Data¶
Informations that will appear in the Info session
ATTENTION: contents marked with * are mandatory.
Frontend Groups Map Data¶
Information that will be displayed in the Maps session
ATTENTION: contents marked with * are mandatory.
Front End Login Data¶
Information that will be displayed in the Login/Administration session
ATTENTION: contents marked with * are mandatory.
Front End Social Data¶
Links to the social channels that will be displayed in the About it it session
ATTENTION: contents marked with * are mandatory.
Map client data¶
Main title to be displayed in the cartographic client bar
In the Credits subsection it is possible to define additional text for the publishing aspects.
After filling in the various form, click on the Save button to confirm your choices.
Users and Users Groups management¶
In the left side menu there is the Users item with four sub-items:
Add user
Users list
Add groups users
Groups users list
Add user¶
Through this form it is possible to insert new users and define their characteristics.
Anagraphic
: first name, last name and email addressLogin
: username and passwordUser backend
ACL/Roles
Superuser status (Admin1 and Admin2 users only)
Staff status: deep administration of the application (Admin1 users only)
Main roles (Editor1, Editor2 or Viewer)
User Editor groups: any Editor2 user group they belong to
User Viewer groups: any Viewer user group they belong to
User data
:Departments and image to be associated with the profile
After filling in the various form, click on the Save button to confirm your choices.
Users list¶
Through this form you can consult the list of enabled users and their characteristics:
Username
Roles
User groups to which they belong
Associated Cartographic MacroGroups (only for Editor1 users)
Super user and/or Staff privileges
Email, name and surname
Creation date
Info on user creation (G3W-SUITE or LDAP)
The icons at the head of each row, allow you to:
Modify: to modify the characteristics of the user
Delete: to permanently delete a user
Add Group Users¶
Through this form it is possible to insert new user groups and define their role.
It is possible to create only two types of user groups:
Editor
: in which only Editor2 users can be insertedViewer
: in which only Viewer users can be inserted
The association between user and user groups is made at the individual user management level.
In the specific form for creating user groups, the following info are defined:
Name
Role (Editor or Viewer)
After filling in the from, click on the Save button to confirm your choices.
Groups users list¶
Through this form it is possible to consult the list of enabled user groups, their characteristics and the individual users belonging to the group.
Using the icons at the head of each row, you can:
Show details: to consult the characteristics of the user group
Modify: to modify the characteristics of the group
Delete: to permanently delete a group and therefore association with users belonging to the group itself
Macro Cartographic Groups¶
In this section it is possible to view the list of Cartographic Macrogroups, manage them and create new ones.
ATTENTION: use the Cartographic MacroGroups only if you need them.
See chapter Hierarchical organization of WebGis services and types of Users to learn more about this aspect.
For example, you can create a Macrogroup to collect a series of Cartographic Groups belonging to the same Administration (single Municipality within a Union of Municipalities) or more simply to have main containers that contain second level groupings (Groups).
In the left side menu there is the MacroGroup Cartographic item with two sub-items:
Add MacroGroups: to create a new Cartographic MacroGroup
MacroGroups list: to access the list of MacroGroups present
Add MacroGroups¶
Through this item, available only for the Admin users, it will be possible to create a new Cartographic MacroGroup and associate it with an Editor1 type user who will become its administrator.
Let’s see in detail the various sub-sessions of the group creation form.
ACL users¶
Editor users
: you define the Editor1 user who will become the MacroGroup administrator. This user will can manage the MacroGroup by creating Cartographic Groups, publishing projects and creating Users or User Groups.
General data¶
Identification name *
: a generic internal identification name (not show in the front end)Title *
: descriptive title of the MacroGroup (will appear in the list of MacroGroups) and, eventually, in the client headerUse title for client option
Use logo image for client option
Description
: the description to be associated with the MacroGroup in the frontendLogo img*
: the logo to be associated with the MacroGroup in the frontend and, eventually, in the client header
By default, the map client header, for each WebGis service, is composed of:
main title (if set at General Data management level)
logo and title associated with the Cartographic Group
title of the WebGis service
If you select the Use MacroGroup title and logo for the client options, the map client header, for each WebGis service, will instead consist of:
main title (if set at General Data management level)
logo and title associated with the Cartographic MacroGroup
title of the WebGis service
After compiling the form, click on the Save button to confirm your choices.
MacroGroups list¶
The menu provides access to the list of cartographic macro-groups present.
There are a series of icons to access specific functions:
Show the details of the MacroGroup
Change characteristics of the MacroGroup
Delete MacroGroup
ATTENTION: the removal of the Cartographic MacroGroup group will result in:
the removal of all the Cartoghraphic Groups contained in it
the removal of all the cartographic projects contained in the individual Groups
the removal of all the widgets (eg searches) that would remain orphaned after the removal of the cartographic projects contained in the group. See the Widget chapter for more information.
Define the MacroGroups order on the FrontEnd¶
Through the Drag & Drop function it is possible to define the order of the MacroGroups in the list. This order will be reflected in the FronEnd.
Cartographic Groups¶
In this section it is possible to view the list of Cartographic Groups present, manage them and create new ones.
A Cartographic Group is create to collect a series of cartographic projects belonging, for example, to the same theme (Urban Planning Regulations, tourist maps …) and characterized by the same projection system.
It should be remembered that it will be possible to switch from one webgis service to another, leaving the same geographical extension and scale, only between the projects contained in the same cartographic group.
In the left side menu there is the Cartographic Groups item with two sub-items:
Add Group: to create a new Cartographic Group
Group List: to access the list of groups present
You can also access the list of groups by clicking on the “Show” button in the Cartographic Groups box on the Dashboard.
Add Group¶
Through this item it is possible to create a new Cartographic Group.
During creation, some functional characteristics and tools that the WebGis interface will show for all cartographic projects published within the group are also defined.
Let’s see in detail the various sub-sessions of the group creation form.
General data¶
Name *
: a generic internal identification name (not show in the front end)Title
*: descriptive title of the Group (will appear in the list of Cartographic Groups)Description
: description of the contentLanguage
*: interface language
Logo/Picture¶
Header logo img
*: the logo to be displayed in the header del client cartograficoUse logo image for client
optionLogo link
: a eventual link to associate with the logo
REMEBER
By default, the map client header, for each WebGis service, is composed of:
main title (if set at General Data management level)
logo and title associated with the Cartographic Group
title of the WebGis service
If you select the Use MacroGroup title and logo for the client options, the map client header, for each WebGis service, will instead consist of:
main title (if set at General Data management level)
logo and title associated with the Cartographic MacroGroup
title of the WebGis service
If you select the Use Group logo for the client options, the map client header, for each WebGis service, will instead consist of:
main title (if set at General Data management level)
title associated with the Cartographic MacroGroup
logo associated with the Cartographic Group (if MacroGroup logo option is active this options takes precendence)
title of the WebGis service
ACL Users¶
Access and modification powers are managed.
The options present will vary according to the type of user (Admin or Editor1) who creates/manages the Group
Editor1 User
: defines the user (Editor1) manager of the Group. The entry is present only when the Admin type user creates the Group If the Group is created by a user of type Editor1, the Group is associated directly with that userEditor2 User
: defines the user (Editor2) manager of the Group.Viewers users
: define the individual users (Viewers) who have the credentials to view the contents of the group. By choosing the anonymous user (AnonymusUser) the group will be free to accessEditor user groups
: define the user groups (Editor2) who manage the Group.Viewer user groups
: you define the user groups (Viewer) which have the credentials to view the contents of the group.
The option Propagate viewers user (single and groups) permissions
allows you to propagate the Viewer users (individuals and/or groups) associated to the Group to ALL the WebGis services present in it.
This option cancels any differentiation in the access policies applied to the WebGis services contained in the Group.
MacroGroups¶
Possible definition of the belonging MacroGroup.
This option is available only if Cartographic macro groups have been created
In the event that the Group is created by an Editor1 type user, the Group will be automatically associated with the MacroGroup associated with the same Editor1.
GEO data¶
Projection system associated with the group.
N.B. All projects loaded into the group must be associated with this SRID.
Base layers and Map interaction tools¶
In this box you can define:
Mapcontrols
*: list of tools available on the WebGis client:zoomtoextent: zoom to the initial extension
zoom: zoom in and zoom out
zoombox: zoom tool based on drawing a rectangle
query: puntual query of geographical layers
querybbox: query via bounding box (N.B. it is necessary that the layers are published as WFS services on the QGIS project)
querybypolygon: it will be possible to automatically query the features of one or more layers that fall inside a polygonal element of a guide layer. (Eg what’s inside a cadastral parcel?). - N.B. it is necessary that the all the layers involved in this kind of query are published as WFS services on the QGIS project
overview: presence of a panoramic map
scaleline: presence of the scale bar
scale: tool for defining the display scale
mouseposition: display of mouse position coordinates
geolocation: geolocation tool (available only with https certificate)
nominatin: address search tools and toponyms based on OSM
streetview: Google StreetView on your map (available only with GoogleMaps API Key)
length: linear measuring instrument
area: surface measuring instrument
addlayers: tool for temporarily uploading GML, GeoJson, KML, GPX, SHP (zipped) and CSV with coordinate to WebGis. These layers will remain until the end of the work session
screenshot:* tool to take a screenshot of the map area
GeoScreenshot:* tool to create a GeoTIFF of the map area
Baselayer
: choice of the base maps that will be available on the WebGis clientBackground color
: choice of the background color of the maps (default white)
*NB: the security protocols prevent the creation of screenshots if WMS services with domains other than the publication one are present on the map. In this case the icons will not be present on the client even if the MapControl is selected. To avoid this, set the WMS as external WMS in the Widget managment session.
With regard to the Base Layers, it is specified that the external services available by default are:
OSM
Bing Street
Bing Aerial
It is possible to create/add customized Base Layers starting from the cache of the single layers present in published webgis
See Caching layer paragraph in the Widget management session.
Copyrigth¶
Terms of use
: description of the terms of use of the map and any other info
Link to terms
: link to text
After filling in the various form, click on the Save button to confirm your choices.
Groups List¶
From this item you can access the list of the created cartographic groups.
For each group, the Title and Subtitle defined at the time of creation are shown.
There are also a series of icons to access specific functions:
Add a new project to be published on the WebGis service
Number and links to projects published within the Group
Show group details
Change group characteristics
Delete group
ATTENTION: the removal of the cartographic group will involve:
the removal of all the WebGis services contained therein
the removal of all widgets (eg searches) that would be orphaned after the removal of the WebGis services contained in the group. See the Widget chapter for more information.
A large + icon is available to access the form for creating a new group.
Define the Groups order on the FrontEnd¶
Using the Drag & Drop function it is possible to define the order of the Groups in the list.
This order will be reflected within the belonging MacroGroups.
NB: currently in the list of Groups it is not present in the subdivision in the belonging MacroGroups but the fact that a Group can be associated with only one MacroGroup still allows you to manage intuitively what will be the complessive display order.
Publication of new WebGis services¶
To publish a new QGIS cartographic project¶
It is possible to publish new QGIS projects:
from the list of cartographic groups: click on the icon
located under the box of the cartographic group in which you want to publish the project.
from the list of cartographic projects published within a group: by clicking on the the buttom
In the dedicated form we could define the charatteristicsof the project being published:
QGIS project¶
QGIS file
*: load the QGIS cartographic project to be published (.qgz or .qgs file)
ACL Users¶
Management of access and/or modification permissions
The options present will vary according to the type of user (Admin, Editor1 or Editor2) who creates / manages the WebGis service.
Editor1 user
: defines the user (Editor1) manager of the WebGis service.
The entry is present only when the WebGis service is created by Admin or Editor1 user.
In the event that the WebGis service is published by a user of type Editor1, the WebGis service is associated directly with that user
Editor2 User
: defines the user (Editor2) manager of the WebGis service.The item is present only when the user of the Admin or Editor1 type creates the service WebGis. In the event that the WebGis service is published by a user of type Editor2, the WebGis service is associated directly with that user
Viewers users
: define the individual users (Viewers) who have the credentials to view the WebGis service. By choosing the anonymous user (AnonymusUser) the group will be freely accessible.Editor user groups
: define the user groups (Editor2) who manage the service.Viewer user groups
: you define the user groups (Viewer) which have the credentials to view the content of the service.
Default base layer¶
In this session you define which base layer should be active at startup.
The choice is limited to the list of base layers activated for the cartographic group in which you work.
It is also possible not to define any active base layer at startup.
Description data¶
Public title
: title of the WebGis service, it will appear at the font end level and in the header of the client.Description
: Description of the project, it will appear at the public portal level.Thumbnail (Logo)
: logo to associate with the project. This image will be viewable in the list of projects within the cartographic groupURL alias
: a human readable URL for the map. Only alphanumeric characters, not white space or special characters.
The title associated with the WebGis service follows this definition logic:
Public title: if set
QGIS project title: if set on the General session of QGIS project properties
Name of the QGIS project file
Options and actions¶
User QGIS project map start extent as webgis init extent
: check this control if you want set initial extent from QGSI project initial extent
Otherwise the initial extension will correspond to the maximum one defined on the basis of the extension associated with the WMS capabilities of the QGIS project (Project properties -> QGIS Server -> WMS capabilities (Advertised extent))
Tab's TOC active as default
: set tab’s TOC (Layers, Base layers, Legend) open by default on startup of webgis serviceLegend position rendering
: this option allows to set legend rendering position:In a separate TAB: default value, the legend is rendered into a separate tab
Into TOC layers: the legend is rendered inside layers toc
Automatic zoom to query result features
: if in the results of a search there are only features of a layer, the webgis automatic zoom on their extension
The next options allow you to define the type of WMS / WFS query to be carried out and the maximum number of results obtainable following a query.
Max feature to get for query
*: max number of feature to get for single or multiple modeQuery control mode
*: single or multipleQuery by bbox control mode
*: single or multipleQuery by polygon control mode
*: single or multiple
ATTENTION: contents marked with * are mandatory.
After filling in the various form, click on the Save button to confirm your choices.
If the operation is successful we will see the new project appear in the list of projects in in the working Cartographic Group.
Embedded project¶
It is possible to publish QGIS projects that contain layers or groups of layers deriving from embedded projects. It is clearly necessary to publish the embedded project first and then those derived from it. An update of the embedded project will result in a consequent modification of all derived projects. The request to delete the basic embedded project causes a warning message as this operation will cause problems on all derived projects.
Define the WebGis order on the FrontEnd¶
The order of the WebGis services listed within the Thematic Group at the FrontEnd level reflects the order defined at the level of the corresponding administration session. It is possible to define a custom order by moving the published projects via drag&drop.
Update/ Manage WebGis services¶
To update a published WebGis service, access the list of projects in the Cartographic Group.
Click on the Edit icon placed at the top of the WebGis service and reload the QGIS file with the changes made in the relevant form.
Click on the SAVE button to confirm the change.
Always starting from the list of WebGis services, it is possible to manage numerous functional aspects associated with them.
Basic tools¶
In this section it is therefore possible to view the list of cartographic projects present, view them, manage them and create new ones.
Through the single icons, placed at the level of each project, it is possible to:
Display the cartographic project on the WebGis interface: to check the display by the user
Access the list of layers present within the project and define their functional aspects
View the project specifications
Test the WMS Capabilities of the project
Update a project: update of the QGIS file and other options related to the project
Remove a cartographic project Warning: removing a project also removes all the widgets (e.g. searches) that would be orphaned after the project has been removed
Download of the QGIS project
List of OGC services associated with the project
Setting up the overview map for WebGis services¶
In this session it is also possible to define which of the cartographic projects loaded within the group will be used as a panoramic map.
To set the panoramic map, choose the projects and tick the check box in the Overview
column.
Widget management¶
Once a cartographic project has been published, thougth the icon it is possible to access the list of the geographical states that compose it and define some functional aspects that will be enabled at the cartographic client level.
Next to each layer are a series of icons and checkboxes:
Label: layer alias applied at the QGIS project level
The eye icon allows you to know the ID associated with the layer at the project level, this ID will be useful for creating parameterized URLs
Name: name of the layer (file or DB table)
Type: illustrates the type of data (WMS, PostGis, SpatiaLite, GDAL / OGR …)
WMS external: to speed up loading, the WMS layers present in a QGIS project are managed directly by Django and not by QGIS-Server. However, this method prevents the application of any styling (e.g. opacity level) defined at the project level. The choice of the external WMS option means that the WMS layer is managed directly by QGIS-Server and therefore the associated styling is applied.
WFS: a check mark shows whether the layer is published as a WFS service or not
Actions: a series of icons dedicated to various functions
Caching Layer: allows you to activate and manage the cache of the single layer at the project level
Editing layer: shows if the online editing function is active on the layer and allows you to activate and define it
Hide layer by user/groups: hide specific layers from the TOC based on specific users or groups of users
QPlotly widget: add or manage plots created with DataPlotly QGIS plugin
Geo-constraints by user/group: create or manage editing and visualization geo-constraints based on poligonal layers
Alphanumeric and QGIS expressions constraints by user/groups: create or manage editing and visualization constraints based on SLQ language or QGIS expressions
Hide columns by User/Groups: create or manage constraints on one or more fields of a layer based on single or group user/s
Widgets list: shows how many widgets (eg searches) are associated with this layer and allows you to activate new ones
Manage layer styles: manage multi-style layer
Not show attributes table: hide attributes table of the layer for every users
No legend: it allows to define if the layer must have published the legend at TOC level of the WebGis client
Download: allows the download of the geographic and not geographic layers in various formats
Download as shp/geotiff: for vector and raster layers
Download as GPK: for geographic or not geographic layers
Download as xls: for all types of layers, in .xls format
Download as csv: for all types of layers, in .csv format
Download as gpx: for geographic layers, in .gpx format
The number above each Action icon shows if and how many related objects are present.
The functions present in the Actions session are described below.
Caching layer (Base Map)¶
With this icon it is possible to activate/manage the cache of the single layers and create XYZ Tiles layer
The form allows you to:
enable cache on the layer
reset the cache of the single layer
reset the cache of all the layers of the project
create an XYZ Tiles layer (to use as a base layer for your projects) starting from the cached layer
In this last case you have to set:
Base layer title
Base layer description
Base layer attribution
The newly created base layer will be available to be associated with those available for the various Cartographic Groups.
Editing layer¶
Through this icon it is possible to activate the online editing function on the individual layers and define the permissions for individual / groups of users
See the dedicated paragraph in the Editing on line session.
Hide layer by user/groups¶
With this icon it will be possible to define the list of users (single and/or groups) who will be enabled to view this layer at the TOC and map level.
QPlotly widget¶
View plots created using QGIS DataPlotly (a great plugin developed by Matteo Ghetta) in the cartographic client.
The module, based on the Plotly library, manages plots saved as xml.
The plots are connected to the layers defined on the QGIS project, in this way, as for the searches and the constraints, it is possible to activate (checkink the Linked checkbox) the same plots on all WebGis services in which the reference layer is present.
It is also possible:
download the plot XML file to reuse it in QGIS
define the activation status of the plots when the WebGis service is started
The title of the chart, defined at the plugin level, will be the unique identifier.
At client level, it will be possible to filter plots based on the geometries visible on the map and/or selected by the user.
Charts based on 1:N data relation (child layer)¶
If the chart is linked to a child layer in a 1:N relation, it can also be displayed at the information level of the individual parent features
Display and editing constraints¶
Through the Geo-constraints by user/group and Alphanumeric and QGIS expressions constraints by user/groups widgets it is possible to define editing and display filters for users authorized to consult/edit the project.
See the dedicated paragraph in the Editing on line session.
Hide columns by User/Groups¶
Thanks to this function it is possible to hide specific fields of a layer for consultation. This constraint can be differentiated for individual users or groups of users.
This setting is also available for the AnonymousUser user
To activate this type of constraint, you must click, at the level of the layer of interest, on the Hide columns by User/Groups icon .
Clicking on the icon will show the list of any existing alphanumeric column constraints and the item + Create New Column Level constraints
to create a new one.
Clicking on the item will open a modal window which will allow you to define:
user or group of user
list of fields to hide to them
Once all the constraints have been setted, click on the OK to confirm the rules.
Widget setting - Search tools¶
Using this icon it is possible to associate a series of widgets to the layer. The basic widget allows you to define search tools that will be available in the webgis.
Basic settings¶
In G3W-SUITE it is possible to create search widgets.
By default, searches can be built on individual vector layers based on the fields of the table associated with the layer.
NB: to create searches based on fields derived from simple joins (1:1/N:1) or from 1:N relation, you have to change the setting of the method used (from WMS to QGIS API). See dedicated paragraph.**
Every search widget will be saved by referring to the layer identifiers (for example the DB parameters: IP, DB name, schema, layer name).
This aspect allows, once a search widget for a layer has been created, to have it available on all the projects in which the layer is present, without having to rebuild the widget from scratch each time.
In the list of layers present within the project, identify the layer on which to create and associate the search widget and click on the icon
By clicking on the icon, the list of already active (or activatable) widgets associated with the layer will be shown.
These widgets can be modified, deleted or disconnected using the appropriate icons.
ATTENTION: deleting a search will delete it from all projects in which that search is active.
To deactivate a search from a project, simply disconnect it using the check-box on the right.
To create a new search, click on the link New widget
.
In the pop-up that appears, the Search
type have to be chosen.
In the related form we can define:
Form Title
Type
: “Search”Name
: name that G3W-SUITE will use to internally register the search widget.
General configuration of research and results
Search title
: title that will become available in the ‘Research’ panel of the WebGis interface
Search fields settings
Field
: field on which to carry out the researchWidget
: method of entering the value to be searchedInputBox
: manual compilationSelectBox
: values shown via drop-down menuAutoCompleteBox
: values shown through auto-complete modeAlias
: alias assigned to the field that will appear in the search formDescription
: description assigned to the fieldComparison operator
: comparison operator (=, <,>,> <,> =, <=, LIKE, ILIKE) through which the search query will be carried out.Dependency
: this parameter (optional) allows, only in the case of SelectBox or AutoCompleteBox widgets, to show the list of values of a field filtered according to the value defined for the previous fields.
Now it is possible to define the dependence more or less strong (strictly).
In case of strictly dependence, the values of the dependent fields will be loaded only after the choice of the value of the field on which the dependency depends.
Otherwise it will be possible to define the values of the individual fields freely and without a specific order. The values available for the other fields will in any case depend on the choice made.
Warning: in the case of fields with more than 100 unique values, the WMS service does not allow to obtain the complete list of values. In this case it is recommended not to use the SelectBox
method
Alternatively, you can use the QGIS API as a search method to overcome this limitation. See dedicated paragraph.
The button allows you to add additional fields for the construction of the search query currently manageable through AND/OR operators.
The example below shows the compilation of the form for creating a search widget dedicated to a cadastral cartography layer.
Once the form has been filled in, click on the OK button to save the settings.
Once the settings are saved, the created widget will appear in the list of Widgets associated with the layer.
The widget will already be connected
and therefore available in the WebGis interface.
IMPORTANT: the created search widget will now be available (disconnected) for all projects in which the layer with which it has been associated will be present.
This will allow you not to have to recreate the widget several times and to decide in which projects to activate the search and in which not.
Multiple layers search¶
The Other searching layers option allows you to extend the search carried out to other layers.
If the additional layers have homologous fields (same name and type) the search will be extended to them.
The results will be differentiated according to the corresponding layer.
Especially useful in the case of multigeometric layers.
Search based on 1:N relation data¶
The option allows you to create a search based on the fields of a table (child in a 1:N relation) and obtain results relating to the parent layer of the relation.
N.B. to create searches based on fields derived from simple joins (1: 1 / N: 1) or from 1: N relation, you have to change the setting of the method used (from WMS to QGIS API). See dedicated paragraph.
The Relations option allows you to to define the relationship to be used (if present) to identify the parent layer whose results will be shown.
Manage layer styles¶
If multi styles have been associated with the same layer in the QGIS project, they will be exposed.
It will be possible to associate new layers by loading related QML files and set the style to be used as default.
Multilinguage¶
By default the suite manages four languages:
English
French
Italian
Finnish
Swedish
Other languages can be added.
Map client¶
On the top bar you can choose, through a drop-down menu, the language of the entire client interface.
Administration¶
Also for the Administration panel, through the same drop-down menu, it is possible to define the language of the entire interface of the console.
Front end¶
Fixed front end content is already available in the four basic languages.
Variable contents, i.e. user-definable contents, are instead translated:
Sessions
Home
,About
,Maps
andLogin
: content that can be defined and translated in the Edit General Data session of the Control Panel AdministrationSessions
MacroGroups Cartogarfici
,Groups Cartogarfici
andWebGis Services
: contents definable and translatable in the form defining these elements, limited to the items:Public Title
Description
To carry out the translation of these contents, proceed as follows:
access to the form for creating the element (MacroGroup, Group or WebGis Service)
define one of the available languages from the drop-down menu at the top right
fill in the form in the chosen language
save the settings
Then:
access the form again in modification
change the language
fill in the translatable content in the new language
save the new settings
Titles and Descriptions of the various elements in the defined languages will be available on the front.
G3W-CLIENT: the cartographic client¶
Generic aspects¶
The application has a responsive interface consisting of expandable and reducible sessions.
The color of the interface depends on the type of user logged in.
The header
contains the following elements:
Logo, title and subtitle, deriving from:
main title (set at General Data level) or MacroGroup name, according to the settings
Cartographic Group name
WebGis service title
Change map: which allows you to switch from one WebGis service to another (located within the same Cartographic Group) while maintaining extension and display scale
User ID: if you have logged in to the system
Credits
Home: to access the FrontEnd
Language: the choice of language is reflected in the individual menus of the map client and on the contents of the access portal. The languages available are those activated by the Administration.
The Tools panel
is located on the left and containing the following objects:
Metadata: content defined on QGIS project
Print: printing tool based on the layouts defined on the QGIS project
Search: with the search tools defined through the Administration panel
Tools: session that collects the various tools that may be activated on the WebGis service
WMS: session to add custom WMS services to the map
Map: containing:
Layers: structured list of layers, defined on the QGIS project
Base: choice of the base map from those defined at the creation level of the Thematic Group
Legend: graphic legend of the various layers
In the event that Themes (Views) are defined in the QGIS project, a specific choice menu will be available in the Layers session of the TOC.
The choice of a Theme will determine the automatic activation of the layers and related styles, defined in the Theme itself.
Tools panel¶
Metadata¶
The metadata reported in this session derive from those set at the QGIS project level.
This content is divided into three sessions: General, Space Info and Layers.
General
: reports the metadata defined on the QGIS project in the item:Project → Properties (QGIS Server session, Service Capabilities)
In case of login as anonymous user the URL of the WMS service is shown.Spatial
: reports the EPSG code of the projection system associated with the QGIS project and the BoundingBox relating to the initial publication extension, defined in the item:Project → Properties (QGIS Server session, WMS Capabilities, Advertised extent)
Layers
: reports simple metadata associated with the individual layers.
Charts¶
View graphs created using QGIS DataPlotly and activated at the admin session level.
Check the plots in the list and consult them on the rigth panel.
The graphs are filterable based on the:
features visible on the map
filter based on the selected features
These filters are also reflected on the plots associated to the related data (in 1:N mode) based on the visible and/or selected parent features.
The filter based on the map content can be activated globally on all plots (icon at the top of the panel dedicated to charts) or on only some specific plots (icon placed at the level of the individual plots).
The plots will automatically update after pan and zoom operations on the map
If activated, the filter based on the selected features is automatically activated on all related plots (associated with the same layer and with the 1:N relationed tables)
Appropriate messages at the single plots level will indicate the activation of these filters.
Charts based on 1:N data relation (child layer)¶
If the chart is linked to a child layer in a 1:N relation, it can also be displayed at the information level of the individual parent features
Print¶
Printing tool based on layouts defined on QGIS project.
The tool allows you to choose:
Template: print layout among those associated with the published QGIS project
Scale: print scale
DPI: print resolution
Rotation: rotation angle
Format: print to PDF or JPEG
Custom title: using the ItemIDs at the print layout level of the QGIS project it is possible to insert one or more labels with customized content in the print from WebGis
On the map, a light rectangular area will allow you to define the print area.
If an Atlas type print layout is associated in the QGIS project, the layout reference will be available. The cards to be printed are defined by referring to the atlas identifier defined in the print layout.
WMS¶
Through this tool the user can add custom WMS layers to the WebGis service.
The user can add one or more WMS URL and, for each of them, define:
the position (top or buttom) with respect to the other layers of the project
the layer to load
the projection system to be associated
a custom name
When the first custom WMS is added, a new tab (WMS) appears in the TOC; here you can switch on/off or delete the individual added WMS layers.
The added WMS layer cannot not be queried.
The list of WMS services and the specific WMS layers added will remain available to the user until the browser cache is cleared.
Search and Query Builder¶
A classic Query Builder is present at the Search menu level. Through this tool it is possible to:
carry out alphanumeric searches on geometric layers
save the query to reuse it until the end of the work session
edit a previously saved query
The saved query will be available until the browser cache is cleared
The Search menu contains the list of search tools defined through the Administration panel and custom searches created with the Query Builder.
You choose the search you are interested in, fill in the required fields and click on the Search
button.
The panel with the list of results will open on the right side of the client, for each result the first three fields of the associated table will be displayed.
By positioning on the individual results, the corresponding features will be highlighted on the map; clicking on the individual results you can consult all the attributes.
Zoom to features and download icons are available for results (single or cumulative)
Map¶
This session has three tabs:
Layers: structured list of layers, defined on the QGIS project
Base: choice of the base map from those defined at the Cartographic Group creation level
Legend: graphic legend
Layers¶
In the list of layers, right click on the name of the single layer shows the following items:
Name and kind of geometry of the layer
Styles: to choose the style to be applied to the layer, in the case of multi-style layers
Abstract: a text (also html) defined in the Layer Properties, Metadata session, Identification tab, Abstract form.
Zoom to layer: to zoom in on the extension of the layer
Open attribute table: to consult the associated attribute table
Download shapefile: to download the layer as a shapefile; function activatable from the administration panel
Download GEOTIFF: to download a raster in GeoTiff format, full layer or clipped to the extent of the canvas; function activatable from the administration panel
Download GeoPackage: to download the layer as a GeoPackage; function activatable from the administration panel
Download CSV: to download the layer as a CSV; function activatable from the administration panel
Download XLS: to download the layer as a XLS; function activatable from the administration panel
WMS URL: URL of the WMS service relative to the project or URL of the external WMS
It is possible to hide, automatically, layers from the TOC when they have no records.
Useful when using filters on layers or geographic views.
Attribute table¶
The attribute table (resizable) is equipped with paging function, highligth function and zooming to the associated features.
In the case of links to multimedia content, the previews of the images and/or the Open button will be displayed for consultation of different types of content.
The window is resizable.
A generic filter, positioned at the top right, is applied generically to the contents of all the fields and it will allow you to filter the list of displayed records.
Filters based on the contents of the individual fields are available at the top of each column.
The Show features visible on the map icon allows you to filter the records of the table according to the features visible in the map.
From this version it is possible to select the features of the individual layers and apply filters that will affect:
on the map content
on the attribute table content
on the contents of the plots
on print contents (only with QGIS 3.18)
The selection of features can be made:
at the attribute table level (through the checkboxes on the left of each records)
on the results of a query (add / remove from current selection)
on the results of a query (add / remove from current selection)
At the same time, additional icons appear:
on the layer attribute table
to the right of the layer on the TOC
at the level of the relevant plots
Aggiungi immagine: g3wclient_selection.png The icons in the attribute table allow you to:
Clear selection
Invert selection
Add/Remove filter
The icons to the right of the layer on the TOC allow you to:
Clear selection
Add/Remove filter
When one or more features are selected, they appear highlighted in red on the map. Activation of the filter is reflected:
on the map content
on the attribute table content
on the data displayed by plots
on the print contents (only with QGIS 3.18)
Base layer¶
The list shows the active base layers at the cartographic group level.
If the user has created base layers starting from cached layers, these may also be present.
Legend¶
If at the publication level of the QGIS project, the Legend position option i setted as TOC, this panel will be not present and the legend will be rendered inside layers TOC.
If the option is activated on the QGIS project, the legend is filtered on the map content.
Time series¶
This version of G3W-SUITE manages the temporal aspects for both vector and raster layers but with limitations:
vector layers: limited to the Single field with Date/Time configuration
raster layers: only for NetCDF file upload as raster (no Mesh)
If in the QGIS project a temporal vector/raster layer on which the Dynamic temporal control property has been activated is present, the client will show an additional panel called Time series.
This panel will allow you to:
define the start/end date of the time series
define the step of the animation
start and manage the temporal animation
The modification of the start date of the series will determine the updating of the map with the visualization of the layer in coherence with the chosen date.
Pay attention: to use the Time series function for raster data, it must also be activated at the level of the G3W-ADMIN layer properties.
Temporal raster charts¶
If in the QGIS project a temporal raster layer on which the Dynamic temporal control property has been activated is present, the Time series panel .
The panel will show an additional button called Show Charts.
By clicking on it it will be possible to click on the map in different points obtaining, for each of them, a time chart that will show the variation of the values of the individual cells over time.
Editing on line¶
Activation and configuration¶
Thanks to the integration with the APIs of QGIS it is now possible to manage the main formats (geographically and not) supported by QGIS Server:
reading and editing mode
PostGreSQL/PostGis
SQLite/SpatiaLite
Oracle Spatial
GeoPackage (not recommended for multi-user editing)
ShapeFile
reading mode
SQL Server
Virtual layer
The suite also allows you to manage 1:N and N:M relational editing
.
Attention: the management of the editing of the N: M relations is limited to the management of the 1:N relationship between the parent layer and the intermediate table.
This means that currently it is not possible to create new records in table M but only:
modify the current relationships present
create new relationships between new elements of layer N and pre-existing records of layer M
The editing settings are defined partly at the QGIS project level (editing form structure, widgets associated with individual attributes, 1:n and N:M relationsrelations) and partly at the Administration level (users with editing power, activation scale, alpha and geo constraints).
It should be noted that this function manages multi-user editing
through a features-lock system.
When an enabled user activates the editing function at the map client level, the features visible on the map at that time will be blocked, in relation to the editing aspect, for all the other enabled users who will still be able to edit features present outside this geographical extension. .
This block will be deactivated when the user exits the editing mode.
QGIS project settings¶
Definition of the attribute editing form¶
In the QGIS project, for each layer it is possible to define the structure of the attribute display module.
The same structure will be used in the cartographic client when editing attributes.
The definition of the form structure can be managed, on QGIS, from the Properties of the vector
, in the Attributes Form section
.
Conditionals forms based on QGIS expressions¶
Conditional forms based on QGIS expressions are supported and implemented for online editing/consulting.
It is therefore possible to define the visibility of a forms (form or group) and of the fields it contains, on the basis of the values defined on further fields when filling in the attributes.
Drill-down (cascading) forms¶
Drill-down (cascading) forms based on QGIS expressions are supported and implemented for online editing.
The functionality can be used to implement “drill-down” within editing forms, where the values available in one field depend on the values of other fields.
This function will be reflected in the consultation side.
Definition of editing widgets associated with individual attributes¶
At the QGIS project level (always from Vector Properties
, Attribute Form
section) it is possible to define an alias and an editing widget for each attribute.
The alias and editing widgets defined at the project level will be available during web editing with some limitations.
Below are the available widgets and any limitations:
Checkbox
Date/time
: management of the date onlyAttachment
Range
Text edit
with this excluded options:multiline
html
Unique values
: this widget will be equipped with a pick layer tool at the cartographic client levelValue map
Value relations
with this excluded options:sort by value
allow multiple selections
filter expression
With regard to the Attachment widget
, it is necessary to specify that the association of a multimedia file with a feature requires that this file is uploaded to a dedicated space (exposed on the web) on the server and that the association takes place via a URL that refers to that file.
This solution allows you to consult the associated attachments also from QGIS or from other GIS software.
Additional settings at single layer level
In the Attribute Form
section of the Layer Properties
it is also possible to define for every field:
enable/disable editing
mandatory and/or unique constraints
range of acceptable values through the Range widget
default values
QGIS expressions and default values¶
All the QGIS expressions can be used as default values.
In this case, at the online edit level, the form relating to the field thus defined will be self-calculated and not editable by the user.
Very useful in all cases where we want the values of a field to be calculated automatically through the potential of QGIS expressions.
Definition of 1:n relations¶
In the event that, at the QGIS project level, one or more 1: n type relationships have been associated with a layer (Project menu → Properties…
, Relations
section), it will be possible to carry out relational editing also on the webgis platform.
Also for the tables related in 1:n mode it will be possible to define the attribute form structure, aliases and editing widgets in the QGIS project.
These configurations and tools will automatically available on the webgis platform.
Transaction Group¶
Use transaction group to edit, save or rollback multiple layers changes at once
When working with layers with the same source (es. layer from the same PostGreSQL database), activate the Automatically create transaction groups where possible
option in Project → Properties… → Data Sources
to sync their behavior (enter or exit the edit mode, save or rollback changes at the same time).
Administration settings¶
Activation of layer editing¶
To activate the online editing functions, access the Layer list
section of the project within the administration panel of G3W-ADMIN.
Identify the layer on which you want to activate the editing function and click on the Editing layer
icon located on the left
Attention: check that the layer format is among those supported by QGIS for the editing function
Clicking on the icon will open a modal window that will allow you to:
define the editing activation scale (only for geometric tables)
define the Viewer users (individuals or groups) enabled for online editing
For each user (single or group) it is possible to discriminate the editing powers:
Add: add feature, copy feature, add part to multipart
Update geometry: update vertex feature, move feature, add part to multipart, delete part from multipart, split features, dissolve features
Update attributes: update feature attributes, update attributes of selected features
Delete: delete features
I should be noted that:
Viewers users (individuals or groups) available in the drop-down menu will be limited to those who have allowed access in consultation to the WebGis project
Editor1 and Editor2 users, owners of the project, are enabled by default to the online editing function
NB: In case a user belongs to a user group, the permissions set will be added together.
Ability to associate references to create/update G3W-SUITE users¶
Through these two optional settings it is possible to define two fields of the table of the layer being edited automatically filled in.
These two fields will contain references to G3W-SUITE users who creators or modifiers of the individual features edited.
All settings defined at the QGIS level for these fields (eg default values) will no longer be considered.
It is recommended that these fields be set as non-editable at the project level.
1:N relational editing¶
To allow editing on the related table in mode 1: n , the editing function must also be activated (always in the same way) also for the related table present in the project layers list.
Constraints setting¶
G3W-SUITE allows you to manage two types of constraints:
alphanumeric (SQL) / QGIS expressions constraints
geographic constraints
Both work in terms of visualization and/or editing
Alphanumeric (SQL) / QGIS expressions Constraints¶
Alphanumeric (SQL) / QGIS expression constraints allow you to define, for each published layer, the subset of features that can be viewed and/or edited by individual users and/or groups of users.
This setting is also available for the AnonymousUser user
To activate this type of constraint, you must click, always at the level of the list of project layers, on the Alphanumeric constraints list
icon .
Clicking on the icon will show the list of any existing alphanumeric constraints and the item + New alphanumeric constraint
to create a new constraints.
Clicking on the item + New constraint
will open a modal window which will allow you to define a name and a description for the new constraint.
In the form it is possible to specify whether this filter will act at the level:
display only
editing only
in both cases
After clicking the OK button, the constraint will appear in the list and can be parameterized using two ways of defining the rules:
Provider’s language / SQL dialect
QGIS Expression
Clicking on the icon will open a modal window which, by pressing the green button
, it will allow you to define, for each user and/or group of users, the rules of the constraints.
The individual rules must be defined via the Provider's language
or the SQL dialect Rules
associated with the format of the geo-constraints layer (es. use standard SQL if your layer is a PostGis layer)
The single rules must refer to the layer’s attributes and values.
The Save icon
will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.
Once all the constraints have been entered and validated, click on the Close button to confirm the rules.
Clicking on the icon QGIS expression rules will open a modal window which, by pressing the green button
, it will allow you to define, for each user and/or group of users, the rules of the constraints.
The individual rules must be defined via QGIS expression
and this allows to have a great degree of freedom in the ways in which to set these rules.
See the paragraph dedicated to the functions available directly on the QGIS manual.
The Save icon
will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.
Once all the constraints have been entered and validated, click on the Close button to confirm the rules.
In the dedicated panel it will be possible to check, modify and delete the defined rules.
Geo-constraints¶
The online editing function also allows you to manage geo-constraints that allow the user to view and/or edit features only if they intersect or are contained within specific features of a second polygonal layer.
This setting is also available for the AnonymousUser user
To activate a geographical constraint, you must click, always at the level of the list of project layers, on the Manage Geo-Constraints
icon which will appear once the online editing function is activated.
Clicking on the icon will show the list of any existing constraints and the item + New geo-constraint
to create a new geo-constraints.
Clicking on the item + New geo-constraint
will open a modal window which will allow you to define the polygonal layer (among those present in the project) on which the constraint itself must be based.
In the form it is possible to specify whether this filter will act at the level:
display only
editing only
in both cases
Once the layer has been defined, the constraint will appear in the list and can be parameterized using the Rules icon
Clicking on this icon will open a modal window which, by pressing the green button , it will allow you to define, for each user and/or group of users, the rules of the constraints.
The individual rules must be defined via the Provider's language
or the SQL dialect Rules
associated with the format of the geo-constraints layer (es. use standard SQL if your geo-constraint layer is a PostGis layer)
The single rules must refer to the layer’s attributes and values.
The Save icon
will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.
Once all the constraints have been entered and validated, click on the Close button to confirm the rules.
In the alphanumeric constraints list you can see a summary of the setted rules.
Online editing tools at cartographic client level¶
Geographic and alphanumeric editing¶
Once the online editing function has been activated and configured on one or more layers of a WebGis project, the Editing
item, inside the Tools
menu of the cartoographic client, will be shown.
If the editing function is activated at the Admin level, it is also possible to start the online editing also through the Editing icon that appears at the level of the search and query results form of a vector layer.
By clicking on the Data Layers
item, the side menu will show the editing tools for all the layers on which this function is activated.
The actual activation of the editing function for the individual layers will take place by clicking on the Edit layer
icon.
Create and edit features¶
The tools available are the following:
Geometric layers
Add feature: to add a feature
Modify feature: to modify the attribute values associated with an existing feature
Update attributes for selected features: to modify the attribute values associated with more than one features
Update feature vertex: to modify the shape of a geometry
Move feature: to move a feature
Remove feature
Add part of a multi-geometry
Delete part of a multi-geometry
Copy features: to move one or more features
Dissolve features: to dissolve two or more features
Split features: to split one or more features
A help panel will describe the steps to take for copy, dissolve and split operations.
Snap and other available function¶
Activating the Add features and Update feature vertex tools allows you to:
activate the intralayer snap function
activate the snap between layers, but only if both layers are in editing mode
activate the interactive area and length measure function
Alphanumeric layer
Add feature: to add a record to the alphanumeric table
Modify features: to modify the attributes of an existing record
Whenever a new feature/record is added or an existing feature/record is update, the attribute editing form and the respective editing widgets will be displayed as defined at the QGIS project level.
Any mandatory fields will be marked with an asterisk.
Any unfulfilled constraints will be highlighted with specific warning messages shown in red.
The changes made can be saved only after satisfying any constraints of mandatory and/or uniqueness.
For this reason the green button SAVE will be disabled until all constraints are met.
Saving changes¶
Saving all the changes made in an editing session can be done in two ways:
by clicking on the
diskette icon
placed at the top right. The changes made will be saved and you can continue making new changes
by deactivating the editing by clicking on the
Edit layer icon
.
By deactivating the editing function, a modal window will be displayed which will show the list of changes made and the request for confirmation or not of saving them.
Remember that during the editing phase the undo/redo icons
allow you to delete/restore the latest changes made.
Introduction¶
The tutorial is based on a QGIS project dedicated to the management of a layer representing a series of buildings located on the territory.
In addition to the geographical aspects, the project involves the management of numerous and diversified attributes and of the related maintenance interventions through a 1: n type relationship.
Through the tutorials it will be possible to:
customize the various graphic-functional aspects of the basic project
publish the project as a WebGis service
create personalized searches
add plots made with DataPlotly QGIS plugin
activate the editing functionality by customizing associated forms and widgets
Download demo data¶
The tutorial is based on predefined data and QGIS 3.22.x LTR project downloadable from this link.
The .zip file contains the G3W-SUITE
directory with three sub directories:
projects
: containing a QGIS project (buildings_management.qgs
) already optimized for the tutorialproject_data/spatialite
: containing a SpatiaLite DB with basic data (build_management_demo.sqlite
)plots
: containing a a series of plots created with the DataPlotly plugin and saved in xml format
Inside the build_management_demo.sqlite
SpatiaLite DB there are the following layers:
buildings
(polygon layer): reference layer for editing aspectsmaintenance_works
(alphanumeric table): with the maintenance interventions associated with the individual buildingsbuildings_rating
(alphanumeric table): with the annual assessments relating to individual buildingsroads
(linear layer): layer to define the address associated to any buildingswork_areas
(polygon layer): with the perimeter of work areas to be used to define any geo-constraintstype_subtype
(alphanumeric table): a decoding table of the type and subtype values associated with the individual buildings
IMPORTANT: a copy of this data are present on the server, you can not change your local data copy
The project (based on QGIS LTR 3.22.x) foresees:
a dressing categorized by the
buildings
layer based on the categorical fieldtype
the presence of a 1: n relationship between the
buildings
layer and the alphanumericmaintenance_works
andbuildings_rating
tablespre-developed query forms for the
buildings
layer and themaintenance_works
tablepredefined editing widgets for the fields of the two main layers:
buildings
,maintenance_works
andbuildings_rating
tablestwo standard print layout in A4 and A3 and an two atlas print layout based on buildgs layer features
Modify the QGIS project title¶
The publication system provides for the use of the title of the project as the unique identifier of the WebGis service.
So, before publishing the project, it will be NECESSARY to change the title associated with the basic project (Project -> Properties ... - Session: General
)
Access the online service¶
To publish the project, you can access the G3W-SUITE test application via the following URL: https://v33.g3wsuite.it
To access the Administration Panel it is necessary to log in using the following credentials:
user:
demo
password:
G3wsuite!
In case of login fails, report the problem to info@gis3w.it
Publish the QGIS project as a WebGis service¶
After authentication it will be possible to access the Administration session
and view the Dashboard.
In the Dashboard there will be the menu for access to the Cartographic Groups pertaining to your user and the menus relating to additional modules not active in this demo.
Click on the Show
item in the ligth blue Groups box to acces at the list of available Cartographic Groups.
Access the list of webgis in the Cartographic Group G3W-SUITE Demo
clicking on the project number shown.
Now click on the button to publish your QGIS project.
Fill out the form defining the various aspects to be associated with the WebGis service being published:
QGIS project¶
QGIS file
: load the QGIS cartographic project to be published (.qgz or .qgs file)
ACL Users¶
Management of access permissions
Viewers users
: define the individual users (Viewers) who have the credentials to view the WebGis service. By choosing the anonymous user (AnonymusUser) the group will be freely accessible.Viewer user groups
: you define the user groups (Viewer) which have the credentials to view the content of the service.
Default base layer¶
In this session you define which base layer
should be active at startup.
The choice is limited to the list of base layers activated for the cartographic group in which you work.
It is also possible not to define any active base layer at startup.
Description data¶
Public title
: Title to be associated with the project and displayed on the client header. If left blank, the title associated with the QGIS project will be used or, in the absence of this, the name of the project fileDescription
: Description of the project, it will appear at the public portal level.Thumbnail (Logo)
: logo to associate with the project. This image will be viewable in the list of projects within the cartographic groupURL alias
: a human readable URL for the map
ATTENTION: contents marked with * are mandatory.
Options and actions¶
Choose your preferred options regarding the following options:
User QGIS project map start extent as webgis init extent:
check this control if you want set initial extent from QGSI project initial extent, Project properties -> QGIS Server -> WMS capabilities (Advertised extent)Tab's TOC active as default:
set tab’s TOC (Layers, Base layers, Legend) open by default on startup of webgis serviceLegend position rendering:
this option allows to set legend rendering position:In a separate TAB: default value, the legend is rendered into a separate tab
Into TOC layers: the legend is rendered inside layers toc
Automatic zoom to query result features:
if in the results of a search there are only features of a layer, the webgis automatic zoom on their extension
After filling in the various form, click on the Save button
to confirm your choices.
If the publication was successful, the QGIS project will appear in the list of projects in the Cartographic Group.
Clicking on the
View map
icon will access the WebGis service in consultation.
Update the published WebGis service¶
If you want to modify some graphic-functional aspects of your WebGis service, modify your QGIS project and update the WebGis service by clicking on the Modify
icon .
Reupload the QGIS project with your changes, click on the Save button and see the resuts on the cartographic client.
Activation of additional functions¶
Once your project has been published, you can access the list of widgets and additional functions to enrich your WebGis service.
Widget management¶
Thougth the Layers list
icon it is possible to access the list of the geographical states that compose it and define some functional aspects that will be enabled at the cartographic client level.
The new session will show you the list of the layer present in the published QGIS project
Label: layer alias applied at the QGIS project level
The eye icon allows you to know the ID associated with the layer at the project level, this ID will be useful for creating parameterized URLs
Name: name of the layer (file or DB table)
Type: illustrates the type of data (WMS, PostGis, SpatiaLite, GDAL / OGR …)
WMS external: to speed up loading, the WMS layers present in a QGIS project are managed directly by Django and not by QGIS-Server. However, this method prevents the application of any styling (e.g. opacity level) defined at the project level. The choice of the external WMS option means that the WMS layer is managed directly by QGIS-Server and therefore the associated styling is applied.
WFS: a check mark shows whether the layer is published as a WFS service or not
Actions: a series of icons dedicated to various functions
Caching Layer: allows you to activate and manage the cache of the single layer at the project level
Editing layer: shows if the online editing function is active on the layer and allows you to activate and define it
Hide layer by user/groups: hide specific layers from the TOC based on specific users or groups of users
QPlotly widget: add or manage plots created with DataPlotly QGIS plugin
Geo-constraints by user/group: create or manage editing and visualization geo-constraints based on poligonal layers
Alphanumeric and QGIS expressions constraints by user/groups: create or manage editing and visualization constraints based on SLQ language or QGIS expressions
Hide columns by User/Groups: create or manage constraints on one or more fields of a layer based on single or group user/s
Widgets list: shows how many widgets (eg searches) are associated with this layer and allows you to activate new ones
Manage layer styles: manage multi-style layer
Not show attributes table: hide attributes table of the layer for every users
No legend: it allows to define if the layer must have published the legend at TOC level of the WebGis client
Download: allows the download of the geographic and not geographic layers in various formats
Download as shp/geotiff: for vector and raster layers
Download as GPK: for geographic or not geographic layers
Download as xls: for all types of layers, in .xls format
Download as csv: for all types of layers, in .csv format
Download as gpx: for geographic layers, in .gpx format
The number above each Action icon shows if and how many related objects are present.
Try to activate the available options and test the result on the WebGis
Search widget creation¶
To create a search tool available at WebGis level, choose the vector layer on which to apply the tool and click on the Widget list icon
NB: there may be a number of searches created by other users for the same layer.
You can activate them by clicking on the Linked
chekbox.
The listed searches can be modified, deleted or unlinked using the appropriate icons.
To create a new search, click on the blue link New widget
.
In the related form we can define:
Form Title
Type
: “Search”Name
: name that G3W-SUITE will use to internally register the search widget.
General configuration of research and results
Search title
: title that will become available in the ‘Research’ panel of the WebGis interface
Search fields settings
Field
: field on which to carry out the researchWidget
: method of entering the value to be searchedInputBox
: manual compilationSelectBox
: values shown via drop-down menuAutoCompleteBox
: values shown through auto-complete modeAlias
: alias assigned to the field that will appear in the search formDescription
: description assigned to the fieldComparison operator
: comparison operator (=, <,>,> <,> =, <=, LIKE, ILIKE) through which the search query will be carried out. The LIKE and ILIKE operators will only be available for PostGis or SpatiaLite layersDependency
: this parameter (optional) allows, only in the case of SelectBox widgets, to list the list of values of a field filtered according to the value defined for the previous fields. The tool allows, for example, to display, in the drop-down menu dedicated to the choice of cadastral particles, only the particles connected to the sheet chosen in the previous option. This function is only available for PostGis or SpatiaLite layers.
Now it is possible to define the dependence more or less strong (strictly).
In case of strictly dependence, the values of the dependent fields will be loaded only after the choice of the value of the field on which the dependency depends.
Otherwise it will be possible to define the values of the individual fields freely and without a specific order. The values available for the other fields will in any case depend on the choice made.
The button allows you to add additional fields for the construction of the search query currently manageable through AND/OR operators.
The example below shows the compilation of the form for creating a search widget dedicated to a cadastral cartography layer.
Once the form has been filled in, click on the OK button
to save the settings.
Once the settings are saved, the created widget will appear in the list of Widgets associated with the layer.
The widget will already be linked
and therefore available in the WebGis interface on the left panel.
Plots widget¶
Add plots created using QGIS DataPlotly (a great plugin developed by Matteo Ghetta) in the cartographic client.
The module, based on the Plotly library, manages plots saved as xml.
The plots are connected to the layers defined on the QGIS project, in this way, as for the searches and the constraints, it is possible to activate the same plots on all WebGis services in which the reference layer is present.
For this reason, there may be some plots created by other users for the same layer.
You can activate them by clicking on the Linked
chekbox.
The title of the chart, defined at the plugin level, will be the unique identifier.
Try to create your plots in the QGIS project, save them as .xml and upload them to view the resluts on the webgis.
The graphs are filterable based on the:
features visible on the map
filter based on the selected features
These filters are also reflected on the plots associated to the related data (in 1:N mode) based on the visible and/or selected parent features.
The filter based on the map content can be activated globally on all plots (icon at the top of the panel dedicated to charts) or on only some specific plots (icon placed at the level of the individual plots).
The plots will automatically update after pan and zoom operations on the map
If activated, the filter based on the selected features is automatically activated on all related plots (associated with the same layer and with the 1:N relationed tables)
Appropriate messages at the single plots level will indicate the activation of these filters.
If 1: N relationships are associated with the interrogated layer and plots have been activated on the referencing tables, it will also be possible to consult these plots by querying the referenced layer and clicking on the Show relation charts icon present in the results form.
Show relation charts: display of graphs related to 1: N related data. Only if 1: N relationships are associated with the interrogated layer and graphics have been activated on the boy tables.
Editing on line¶
Forms and editing widgets are already defined on the project associated with the tutorial for the geometric layer of buildings and for the alphanumeric table related interventions_maintenance.
Buildings
id (integer - primary key): autogenerate
name (text NOT NULL): text edit
address (text): Value relation (roads layer - code/name fileds)
zone (text): text edit (with default values based on a QGIS expression to for association with the intersecting works area)
type (text NOT NULL): unique values (Administrative, Commercial, Residential)
subtype (text NOT NULL): value relation (based on type_subtype table for a drill-down cascading forms)
attachment (integer): check box 1/0 (the visibility of the conditional form Documents is based on this field)
photo (text): attachment
link (text): text edit
form (text): attachment
user (text): text edit (automatically filled in with the G3W-SUITE username creator of the feature)
year (integer NOT NULL): unique values (2015,2016,2017,2018,2019,2020)
high (integer NOT NULL): range (10-30 step 2)
volume (integer): range (50-200 step 10)
surface (integer): text edit
architectural_barriers (text): Checkbox (Checked - Not checked)
date_barriers (date): date (yyyy/MM/dd)
safety_exits (text): checkbox (Checked - Not checked)
date_exits (date): date (yyyy/MM/dd)
fire_system (text): Checkbox (Checked - Not checked)
date_fire (date): date (yyyy/MM/dd)
Maintenance_works
id (integer - primary key): autogenerate
id_buildings (text - relation key): text edit
maintenance (text NOT NULL): unique values
date (date): date (yyyy/MM/dd)
form (text): attachment
value (integer): range (10-30 step 2)
outcome (text): unique values (good, medium, bad)
responsible (text): text edit
cost (integer): range (1000-5000 step 1)
validation (boolean): checkbox (0/1)
Buildings rating
id (integer - primary key): autogenerate
id_buildings (text - relation key): text edit
date (date): date (yyyy/MM/dd)
value (integer): range (1000-4000 step 500)
year (integer): range (2018-2022 step 1)
To activate the editing function on webgis, access the list of layers and identify the three layers shown above.
Clicking on the icon Editing layer (placed at the left of each rows) will open a modal window that will allow you to:
define the
editing activation scale
(only for geometric tables)define the
Viewer users
(individuals or groups)enabled
for online editing
With regard to the last aspect, it should be noted that Viewers users (individuals or groups) available in the drop-down menu will be limited to those who have allowed access in consultation to the WebGis project
Once the editing function is activated, updating the service, the Tools menu
will appear on the left panel.
By activating the editing function it will be possible to edit the geometries and attributes of the Public Buildings layer and the related interventions.
For further information on the web editing function, read the dedicated chapter on the manual
Personalize your demo¶
Do you want to test the online editing function more deeply?
Redefine attribute forms, aliases and editing widgets associated with the individual fields and reload the project to check the new settings.
It is advisable to consult the paragraph dedicated to the list and limitations of the individual editing widgets inheritable from the QGIS project.