Welcome to G3W-SUITE’s 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 is compatible with QGIS 3.10 LTR (Server and Desktop).

G3W-SUITE is a modular client-server application for the publication and management of QGIS cartographic projects, consisting of 2 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

Optional OS modules are:

  • Front-end geographic portal: access to information, thematic groups and WebGis services

  • Caching Module: tile caching module for single layer powerd by TileStache4

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

_images/admin.jpg _images/client.jpg

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

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

Install requirements

Possibily within a virtual env:

pip install -r requirements.tx

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 dockerization is based on project of Alessandro Pasotti (elpaso, https://github.com/elpaso).

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/
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

# Caching
G3WSUITE_TILECACHE_PATH=/shared-volume/tile_cache/
TILESTACHE_CACHE_BUFFER_SIZE=256

# URL of the QGIS Server
G3WSUITE_QDJANGO_SERVER_URL=http://qgisserver/ows/

# Set G3W-SUITE debug state
G3WSUITE_DEBUG = 1 (0 default)

Build

G3W-SUITE

The main suite image can be built with:

docker build -f Dockerfile.g3wsuite.dockerfile -t g3wsuite/g3w-suite-dev:latest --no-cache .

The container image is build from https://github.com/g3w-suite/g3w-admin.git --branch v.3.0.x

The Docker hub name for this image is g3wsuite/g3w-suite-dev:latest

Postgis

Postgis image can be built with:

docker build -f Dockerfile.postgis -t g3wsuite/postgis:11.0-2.5 .

The Docker hub name for this image is g3wsuite/postgis:11.0-2.5

HTTPS additional setup

  • check the domain name in the .env file and in config/nginx/django_ssl.conf

  • run mkdir -p /shared-volume/ssl/certs/

  • run sudo openssl dhparam -out /shared-volume/ssl/certs/dhparam-2048.pem 2048

  • run: docker pull certbot/certbot

  • launch ./run_certbot.sh

  • make sure the certs are renewed by adding a cron job with crontab -e and add the following line: 0 3 * * * /home/g3w-suite/rl.g3wsuite.it/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

Run

docker-compose up -d

Ports

  • web application: 8080

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.

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.

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):

  1. set scale-dependent visibility for the entire layer or for some filtered features (example: show only major roads until at scale 1:1E+6)

  2. 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);” )

  3. start the project with only a few layers turned on by default

  4. do not turn on by default base-layers XYZ such as (Google base maps)

  5. do not use rule-based/categorized rendering on layers with too many categories (example: elec_penwell_public_power), they are unreadable anyway

  6. enable redering simplification for not-point layers, set it to Distance 1.2 and check Enable 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=#

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-caching (https://github.com/g3w-suite/g3w-admin-caching) module and other third part django modules. G3W-SUITE accessory modules:

DATASOURCE_PATH

Path to geo data directory (shp, Spatialite, raster, etc..).

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.

USER_MEDIA_ROOT

Base user media directory, to fill with media files. Is necessary for editing module, to manage media elements do upload on a editing session.

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_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_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
}

Editing setting

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.

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

The current release is compatible with QGIS 3.10.x LTR.(Server and Desktop).

_images/demo_qgis_project.png

_images/demo_webgis_project.png

Version

At the moment is not used a classic versioning system for the suite, there are main 3 branches.

Branch Python version Django version QGIS API Status
dev 3.6 2.2 Used Continue developing
dj22-py3 3.6 2.2 Not used Bug fixing
py2 2.7 1.11 Not used Bug fixing

Technological infrastructure

The publishing system is based on a series of OS tools and software

  • PostgreSQL/PostGis: for the management of application data

  • PostgreSQL/PostGis or SpatiaLite: for the management of gegraphic data

  • QGIS Server LTR as OGC services server

  • G3W-ADMIN - the Administration component: developed in Python using Django

  • G3W-CLIENT - the Cartographic client: based on OpenLayer3 and developed with reactive tecnology by Vue.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 and Vue.js.

  • Gulp.js as task runner

_images/architecture.png

Below is a diagram relating to the standard workflow

_images/architecture_workflow.png

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 QGIS API, G3W-SUITE manages in visualization and editing the main formats (geographic and not) managed by QGIS through the OGR/GDAL library and other specific providers.

Consult the list of formats managed by QGIS.

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 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 or OGR format

If your geographical data are stored on SpatiaLite or on physical files (.gpkg, .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)

_images/datamanagement.png

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 geo_data directory must be synchronized on the server where the G3W-SUITE application is installed.

The geographic data stored in the local geo_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 the Configurations icon _images/iconconfiguration.png located in the upper right corner.

Choose the File Manager item in the linked menù.

_images/g3wclient_icon_config.png

_images/g3wsuite_administration_configuration_menu.png

Using this tool it is possible to manage the physical geographic data on the server in a simple and intuitive way.

This the directories present by default:

  • geo_data: the folder in which to store the geographical data and any images inserted in the print layouts

  • media_user: a folder exposed on the web, to store your multimedia files

  • svg: a folder to store extra SVG icons used your QGIS projects

All the folder 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.

_images/g3wsuite_administration_file_manager.png

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.

_images/g3wsuite_administration_organization_containers_simple.png

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 him

  • Anonymus 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

_images/g3wsuite_administration_organization_containers_no_mg.png

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.

_images/g3wsuite_administration_organization_containers.png

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.

_images/roles_table.png

QGIS: project settings

This section describes how to optimize your QGIS projects for publication 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 geographical extension displayed when the WebGis service starts

  • the projection systems for which the OGC services are available

  • the possibility to exclude some associated print layouts on the WebGis service

  • which layers are queryable and searchable

  • which vector layers can be queried using WFS

  • which fields (for each vector data) and with which aliases are made visible following interrogation on the WebGis service

  • the structure of the query form visible on the WebGis service

  • the associated print layouts

The following paragraphs describe which QGIS project settings are more relevant in relation to the published WebGis service.

QGIS: 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.

_images/projecttitle.png

Data sources

This submenu defines the querable layers at the WebGis service level.

Check the Identifiable column for the layers that we want to query on the WebGis

The option Automatically create transaction group where possible is automatically inherited in the online editing function.

_images/datasources.png

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] (https://g3w-suite.readthedocs.io/en/latest/g3wsuite_client.html#metadata)

_images/qgisservercapabilities.png

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.

_images/qgisserversetmapexpetent.png

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.

_images/qgisserversrisrestriction.png

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.

_images/qgisserverexludecompositions.png

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 option

  • the option Add geometry to feature response must be checked to activate the zoom to the features on the WebGis service

_images/qgisservergeneralaspects.png

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

_images/qgisservergeneralaspectswfs.png

QGIS: layer 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 _images/iconconfiguration.png, located in the upper right corner of the Administration Panel, allows you to access a menu that includes the File Manager item.

_images/g3wclient_icon_config.png

_images/g3wsuite_administration_configuration_menu.png

Through this tool it is possible to manage SVG icons on the server in a simple and intuitive way.

_images/g3wsuite_administration_file_manager.png

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

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.

_images/qgislayerproperties_wmsfields.png

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 the File Manager tool in the Suite Administration Panel

  • insert 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

_images/qgis_form_attribute.png

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.

_images/qgislayerproperties_displayform.png

Performances optimization

Mandatory rules

  • PostGreSQL/PostGis and SQLite/Spatialite layers must have a primary key

  • PostGreSQL/PostGis and SQLite/Spatialite layers must have only a geometric column

  • not use numeric type field in PostGreSQL/PostGis layer

  • the primary key field and all fields involved in search, join, 1:n relation 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 managed.

  • insert only one Map element in the print layouts.

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 front-end portal contains a brief presentation of the service and a side menu with the following items:

  • About it

  • Maps

  • Login

_images/g3wsuite_portal_frontend.png

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.

_images/g3wclient_icon_config.png

About it

The About it session can contains a small introduction and contact information for your company or public facility.

_images/g3wsuite_portal_aboutit.png

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.

_images/g3wsuite_portal_macrogroups.png

_images/g3wsuite_portal_groups.png

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

_images/g3wsuite_portal_login.png

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 _images/iconconfiguration.png: to access a menù 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

_images/g3wsuite_administration_desk.png

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 _images/iconconfiguration.png located at the rigth bottom and choose the item Edit general data which will appear in the menu below.

_images/g3wsuite_administration_configuration.png

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 page

  • About data: info that will appear in the About it session

  • Group map data: info that will appear in the Maps session

  • Login data: info that will appear in the Login/Administration session

  • Social media data: links to the social channels that will appear in the About it it session

  • Map 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.

_images/g3wsuite_administration_configuration_homedata.png

_images/g3wsuite_administration_configuration_homedata_result.jpg

Front End About Data

Informations that will appear in the About it session

ATTENTION: contents marked with * are mandatory.

_images/g3wsuite_administration_configuration_aboutusdata.png

_images/g3wsuite_administration_configuration_aboutusdata_result.jpg

Frontend Groups Map Data

Information that will be displayed in the Maps session

ATTENTION: contents marked with * are mandatory.

_images/g3wsuite_administration_configuration_mapgroupsdata.png

_images/g3wsuite_administration_configuration_mapgroupsdata_result.jpg

Front End Login Data

Information that will be displayed in the Login/Administration session

ATTENTION: contents marked with * are mandatory.

_images/g3wsuite_administration_configuration_logindata.png

_images/g3wsuite_administration_configuration_logindata_result.jpg

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.

_images/g3wsuite_administration_configuration_socialdata.png

_images/g3wsuite_administration_configuration_socialdata_result.jpg

Map client data

Main title to be displayed in the cartographic client bar

_images/g3wsuite_administration_configuration_mapclientdata.png

_images/g3wsuite_administration_configuration_mapclientdata_result.jpg

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.

_images/buttom_save.png

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 address

  • Login: username and password

  • User 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

_images/g3wsuite_administration_user_add.png

After filling in the various form, click on the Save button to confirm your choices.

_images/buttom_save.png

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)

_images/g3wsuite_administration_user_list.png

The icons at the head of each row, allow you to:

  • _images/icon_edit.png Modify: to modify the characteristics of the user

  • _images/icon_erase.png 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 inserted

  • Viewer: 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)

_images/g3wsuite_administration_usergroup_add.png

After filling in the from, click on the Save button to confirm your choices.

_images/buttom_save.png

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.

_images/g3wsuite_administration_usergroup_list.png

Using the icons at the head of each row, you can:

  • _images/icon_view.png Show details: to consult the characteristics of the user group

  • _images/icon_edit.png Modify: to modify the characteristics of the group

  • _images/icon_erase.png 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 (roles)] (https://g3w-suite.readthedocs.io/en/latest/user_groups_organization.html#hierarchical-organization-of-webgis-services-and-types -of-users-roles) 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 header

    • Use title for client option

    • Use logo image for client option

  • Description: the description to be associated with the MacroGroup in the frontend

  • Logo 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.

_images/buttom_save.png

MacroGroups list

The menu provides access to the list of cartographic macro-groups present.

_images/g3wsuite_administration_macrogroup_list.png

There are a series of icons to access specific functions:

  • _images/icon_view.png Show the details of the MacroGroup

  • _images/icon_edit.png Change characteristics of the MacroGroup

  • _images/icon_erase.png 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 content

  • Language*: interface language

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

Logo/Picture
  • Header logo img*: the logo to be displayed in the header del client cartografico

  • Logo link: a eventual link to associate with the logo

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 user

  • Editor2 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 access

  • Editor 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.

_images/g3wsuite_administration_group_add_acl.png

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 default features

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. for the layers to be queried according to this method it is necessary that they 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. searchable layers must be 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 (useful for consultation from tablet)

    • nominatin: address search tools and toponyms based on OSM

    • streetview: Google StreetView on your map

    • length: linear measuring instrument

    • area: surface measuring instrument

    • addlayers: tool for temporarily uploading GeoJson, KML and SHP (zipped) vector layers to WebGis

    • screenshot: tool to take a screenshot of the map area

  • Baselayer: choice of the base maps that will be available on the WebGis client

  • Background color: choice of the background color of the maps (default white)

_images/g3wsuite_administration_group_add_geodata.png

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.

_images/buttom_save.png

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:

  • _images/icon_add.png Add a new project to be published on the WebGis service

  • Number and links to projects published within the Group

  • _images/icon_view.png Show group details

  • _images/icon_edit.png Change group characteristics

  • _images/icon_erase.png 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.

_images/g3wsuite_administration_group_list.png

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 _images/icon_add.png 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 _images/button_add_qgis_project.png

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.

_images/g3wsuite_administration_project_add_acl.png

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 group

  • URL 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 Project properties

  • Name of the QGIS project file

Options and actions

These 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*:

  • Query control mode*:

  • Query by bbox control mode*:

  • Query by polygon control mode*:

ATTENTION: contents marked with * are mandatory.

_images/g3wsuite_administration_project_add_option.png

After filling in the various form, click on the Save button to confirm your choices.

_images/buttom_save.png

If the operation is successful we will see the new project appear in the list of projects in in the working Cartographic Group.

_images/g3wsuite_administration_project_addproject_result.png

_images/g3wsuite_portal_groups.png

Define the Groups order on the FrontEnd

The individual WebGis services will be arranged, within the Thematic Groups to which they belong, in alphabetical order based on the title of the service.

Update/ Manage WebGis services

To update a published WebGis service, access the list of projects in the Cartographic Group.

Click on the Edit _images/iconsmall_edit.png 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.

_images/g3wsuite_administration_project_manage.png

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.

_images/g3wsuite_administration_project_manage_list.png

Through the single icons, placed at the level of each project, it is possible to:

  • _images/iconsmall_viewmap.png Display the cartographic project on the WebGis interface: to check the display by the user

  • _images/iconsmall_layerlist.png Access the list of layers present within the project and define their functional aspects

  • _images/iconsmall_view.png View the project specifications

  • _images/iconsmall_edit.png Update a project: update of the QGIS file and other options related to the project

  • _images/iconsmall_erase.png 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

  • _images/iconsmall_download.png Download of the QGIS project

  • _images/iconsmall_wms.png Test the WMS Capabilities of 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 _images/iconsmall_layerlist.png 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.

_images/g3wsuite_administration_project_layer_list.png

Next to each layer are a series of icons and checkboxes:

  • _images/icon_cache.png Caching Layer: allows you to activate and manage the cache of the single layer at the project level

  • _images/icon_editing.png Editing layer: shows if the online editing function is active on the layer and allows you to activate and define it

  • _images/icon_widget.png List of widgets: shows how many widgets (eg searches) are associated with this layer and allows you to activate new ones

  • No legend: it allows to define if the layer must have published the legend at TOC level of the WebGis client

  • Download as shp: allows the download of the geographic layer, in .shp format

  • Download as xls: allows the download of the layer (geographic or not), in .xls format

  • 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.

  • _images/icon_layertype.png Type: illustrates the type of data (WMS, PostGis, SpatiaLite, GDAL / OGR …)

  • WFS: a check mark shows whether the layer is published as a WFS service or not

  • Name: name of the layer

  • Label: layer alias applied at the QGIS project level

Display filters

By accessing the list of layers, it is possible to define display filters for users authorized to consult the project

These filters work both for viewing and editing.

See the dedicated paragraph in the Editing on line session.

Search widget setting

In G3W-SUITE it is possible to create search widgets.

Be careful: in this release searching is not available on simple join (1:1/n:1) data

They 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 _images/icon_widget.png

_images/g3wsuite_administration_project_widget_list.png

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.

_images/g3wsuite_administration_project_widget_choose.png

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 research

    • Widget: method of entering the value to be searched InputBox: manual compilation SelectBox: values ​​shown via drop-down menu (only for PostGis or SpatiaLite layers)

    • Alias: alias assigned to the field that will appear in the search form

    • Description: description assigned to the field

    • Comparison 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 layers

    • Dependency: 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.

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

The button allows you to add additional fields for the construction of the search query currently manageable through the AND operator alone.

_images/button_add.png

The example below shows the compilation of the form for creating a search widget dedicated to a cadastral cartography layer.

_images/g3wsuite_administration_project_search_form.png

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.

_images/demo_search_result.png

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.

Multilinguage

By default the suite manages two languages: English and Italian.

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.

_images/language_client.png

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.

_images/language_admin.png

Front end

Fixed front end content is already available in the two basic languages.

Variable contents, i.e. user-definable contents, are instead translated:

  • Sessions Home, About, Maps and Login: content that can be defined and translated in the Edit General Data session of the Control Panel Administration

  • Sessions MacroGroups Cartogarfici, Groups Cartogarfici and WebGis 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

_images/language_form.png

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 viewer

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.

_images/g3wclient_header.png

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

  • 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

  • Tools: session that collects the various tools that may be activated on the WebGis service

_images/g3wclient_tool_panel.png

The centrally located map area presents the various navigation and map interaction controls, this controls are defined at the Cartographic Group level.

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.

_images/g3wclient_metadata_view.png

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

On the map, a lit rectangular area will allow you to define the print area.

_images/g3wclient_print_tool.png

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 Search menu contains the list of search tools defined through the Administration panel.

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.

The drop-shaped icons will allow you to zoom in on the extension relating to the resulting overall features or that of the individual features.

The CSV icon allows you to download the attributes associated with the features in CVS format.

_images/g3wclient_search_example.png

Map

  • 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 of the various layers

    The right button on the name of the single layer shows the following items:

  • Zoom to layer: to zoom in on the extension of the layer

  • Open the attribute table: to consult the associated attribute table

  • Download shapefile: to download the layer as a shapefile; available only for PostGis, SpatiaLite and GeoPackage layers, following activation of the function from the administration panel

  • Download XLS: to download the layer as a XLS; available for the main layer formats, following activation of the function from the administration panel

  • WMS URL: URL of the WMS service relative to the project or URL of the external WMS

The attribute table 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.

A filter, applied generically to the contents of all the fields, will allow you to filter the list of displayed records.

_images/g3wclient_table_view.png

Editing on line

Activation and configuration

Thanks to the integration with the QGIS API, G3W-SUITE allows you to edit all the formats (geographic and not) edited by QGIS through the OGR/GDAL library and other specific providers.

Consult the list of formats managed by QGIS.

The tool also allows you to manage 1:N relational editing.

Be careful: in this release editing is not available on simple join (1:1/n:1) data

The editing settings are defined partly at the QGIS project level (editing form structure, widgets associated with individual attributes, 1:n relationships) and partly at the Administration level (users with editing power, activation scale, any geoconstraints).

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.

_images/editing_qgis_form_widget.png

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 only

  • Attachment

  • Range

  • Text edit with this excluded options:

    • multiline

    • html

  • Unique values

  • Value 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 fields:

  • mandatory and/or unique constraints

  • enable/disable editing

  • default values

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).

_images/datasources.png

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 _images/icon_editing.png located on the left.

Attention: check the list of formats supported by QGIS for editing.

_images/editing_layer_list.png

Identify the layer on which you want to activate the editing function and click on the Editing layer icon _images/icon_editing.png 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

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

  • Editor1 and Editor2 users, owners of the project, are enabled by default to the online editing function

_images/editing_setting.png

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 / QGIS expressions constraints that operate both in terms of visualization and editing

  • geographic constraints that operate only at the editing level

Alphanumeric / QGIS expressions Constraints

Alphanumeric / QGIS expression constraints allow you to define, for each published layer, the subset of features that can be viewed and edited by individual users and/or groups of users.

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 _images/icon_alpha_constraints.png.

Clicking on the icon will show the list of any existing alphanumeric constraints and the item + New alphanumeric constraint to create a new constraints.

_images/editing_alpha_constrain_layer.png

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.

After clicking the OK button, the constraint will appear in the list and can be parameterized using two ways of defining the rules:

  • _images/icon_alphaconstraints_setting.png Provider’s language / SQL dialect

  • _images/icon_qgisconstraints_setting.png QGIS Expression

Provider’s language / SQL dialect Rules

Clicking on the icon _images/icon_alphaconstraints_setting.png will open a modal window which, by pressing the green button _images/button_add.png, 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 _images/icon_save.png will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.

_images/editing_alpha_constrain_setting.png

Once all the constraints have been entered and validated, click on the Close button to confirm the rules.

QGIS Expressions Rules

Clicking on the icon QGIS expression rules _images/icon_qgisconstraints_setting.png will open a modal window which, by pressing the green button _images/button_add.png, 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 _images/icon_save.png will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.

_images/editing_qgisconstrain_setting.png

Once all the constraints have been entered and validated, click on the Close button to confirm the rules.

Geo-constraints

The online editing function also allows you to manage geo-constraints that allow the user to insert/modify features only if they intersect or are contained within specific features of a second polygonal layer.

To activate a geographical constraint, you must click, always at the level of the list of project layers, on the Manage Geo-Constraints icon _images/icon_constraints.png 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.

_images/editing_constrain_layer.png

The icons placed next to any constraints already present allow you to edit/delete the constraint itself.

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.

Once the layer has been defined, the constraint will appear in the list and can be parameterized using the Rules icon _images/icon_constraints_setting.png

Clicking on this icon will open a modal window which, by pressing the green button _images/button_add.png, 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 _images/icon_save.png will allow you to validate the rules, in order to ensure proper functioning of the constraints itself.

_images/editing_geoconstrain_setting.png

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.

_images/editing_geoconstrain_layer_summary.png

Online editing tools at cartographic client level

Direct 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.

_images/editing_client_start.png

_images/editing_client_tool.png

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

  • _images/icon_feature_add.png Add feature: to add a feature

  • _images/icon_feature_attribute.png Modify feature: to modify the attributes associated with an existing feature

  • _images/icon_feature_modify.png Update feature vertex: to modify the shape of a geometry

  • _images/icon_feature_remove.png Remove feature

  • _images/icon_feature_move.png Move feature: to move a feature

  • _images/icon_feature_copy.png Copy features: to move one or more features

  • _images/icon_feature_dissolve.png Dissolve features: to dissolve two or more features

  • _images/icon_feature_split.png Split features: to split one or more features

Activating the Add features and Update feature vertex tools allows you to activate the snap intralayer function.

A help panel will describe the steps to take for copy, dissolve and split operations.

Alphanumeric layer

  • _images/icon_record_add.png Add feature: to add a record to the alphanumeric table

  • _images/icon_record_modify.png 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.

_images/editing_form.png

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 _images/icon_disk.png 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 _images/icon_edit2.png.

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.

_images/editing_client_save.png

Remember that during the editing phase the undo/redo icons _images/icon_undoredo.png 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

  • activate the editing functionality by customizing associated forms and widgets

_images/demo_qgis_project.png

_images/demo_webgis_project.png

Download the demo data

The tutorial is based on predefined data and QGIS 3.10 LTR project downloadable from this link.

The .zip file contains the G3W-SUITE directory with two sub directories:

  • projects: containing a QGIS project (buildings_management.qgz) already optimized for the tutorial

  • project_data/spatialite: containing a SpatiaLite DB with basic data (build_management.sqlite)

_images/demo_zip_file.png

Inside the build_management.sqlite SpatiaLite DB there are the following layers:

  • buildings (polygon layer): reference layer for editing aspects

  • maintenance_works (alphanumeric table): with the maintenance interventions associated with the individual buildings

  • park (polygon layer):

  • roads (linear layer): a simple road network

  • work_areas (polygon layer): with the perimeter of work areas to be used to define any geo-constraints

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.10) foresees:

  • a dressing categorized by the buildings layer based on the categorical field type

  • the presence of a 1: n relationship between the buildings layer and the alphanumeric maintenance_works table

  • pre-developed query forms for the buildings layer and the maintenance_works table

  • predefined editing widgets for the fields of the two main layers: buildings and maintenance_works

  • two print composer in A4 and A3

_images/demo_qgis_project.png

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)

_images/qgisserver_change_title.png

Access the online service

To publish the project, you can access the G3W-SUITE test application via the following URL: https://v30.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 problems, report the problem to info@gis3w.it

_images/g3wsuite_portal_frontend.png

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.

_images/demo_dashboard.png

Access the list of webgis in the Cartographic Group G3W-SUITE Demo clicking on the project number shown.

_images/demo_choose_group.png

_images/demo_project_manage.png

Now click on the button _images/button_add_qgis_project.png 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 file

  • 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 group

  • URL alias: a human readable URL for the map

ATTENTION: contents marked with * are mandatory.

_images/g3wsuite_administration_project_add_option.png

After filling in the various form, click on the Save button to confirm your choices.

_images/buttom_save.png

If the publication was successful, the QGIS project will appear in the list of projects in the Cartographic Group.

_images/iconsmall_viewmap.png Clicking on the View map icon will access the WebGis service in consultation.

_images/demo_webgis_project.png

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 _images/iconsmall_edit.png.

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 _images/iconsmall_layerlist.png 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.

_images/demo_project_manage.png

The new session will show you the list of the layer present in the published QGIS project

_images/g3wsuite_administration_project_layer_list.png

Next to each layer are a series of icons and checkboxes:

  • _images/icon_cache.png Caching Layer: allows you to activate and manage the cache of the single layer at the project level

  • _images/icon_editing.png Editing layer: shows if the online editing function is active on the layer and allows you to activate and define it

  • _images/icon_widget.png List of widgets: shows how many widgets (eg searches) are associated with this layer and allows you to activate new ones

  • No legend: it allows to define if the layer must have published the legend at TOC level of the WebGis client

  • Download as shp: allows the download of the geographic layer, in .shp format

  • Download as xls: allows the download of the layer (geographic or not), in .xls format

  • 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.

  • _images/icon_layertype.png Type: illustrates the type of data (WMS, PostGis, SpatiaLite, GDAL / OGR …)

  • WFS: a check mark shows whether the layer is published as a WFS service or not

  • Name: name of the layer

  • Label: layer alias applied at the QGIS project level

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 _images/icon_widget.png

A series of searches already carried out for this layer by other users will probably be listed.

You can activate them by clicking on the Linked chekbox.

_images/g3wsuite_administration_project_widget_list.png

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: choose Search option

    • 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 research

    • Widget: method of entering the value to be searched InputBox: manual compilation SelectBox: values ​​shown via drop-down menu (only for PostGis or SpatiaLite layers)

    • Alias: alias assigned to the field that will appear in the search form

    • Description: description assigned to the field

    • Comparison 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 layers

    • Dependency: 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.

The green button Aggiungi allows you to add additional fields for the construction of the search query currently manageable through the AND operator alone.

Here a simple example based on the fields type and volume othe buildings layer:

_images/demo_search.png

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.

_images/demo_search_result.png

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)

    • year (integer NOT NULL): unique values (2015,2016,2017,2018,2019,2020)

    • photo (text): attachment

    • link (text): text edit

    • form (text): attachment

    • 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)

    • type (text NOT NULL): unique values (Administrative, Commercial, Residential)

  • 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)

To activate the editing function on webgis, access the list of layers and identify the two layers shown above.

_images/g3wsuite_administration_project_layer_list.png

Clicking on the icon Editing layer _images/icon_editing.png (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

_images/editing_setting.png

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.

_images/editing_client_start.png

_images/demo_editing_web.png

_images/editing_form2.png

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.