As a side product of a customer project, we’re publishing a QGIS plugin for printing maps to a file with just two mouse clicks.Read on
QGIS Cloud is your personal geo-data infrastructure in the internet. Publish maps and data. Share geo-information with others. And all of this very easily, without server, infrastructure and expert knowledge. If you know QGIS Desktop, then you know QGIS cloud just as well. Just install the QGIS cloud plugin from the official QGIS plugin repository and you’re good to go. You can publish as many maps as you want.
But the default settings of QGIS projects you like to publish via QGIS Cloud are not the best with respect to the performance of the QGIS Webclient / WMS. This point is noticeable when the published project contains many layers. Than the default settings are leading to bad performance. The size of the WMS GetCapabilities request is not negligible. Have a look at the first request:
The second request has a much faster response time than the first one:
What’s the difference between this two requests? First of all the slow request has to download and parse 3.1MB of XML data. The fast request has to download and parse 22KB only. However that work’s much faster. What makes the difference? If you have a look at the first request result, you can see, that tons of coordinate reference systems (CRS) are defined for every layer. These are all CRS supported by QGIS. In fact most of them will never be used. As the result the solution is to reduce the number of CRS in the QGIS Cloud WMS and WFS services. To achieve that you have to restrict the CRS in the QGIS project settings. Open the OWS Server tab and activate the CRS restrictions option and add all CRS of interest.
A lot of people are using QGIS Cloud as a service with ready to use QGIS webclient. It’s very easy to publish data and share maps in this way. But QGIS Cloud has more power under the hood. A not so obvious feature of QGIS Cloud is the option to share your data via Web Feature Service (WFS) and manage them via Web Feature Service Transactional (WFS-T). “The basic Web Feature Service allows querying and retrieval of features. A transactional Web Feature Service (WFS-T) allows creation, deletion, and updating of features” (Wikipedia). With WFS-T you have full access to your vector data for editing over the web. Since QGIS Server includes WFS-T functionality, you can manage and edit your data served by QGIS Cloud from every client supporting WFS-T. In addition, with QGIS Cloud Pro you have the option to control access to your published WFS.
How to setup a QGIS Cloud WFS-T in few steps:
- Setup a QGIS Project containing the data you like to pubish as WFS-T
- Load local vector data of your choice to your project.
- Define vector layers you wish to publish and set the appropriate settings for them in the following way:
- open the Project Properties -> OWS Server tab.
- scroll to the WFS-Capabilities section and setup the appropriate settings. Tick Published, Update, Insert and Delete for every layer you want to publish.
- additionally you can set the published fields of every layer in the Layer Properties -> Fields tab.
- Publish the project on QGIS Cloud.
- save the project. (If you don’t have installed the QGIS Cloud plugin, than install it from the official QGIS Plugin Repository)
- open the QGIS Cloud plugin and log in your QGIS Cloud account. (If you don’t have a QGIS Cloud account, sign up a new account).
- upload the local data to your QGIS Cloud database (if you don’t have a QGIS Cloud database, create one from the QGIS Cloud plugin).
- publish the project via QGIS Cloud plugin.
- that’s it!
Have a look at the Services tab of the QGIS Cloud Plugin. There you will find the URL for Public WMS. Your just created WFS has the same URL. Now you can start working with WFS and WFS-T.
Working with WFS-T in QGIS Desktop
You can access your WFS-T with QGIS or any other client which supports WFS and WFS-T. As an example here we show how to access WFS with QGIS Desktop:
- Open the QGIS WFS Server connections dialog (Layer -> Add WFS Layer … ).
- Add a new connection
- Give the connection a name of your choice and add the above created URL
- Click connect and you will see the just published WFS layers
- Add one or more of them to your project
Thus you have set the Update, Insert and Delete options for the WFS, these layers can be edited in QGIS like any other editable layer.
All the services published under QGIS Cloud Free are public and accessible by everyone. If you need resctricted access , you can order the QGIS Cloud Pro plan.
Follow @QGISCloud on Twitter for QGISCloud related news and infos.