We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Easily publish your QGIS projects on the web with QWC2

00:00

Formal Metadata

Title
Easily publish your QGIS projects on the web with QWC2
Title of Series
Number of Parts
266
Author
License
CC Attribution 3.0 Germany:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
QWC2 (QGIS Web Client 2) is the official web application of QGIS, that allows you to publish your projects with the same rendering, thanks to QGIS Server. The environment is composed of a modern responsive front-end written in JavaScript on top of ReactJS and OpenLayers, and several server-side Python/Flask micro-services to enhance the basic functionalities of QWC2 and QGIS Server. QWC2 is modular and extensible, and provides both an off-the-shelf web application and a development framework: you can start simple and easy with the demo application, and then customize your application at will, based on your needs and development capabilities. This talk aims at introducing this application and to show how easy it is to publish your own QGIS projects on the web. An overview of the QWC2 architecture will also be given. It will also be an opportunity to discover the last new features that have been developed in the past year and ideas for future improvements.
Presentation of a groupProjective planePoint cloudSource codePlug-in (computing)Web browserDependent and independent variablesComputer architectureService (economics)Client (computing)Software developerUser interfaceComputer animation
Mountain passComputer configurationWeb pageRotationAreaPosition operatorMetric systemDemosceneAttribute grammarLine (geometry)WritingTerm (mathematics)Level (video gaming)Network topologyMenu (computing)Mobile WebService (economics)Functional (mathematics)Configuration spaceAdditionServer (computing)Computer architectureMappingPosition operatorTemplate (C++)Letterpress printingTable (information)InformationCartesian coordinate systemProjective planeCASE <Informatik>ResultantProfil (magazine)Line (geometry)MeasurementPoint (geometry)Graph coloringShape (magazine)Set (mathematics)Form (programming)Drop (liquid)Drag (physics)Similarity (geometry)Integrated development environmentWeb 2.0Attribute grammarComputer fileClient (computing)Theory of relativityKey (cryptography)Flow separationFront and back endsSystem administratorElectronic mailing listGeometrySingle-precision floating-point formatPhysical systemGroup actionData managementRight angleTraffic reportingNeuroinformatikBitContext awarenessInformation securityMereologyoutputView (database)Fluid staticsSource codeDatabaseWeb browserProxy serverSimulationWeb applicationCore dumpFile viewerGraphical user interfaceInteractive televisionUniform resource locatorInternet service providerProbability density functionCache (computing)Macro (computer science)Entire functionInterface (computing)Demo (music)Token ringUser interfaceMultiplicationEndliche ModelltheorieHash functionAuthenticationState of matterThumbnailMedical imagingWindows RegistryPasswordRevision controlDemosceneShared memoryLink (knot theory)WärmestrahlungLie groupProduct (business)InjektivitätElectronic visual displayProgram flowchartComputer animation
Surjective functionControl flowDisintegrationSquare numberRotationComputer configurationScherbeanspruchungConfiguration spaceTemplate (C++)Service (economics)Repository (publishing)Home pageClient (computing)ResultantFile viewerData compressionNumbering schemeGraph coloringEntire functionPoint (geometry)RoutingFunctional (mathematics)Projective planeComputer fileSet (mathematics)Contrast (vision)Variable (mathematics)Graphical user interfaceConfiguration spaceInterface (computing)Front and back endsBitWeb browserSynchronizationBasis <Mathematik>Task (computing)Multiplication signSheaf (mathematics)Demo (music)MultiplicationSelectivity (electronic)Letterpress printingINTEGRALState transition systemFigurate numberSoftware maintenanceWindowView (database)Integrated development environmentRevision controlCartesian coordinate systemFile formatWeb 2.0Google Street ViewSoftware bugWeb pageInformationRaster graphicsoutputBlock (periodic table)Complete metric spaceNumeral (linguistics)MeasurementElectronic visual displayService (economics)Template (C++)Order (biology)CodeSpacetimeBimodal distributionGUI widgetSquare numberRectangleShape (magazine)Plug-in (computing)Frame problem1 (number)Line (geometry)Single-precision floating-point formatKeyboard shortcutCASE <Informatik>Computer animationProgram flowchartSource codeJSONXML
Transcript: English(auto-generated)
Thank you. Welcome to the presentation about QWC2. My name is Andromani. I work at source for a company in Zurich. We are QGIS developers. We developed a QGIS web client.
We developed the QGIS cloud spatial data infrastructure. And today I'm going to give you an introduction about QWC2 and QWC2 services. Show you, let's say, the main features of the client and tell you what has been happening
in the project in the past year or so. So QWC2 is the official web client of QGIS. It was first published in 2016 with the goal of providing a modern responsive user interface, plug-in architecture, which is easily extensible, and using state-of-the-art technologies like RAC and the Planer 7.
This is how it looks like. So it's scalable. Can be used on desktop and mobile devices, just map, menu, layer trees. The core features, it provides a scene switcher, a layer tree. You can query feature info. You can search with customizable search providers.
You can measure. You can sketch on the map. You can create thermal links and share them. You can enable geolocation, the browser, or you can say the GPS geolocation. You can print to PDF. You can compare maps. You can import external maps, and then there's an API for interacting
with external applications. At its core, QWC2 can act as a simple WMS client on top of QGIS server. The goal is basically you have a QGIS server which reads a QGIS project, which you configure as you wish with all the layer styles and print templates, and the web client will display it in the browser.
This variant, it's a simple static transcript HTML CSS application, which you can deploy in the web server, and it's limited to the functionality which QGIS server provides through its WMS interface.
QWC services, on the other hand, is an entire collection of market services which is designed for extending what QGIS web client can do. It's mostly a collection of Alaska services which communicate between themselves via HTTP REST, and you can deploy them easily as Docker containers,
and there is a demo set up available at QWC Docker, which is ready, let's say, to use, or you can also deploy it with a customized deployment via Apache or VSGI, for example. The functionalities which become available
when using QWC services is you can have users and resources and give permissions. You can have multi-tenancies, so I would say multiple clients hosted on the same system. You've got authentication. You can have full text search on the data of the QGIS project. You can edit the layers directly in the web client.
You can have compact permalink, so like the short hash which then gets resolved to a full state which is stored in a database. You can compute high profiles. You can have customized feature info templates. You can create reports through Jasper, and you can have, say, a map context pop-up
which gives you additional information at the specified position. The architecture's a bit more complicated than what we saw before. Before, we just had the small, this part here, the QGIS project, QGIS server, and web client. Now, we have a conflict database with users and permissions.
We've got administration user interface to manage these users and permissions, and we have the input configuration, then a conflict generator. We can also call it aggregate which collects all this information from all the sources into static configuration files which then are read by these QWC services,
and then the web client interacts through these QWC services. So, what are these QWC services? Some examples, let's say the core services on which the entire application lies. The first one is the LGC service
which basically will act as a proxy between the QGIS server and web client, enforcing all the permissions based on the permissions you configure in the admin GUI. You've got the map viewer, QGIS map viewer which basically shapes viewer configuration also with the enforced permissions based on what you've configured in admin GUI,
then the admin GUI which is the backend for managing these resources and users, and then the conflict generator, this, say, configuration aggregator which we talked about before. Additional services, we've got the data service which will allow you to interact directly with the geodatabase behind the QGIS projects
to edit features in web client, the permalink service for storing and resolving these compact permalink caches, and the full text search service to allow you to search directly on the geodata of the project. Authentication is an important aspect,
and the entire application is designed to be modular also in the aspect of authentication. The only requirement that such a service needs to provide is to choose JWT tokens, and the authentication method itself can be, let's say, very customizable. You can either authenticate against a database of users and passwords.
You can use LDAP authentication and others like Kerberos and so on. The entire KWEC ecosystem is designed to run with Docker. The big advantage is you have like one service per container, and individual containers are, say, a controlled environment. You don't need to worry about dependencies
and anything like that. That's provided for you inside the Docker image. They're easy to create and manage. You can just update them by updating a version tag and they're distributed over the Docker Hub registry. And then the more advanced setup is that you can use Kubernetes to automatically deploy and manage these containers.
So, so far a lot of text. I'd like to show some images, what actually the application looks like. First of all, we've got a theme switcher. So this concept of theme is basically a published QGIS project. You can have small thumbnails and you can basically switch through the various projects that are published.
We've got a layer tree, which allows you to target the visibility, transparency, reorder layers. You can also import external layers. You can compare the layer, and then there's a background layer switcher. Feature info and map info. Also feature info is basically WMS scat feature info, which will display the feature picked at the position in a table.
You can also create customized templates to display them in a more sophisticated way. And then the map info is basically if you right click on the map, you'll get a small pop-up with position, elevation, and additional information, which you can configure manually, say through the service. In this case, the air sector,
the commune will be displayed. Search, the search function generically allows you to get results for places, layers, maps, and scenes. You can implement your own search function through JavaScript to interact with any search product you wish,
or you can also use the full text search service to search on the data of the QGIS project. Printing, the concept is that you just create your print layout in QGIS, and then thanks to QGIS server get print function, you can say have a PDF created
based on this template in the web client. Redlining and measure to let's say client side functions. Redlining allows you to create the drawings on the map, various shapes, labels, colors,
as you please, you can export them to KML, you can transform, rotate figures, and measure, you can measure points, areas, lines, and if you measure a line, you can also get high profile if you have an elevation data set placed in the background.
Editing is a very powerful functionality. It relies on the configuration you define in the QGIS project. So here we see basically the form how it looks like in QGIS. This one is then translated to the web application
in a very similar fashion. It supports the auto-generated forms, it supports the drag and drop forms, or it can also provide the manual QT designer form which also gets translated to the web client and displayed. It supports file uploads, it supports key value relations, and also one-to-one relations as are configured in the QGIS project.
Then as a separate editing functionality, there's attributes table, which allows you also to view and edit geometry-less data sets. The admin backend allows you to manage users, groups, and roles, and permissions. Basically, it's a very fine-grained permission system.
You can separately create permissions for maps, single attributes, layers, data sets, which are editable or not. All right. So what's been happening in the project in the past year or so? The first exciting functionality we've added
is routing functionality. It's based on Valhalla. It allows you to compute routes between two or more points using various transport modes, car, multimodal, public transport, bike, or walk based on what is configured and provided by Valhalla.
And then there's a reachability, so Azure Chrome's functionality, which basically tells you from this point how far I can get in a certain amount of time. And this functionality is also configurable to use a different routing backend as opposed to Valhalla. You just need to implement a interface function
in the web client. Another function we've added is integration of cyclo-media, or let's say this can also serve as a basis for other Panorama viewers. The goal is to have the street view kind of pictures integrated into the web client,
and then there's a synchronization where you see in the 2D view basically what is being looked at in the Panorama viewer, and on the other, let's say, also reverse the two windows are synchronized. We've improved the printing function to also allow for Atlas printing,
so you can configure the print layout in QGIS for Atlas printing, and then you can select multiple features in web client, and then you'll get a printed Atlas for all the selected features. And the very new function, which is only available since QGIS 3.32
is a geo-PDF printing, which will then be available as a switch in the print dialogue. We've greatly expanded the redlining functionality to include new shapes, rectangles, squares, ellipses. We've added transform tools to scale and rotate the figures.
You can now also display measurement labels directly in the drawings, as opposed to having them in the measure tool only. We've added a numeric input widget, which allows you to numerically enter the coordinates of the geometry, and we've added an export functionality
to export the drawings to KML and GeoJSON. We've added some smaller plugins or enhanced existing ones, and the raster export to plugin now allows you to configure fixed size frames, basically.
And then there's news pop-up plugin, which is useful for presenting certain information to the user on the first start, which could be any kind of news update or whatever information. We've did some work on accessibility. First of all, you can create custom color schemes
solely as CSS variables. In this case, we see a high contrast color scheme, but it can be anything you desire. It's like a set of 15 CSS variables, which controls the entire color scheme of the application. And then we've implemented support for hotkeys,
which you can configure in the compression file for launching tasks in the viewer and so on. Staying in the configuration aspect, we've simplified the viewer configuration. Those of you who maybe already used GitHub in the past know that before we had the separate section
for the mobile and for the desktop viewer, now we can define a common section with all, let's say, the common configuration, then just selectively override what you want to be different in the separate viewers. This saves a lot of space, tons of code, and many mistakes.
And a bit more advanced, but also very useful if you run a multi-tenant environment. You can now define a tenant config template, which basically uses this $tenant$ variable as a placeholder, and then just can reference this file from the tenants instead of replicating the entire configuration.
Many times have just one base configuration and selectively extend or override what you need in the actual tenant config. For maintenance and managing, it's very interesting. We've introduced a long-term release from this year, tagged as a 2023.123 LTS.
This release is always managed or maintained for one year, and it will just be provided with bug fixes based on the issues which are reported, and will be maintained until the end of the year,
and next year we'll have the 2024 LTS. And the previous versioning format is still available, so if you want to have the fresh, newest version of the various services, you can still use the year, month, day tag format.
Something that maybe has been a bit lacking in the past is, say, a bit of complete documentation. We've worked a lot on this in the past few months, so we've aggregated documentation from the various repositories in a single page. You've got a general configuration,
say, yeah, chapter with the main configuration files, and then you've got a new block of selected topics which will just walk you through how to achieve specific results in the client in an easy-to-understand way. Some references, the homepage and documentation
is available at qwcservices.github.io. The main repository is the QWC demo application and the QWC doc repositories, and here are various existing viewers you can try out and see how various users have configured their client and what functionalities they have exposed.