Related Plugins and Tags

QGIS Planet

Share and manage your Data with QGIS Cloud and WFS-T

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:

  1. Setup a QGIS Project containing the data you like to pubish as WFS-T

  2. Load local vector data of your choice to your project.

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

  1. Open the QGIS WFS Server connections dialog (Layer -> Add WFS Layer … ).
  2. Add a new connection
  3. Give the connection a name of your choice and add the above created URL
  4. Click connect and you will see the just published WFS layers
  5. 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.

Serving multiple WFS-T with TinyOWS

Our favorite WFS-T server complement of UMN Mapserver is TinyOWS. We like the simplicity of it so much, that we packaged it for Ubuntu and added it to OSGeoLive. Installation is easy:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install tinyows

The simplicity is a little bit too much, when it comes to serve multiple WFS-T on the same server. There is only one configuration file, but we want a configuration for each service. There are solutions for that, but I never saw a documentation of the most elegant solution we found. It uses Apache rewrite capabilities to set the TINYOWS_CONFIG_FILE environment variable according to the called URL:

# URL rewriting
RewriteEngine On

# Forbid direct access
RewriteRule ^/cgi-bin/.*$ - [F]

# Rewrite /xxx to /cgi-bin/tinyows with TINYOWS_CONFIG_FILE=/etc/tinyows/xxx.xml
RewriteRule ^/(.+)$ /cgi-bin/tinyows [QSA,PT,L,E=TINYOWS_CONFIG_FILE:/etc/tinyows/$1.xml]

This configuration included in a virtual host declaration (wfs.example.com) serves your WFS-T on wfs.example.com/servicename.

FOSSGIS 2011: SDI-Architektur mit verteilter Datenhaltung

Aggregation von OGC Diensten

Um OGC-Dienste verschiedener Anbieter (z.B. Bundesländer) zu einem zentralen Dienst zusammenzufassen, müssen neben der Kaskadierung noch einige weitere Operationen ausgeführt werden. Eine hohe Performance und Ausfallsicherheit kann mit einem Tile-Cache auf Basis der aggregierten Dienste gewährleistet werden. Dieser Vortrag zeigt die Problempunkte, die es bei bei einer solchen SDI-Architektur zu berücksichtigen gilt und stellt entsprechende Lösungen vor.

Präsentation

FOSSGIS 2011: SDI-Architektur mit verteilter Datenhaltung

Aggregation von OGC Diensten

Um OGC-Dienste verschiedener Anbieter (z.B. Bundesländer) zu einem zentralen Dienst zusammenzufassen, müssen neben der Kaskadierung noch einige weitere Operationen ausgeführt werden. Eine hohe Performance und Ausfallsicherheit kann mit einem Tile-Cache auf Basis der aggregierten Dienste gewährleistet werden. Dieser Vortrag zeigt die Problempunkte, die es bei bei einer solchen SDI-Architektur zu berücksichtigen gilt und stellt entsprechende Lösungen vor.

Präsentation

FOSSGIS 2011: SDI-Architektur mit verteilter Datenhaltung

Aggregation von OGC Diensten

Um OGC-Dienste verschiedener Anbieter (z.B. Bundesländer) zu einem zentralen Dienst zusammenzufassen, müssen neben der Kaskadierung noch einige weitere Operationen ausgeführt werden. Eine hohe Performance und Ausfallsicherheit kann mit einem Tile-Cache auf Basis der aggregierten Dienste gewährleistet werden. Dieser Vortrag zeigt die Problempunkte, die es bei bei einer solchen SDI-Architektur zu berücksichtigen gilt und stellt entsprechende Lösungen vor.

Präsentation

Offline editing plugin for QGIS

For data collection, it is a common situation to work with a laptop or a phone offline in the field. Upon returning to the network, the changes need to be synchronized with the master data source, e.g. a PostGIS database. If several persons are working simultaneously on the same datasets, it is difficult to merge the edits by hand, even if people don’t change the same features.

Therefore, Mathias Walker implemented an offline plugin for QGIS. This plugin automates the synchronisation by copying the content of a datasource (usually PostGIS or WFS-T) to a spatialite database and storing the offline edits to dedicated tables. After being connected to the network again, it is possible to apply the offline edits to the master dataset.

To give the plugin a try, unpack the sources, apply the patch ‘qgissvn.diff’ to a current svn version of QGIS. Then copy the offlineediting folder to $PREFIX/src/plugins and recompile QGIS.

The usage of the plugin is straightforward:

  • Open some vector layers, e.g. from a PostGIS or WFS-T datasource
  • Save the project
  • Press the ‘Convert to offline project’ button and select the layers to save. The content of the layers is saved to spatialite tables.
  • Edit the layers offline
  • After being connected again, upload the changes with the ‘Synchronize’ button

Screenshot

Presumably, the offline editing plugin will be part of the next QGIS version (1.6)

Back to Top

Sustaining Members