Page 1 of 8 (148 posts)

  • talks about »

Last update:
Tue Mar 28 06:55:10 2017

A Django site.

QGIS Planet

FOSSGIS 2017 in Passau

In zwei Wochen beginnt die alljährliche deutschsprachige FOSSGIS Konferenz zum Theme Open Source GIS und OpenStreetMap in Passau. Vom 22.-25. März 2017 wird die FOSSGIS-Konferenz mit Untersützung der Universität Passau in der Dreiflüssestadt Passau stattfinden. Die FOSSGIS-Konferenz ist die im D-A-CH-Raum führende Konferenz für Freie und Open Source Software für Geoinformationssysteme sowie für die Themen OpenStreetMap und Open Data. An vier Tagen werden in Vorträgen für Einsteiger und Experten, Hands-On Workshops und Anwendertreffen Einblicke in neuste Entwicklungen und Anwendungsmöglichkeiten von Softwareprojekten gegeben.

Photo: Tobias Hobmeier (CC-BY-SA)

Sourcepole ist wieder mit einem Stand vertreten und lädt zu interessanten Workshops und Vorträgen ein:

  • Mittwoch 17:00 - Workshop Entwicklung von QGIS Plugins
  • Donnerstag 14:30 (HS 9) - QGIS Server Projektstatus
  • Donnerstag 14:30 (HS 11) - Von WMS zu WMTS zu Vektor-Tiles
  • Donnerstag 15:00 (HS 9) - QGIS Web Client 2

Das gesamte Programm ist auch als praktische Android App erhältlich und die Online-Anmeldung ist noch bis am 19.3. offen.

Wir freuen uns auf eine interessante Konferenz!

AutoForm Plugin for QGIS

The AutoForm plugin for QGIS automatically sets the edit widget type for the fields of a selected layer based on their data types and foreign keys. This is in order to save the user time they may need to spend on manually editing these widgets. In order for this to work correctly, the layer information must be stored in a PostgreSQL database. Furthermore, foreign keys must have a constraint rule for this to work. The plugin does NOT allow you to set relations. It merely checks for any and takes advantage of them accordingly.

Motivation

When you have a database with a lot of tables, there should be a way for quickly entering data whithout having to configure the input form for each table first. In Switzerland this a common use case when you import Interlis data with ili2pg based on an official data model. ili2pg automatically adds reference constraints based on the Interlis model, which is a prerequisite to detect relations in a generic way.

There is already a plugin with a very similar goal: DataDrivenInputMask written by Bernhard Ströbl. Maybe it was bad luck, but we had always troubles when using it. Once we eventually found out the PostgreSQL driver for the QtSql library was missing and another time we failed to use the plugin because we had a socket based connection to PostgreSQL. In both cases we were stuck in the login dialog without a hint why the connection had failed. Another problem is in some cases that the DataDrivenInputMask plugin writes additional metadata into the original database.

So we decided to make our own proof of concept, hopefully avoiding these problems and having the Swiss “ili2pg” use case in mind. A major conceptual difference is, that AutoForm uses the built-in input form functionality of QGIS instead of creating custom dialogs like DataDrivenInputMask does.

Running the plugin

After you have installed the AutoForm plugin (flagged “experimental”) via the QGIS Plugin repository you should see a new option in the Plugins menu called AutoForm. Clicking on it will give you the option Generate Form. Running this with the layer selected will generate your form. If everything is correctly configured, this next step should be easy.

  • Select a PostGIS layer from the Layers Panel
  • Click on Generate Form

And thats it! Now if you toggle editing you should see the changes which were made. In my case, this was the result:

form_before_run

form_after_run

If your layer had a foreign key reference to one or multiple other tables, then they too were added automatically to the Layers Panel and their values should be selectable in their according fields.

Behind the Scenes

In order to perhaps help a bit with understanding how this Plugin works, I am adding this section for anyone who is curious. The Plugin follows this process:

  • Check if a layer is selected
  • If a layer is selected search for any key relationships to other tables
  • If a foreign key relationship to another table was found the load that table into the project and set the corresponding fields to a Value Relation WidgetType
  • Proceed normally and set the remaining Widgets where applicable

The script checks first if the field has already been changed, so as to prevent user made edits or the previously set Value Relations from being overwritten. Then it takes a look at the typeName() of the field in order to determine which widgettype to assign. For example if the field has the Date Type, it would use the calender widget. It does this for each field in the layer. Should the user wish to make additional changes (or correct any mistakes which might have been made), they can do so in the ‘Fields’ tab of the layer properties.

Outlook

This plugin is in an early stage and serves as a proof of concept. There is much left to be done, especially in supporting embedded forms for related tables. We also don’t analyze additional metadata written by ili2pg, which would allow to recognize whether related tables are only lookup tables without the need to embed them as entry forms.

The source code is available on Github. If you are interested in collaborating or maybe sponsoring improvements to this plugin, please contact us!

Mobile data collection with GeoPaparazzi and QGIS

Geopaparazzi 5.1.2 is a mobile app for Android which allows the user to quickly collect information on his or her surrounding area. This is done with the help of geometries, pictures and notes. Additionally to the notes which are available by default, a person skilled with .json forms may write their own forms for collecting data. In this blog I will cover:

  • How do I create custom notes?
  • How do I export my projects to QGIS?

This process is remarkably simple!

Create a new form type for Geopaparazzi:

As the first step we need to create our new Geopaparazzi form.

  • Create a new .json file
  • Build your form referring to this guide here
  • Each form consists of following sections:
  • A section
  • Various forms belonging to the section
  • Save your new form file when you are done.

You may wish to test your .json file with a JSONLint validator before proceeding.

Adding your form to the app.

Now that you have your form dialog written, we now need to add it to the Geopaparazzi app in order to use it.

  • Hook up your Android device to your computer
  • Navigate to your geopaparazzi folder (usually saved in your internal storage)
  • Find the tags.json file

tags_json_file

The tags.json file contains all of the forms which the app can use. Simply copy your code into the bottom of the tags.json file. Don’t forget to seperate the previous form section (in my case it was examples) from the new one with a ‘,’.

Now your Geopaparazzi app should feature your new custom form. You might have to restart the app for it to display.

added_custom_note

Moving your project to QGIS.

Once you have collected all the information you want, it is time to export your data to QGIS for further examination and use.

export_kmz_file

  • Export your project as a KMZ file
  • Hook up your Android device to your computer
  • Start a new QGIS Project
  • Select Layer/Add Layer/Add Vector Layer
  • When promted for a datasource select your freshly exported KMZ file (You may have to make sure that your browser is searching for all filetypes)
  • Make sure your projection matches EPSG:4326

import_kmz_file

Once this is done you should have a vector layer which displays all of the notes and bookmarks you made on the project. From here you can further style them (e.g. adding labels to your points).

import_completed_with_label

Geopaparazzi filetypes

Following filetypes are used by the Geopaparazzi app:

  • .gpap
  • .mbtiles
  • .sqlite

The Geopaparazzi project file (.gpap), is the main project file and contains all the important information which is recorded during your work. This is the file which is handled in the Export dialog and can be exported by Geopaparazzi into following formats:

  • .KMZ
  • .GPX
  • a STAGE compatible format
  • export all pictures taken as .png
  • export all bookmarks for another .gpap file

An important addendum would be that the .KMZ files which are generated during the export appear to actually be .KML files, as they are not compressed into binary.

The .mbtiles files are found in the geopaparazzi/defaulttiles directory and are seen as the background map in the Mapview.

The .sqlite files can be generated via the Import/Default Database menu. They contain three columns: polygon, points and lines. These columns then save the information of the geometry which the user creates in the Mapview.

For more information on the datasets from Geopaparazzi or how one goes about creating a GeoPaparazzi friendly spatialite database please refer to this documentation

Verarbeitung von Interlis-Daten mit QGIS

In der Schweiz werden amtliche Geodatenmodelle vorwiegend mit Interlis erstellt und häufig wird das Interlis-Transferformat für den offiziellen Datenaustausch vorgegeben. Das Interlis-Plugin für QGIS ermöglicht die einfache Verarbeitung von Interlis-Daten und bindet externe Java-Applikationen in die Processing-Toolbox ein. Interlis ist primär ein Austauschformat und müss für die Verarbeitung in einem GIS konvertiert werden. Die Unterstützung von Interlis in der Open Source Bibliothek GDAL/OGR wurde ursprünglich von den Kantonen Thurgau und Solothurn finanziert und später vom KOGIS und der QGIS Usergruppe Schweiz finanziell gefördert. Der Interlis-Treiber war die treibende Kraft zur Unterstützung von mehreren Geometrien in einem Layer und zur Aufnahme von Kreisbögen in das Geometriemodell in Version 2.0 von GDAL/OGR.

Das Interlis-Plugin für QGIS nutzt die Funktionen von GDAL/OGR zur einfachen Verarbeitung von Interlis-Daten. Mit der Version 0.9 im März 2016 wurde die Einrschränkung auf eine Geometrie pro Layer für OGR-Datenquellen behoben, sowie die Ansicht von Interlis-Daten markant vereinfacht. Erreicht wird das durch die Auslagerung von Funktionen als Processing-Algorithmen, welche auf Java-Bibliotheken beruhen. Zur vereinfachten Installation und Konfigurationen werden die benötigten JAR-Dateien mit dem Plugin mitgeliefert.

Mit der im März veröffenlichten Version 2.14 von QGIS wurde in der OSGeo4W-Distribution der Umstieg auf OGR 2.0 vollzogen. Damit kann das im QGIS-Repository verfügbare Interlis-Plugin ohne weiteres verwendet werden. Noch einfacher geht es mit der “QGIS Portable Swiss Edition”, die ohne Installation direkt verwendet werden kann und damit keine Administratoren-Rechte benötigt. Das Interlis-Plugin ist darin bereits enthalten und QGIS ist für den Einsatz in der Schweiz mit den entsprechenden Referenzsystemen vorkonfigiert. Auch die NTv2-basierte Umrechnung von LV03 und LV95 ist bereits enthalten. Das ZIP-File kann hier heruntergeladen werden und an beliebiger Stelle (auch auf einem USB-Stick) entpackt werden. Mit dem Aufruf von “qgis.bat” wird das vorkonfigurierte QGIS gestartet ist sofort einsatzbereit.

Transferdaten im Interlis 1 (itf) oder im Interlis 2 (xtf) Format können über den Plugin-Dialog direkt in einen Layer importiert werden. Das dient in erster Linie der einfachen Visualisierung von Interlis-Daten, über die Speicherfunktionen der QGIS-Layer kann die temporäre Ansicht jedoch auch in eines der untestützen OGR-Formate wie Shapefiles konvertiert werden.

image image image

Das Interlis-Modell wird über einen Webdienst in den offiziellen Repositories gesucht und im IlisMeta XML-Format zurückgeliefert. Dieses Modell-Format kann von OGR direkt gelesen werden. Falls das Modell nicht gefunden wird, kann es mit dem Processing-Tool “Ili Model -> IlisMeta” erzeugt werden.

image

Zur Ausführung wird ein Java-Interpreter benötigt. Falls dieser nicht automatisch gefunden wird, muss der Pfad unter Verarbeitung->Optionen entpsprechend konfiguriert werden.

image

Ein solches IlisMeta-Modell kann im Import-Dialog unter “Lokales Modell” ausgewählt werden. Damit können z.B. kantonale AV-Daten importiert werden:

image image image

Für Anwender, welche die Grundlagen zur Verarbeitung von Interlis an einem Workshop erlernen wollen, veranstaltet Sourcepole am 13.4.16 einen eintägigen Kurs in Zürich. Darin werden zuerst Interlis-Grundlagen und die Abbildungsmöglichkeiten auf releationale Datenbanken vermittelt. Ausgehend von QGIS wird auch auf weitere Open Source Tools wie ili2pg und ili2gpkg eingegangen. Anmeldung und weitere Informationen: sourcepole.ch/kurse/

Publish Image Tooltips with QGIS Cloud

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. Publishing of georeferenced images can be done with QGIS Cloud in a few steps as well. But the main problems are:

  • how to upload the images into the cloud database?
  • how to manage them?
  • how to display the results?

QGIS and QGIS Cloud are offering all tools for this task.

Create a new spatialite layer with QGIS:

As the first step we need to create a point layer with some mandatory columns.

  • Open the New Spatialite Layer dialog with Layer -> Create Layer -> New Spatialite Layer
  • Create in minimum three columns :
    • name text
    • filename text
    • image text
  • name the new layer images

Create_Spatial_lite_Layer

Create a new dialog with QtDesigner which looks like in the image below.

For adding and managing the images a customized input GUI is needed.

  • add two QLineEdit Widgets and name them with the corret objectName
  • add two QTextEdit Widgets and name them with the corret objectName
  • add a QToolButton Widget with the corret objectName

  • or download the file attribute.ui

QtDesigner

  • Open the layer properties of layer images and open the section fields.
  • Select from “Attribute editor layout”: Provide ui-file
  • To get the custom UI select the path to attribute.ui in “Edit UI” and open the gui.
  • Click OK

Create a Python init function for handling the image data.

When you add a new feature to the layer images, the dialog opens but the tool button is not working. To get it working we need some Python code.

The idea behind that is to run some functionality to convert the binary image to text based base64 encoding. Let’s Python doing that job for us. QGIS offers the ability to define an init function when a custom dialog is opened. This offers a wide range of options.

  • create a new text file and call it encodeimage.py
  • add the following Python code (or download the Python script encodeimage.py):

Import all nesseccary Modules and Classes from PyQt4 and QGIS

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import QgsFeature,  QgsMapLayerRegistry
import base64

Define some global variables

filePathField = None
imageField = None
imagePreview = None
toolButton = None
fileName = None

This is the main function which will be connected with the QGIS layer dialog

def formOpen( dialog, layer, featureid ):

    global filePathField
    global imageField
    global imagePreview
    global toolButton
    
    filePathField = dialog.findChild(QLineEdit, "filename")
    imageField = dialog.findChild( QTextEdit, "image" )
    imagePreview = dialog.findChild( QTextEdit, "imagePreview" )

Find the QToolButton Object to connect the conversion function.

    toolButton = dialog.findChild( QToolButton, "toolButton" )

When the ToolButton is clicked run the method getFileName()

    toolButton.clicked.connect(getFileName)

set the imageField Widget invisible for a nicer GUI. It is not nesseccary to see the data

    imageField.setVisible(False)
    imagePreview.setText('<img width="300" src="data:image/jpg;base64,'+imageField.toPlainText()+'"/>')

Open FileDialog and convert the binary image to base64

def getFileName():
    filePath = QFileDialog.getOpenFileName(None,  'Open Image File',  '',  '(Images *.jpg *.png)')

    if len(filePath) > 0:
        filePathField.setText(filePath)
        encodedImage = ''

Read the image file and proceed the encoding

        encodedImage = base64.b64encode(open(filePath, 'rt').read())

Set the appropriate fields for storing in the QGIS layer

        imageField.setPlainText(encodedImage)

Set HTML img tag around the base64 image

        imagePreview.setText('<img width="300" src="data:image/jpg;base64,'+encodedImage+'"/>')

If you have finished editing, save this file in the same directory where your QGIS project file is stored. As the final step to connect the layer images with the Python module you have to define the Python init function in the layer properties of the layer images. Add encodeimage.formOpen to the Python init function definition. The Fields definition of the layer properties of layer “images” should look like

layer_properties

Now you are able to add images and photos to your spatialite database table. But be careful because the main disadvantage of this approach is the size of the image. The conversion of a 5Mb image produces a huge base64 string. As the result it will be very wise to reduce the size of the images you want to add to the layer. If you like, you can add a check of image size to the Python module.

A nice tool of the QGIS map canvas is the option to add maptips to a layer. When maptips are activated images should be visible when the mouse moves over a feature of the layer images in the map.

Create a maptip with image as content

  • open the layer properties of the layer images and jump to the Display section.
  • tick the HTML radio button.
  • add the HTML code to the Text field as you can see in the figure below:
  • close the dialog with OK
  • activate the maptip tool in QGIS and move over a feature of the layer images. The ame and the image are popped up.

layer_properties

Share your images with QGIS Cloud

What’s about to share the pictures and the geolocation of the pictures with others over the web. For this task QGIS Cloud is the right choice. QGIS Cloud is your personal spatial data infrastructure and offers OGC Web Services and ready preconfigured Web GIS clients.

  • save the project.
  • open the QGIS Cloud plugin (If you don’t have the QGIS Cloud plugin installed, than install it from the official QGIS Plugin Repository)
  • 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.
  • open the map in QGIS Cloud Web Client
  • activate the identify tool and move over a point with image
  • here you are, it works

result

Presentations at FOSS4G 2015 in Seoul

Slides from our presentations at FOSS4G 2015 in Seoul:

  • Keynote: The QGIS project and its evolution from a desktop GIS to a GIS platform - Slides
  • New QGIS functions for power users - Slides
  • QGIS Plugins - From Must-Haves to insider tips - Slides
  • Building an OpenLayers 3 map viewer with React - Slides

Thanks to the organizers of this great conference! It was a pleasure to get in contact with so many users from around the world.

foss4g2015

FOSSGIS 2015

Sourcepole war an der FOSSGIS 2015 in Münster unter anderem mit zwei QGIS-Vorträgen präsent:

QGIS Instant Print Plugin

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.

To use the instant print tool, a composer needs to be created first. The only requirement is that it contains exactly one map item.

The instant print tool can then be activated from the plugin toolbar by clicking on the plugin icon icon.

In the dialog window which appears, one can pick the composer to use as page layout. A selection rectangle is displayed in the map canvas, sized according to the size of the map item in the composer and the scale chosen in the instant print dialog. The selection rectangle can be freely dragged around to choose the region one wishes to print. When dragging the selection rectangle, the previous rectangle is shown shaded and can be used as a snap reference when setting the new region. While the instant print tool is active, the canvas can be panned with the middle mouse button.

screenshot

To instant print tool can be installed with the QGIS plugin manager and the sources are available on Github.

QGIS Cloud - Speed up the loading time of the web client

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:

QGIS Cloud slow response

The second request has a much faster response time than the first one:

QGIS Cloud fast response

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.

QGIS Cloud Webclient slow initialisation with none restricted CRS

QGIS Cloud Webclient fast initialisation with restricted CRS

QGIS Cloud - Speed up the loading time of the web client

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:

QGIS Cloud slow response

The second request has a much faster response time than the first one:

QGIS Cloud fast response

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.

OWS_server

QGIS Cloud Webclient slow initialisation with none restricted CRS

QGIS Cloud Webclient fast initialisation with restricted CRS

Slides FOSS4G 2014

Slides from our presentations at FOSS4G 2014 in Portland/Oregon:

@PirminKalberer

Slides FOSS4G 2014

Slides from our presentations at FOSS4G 2014 in Portland/Oregon:

@PirminKalberer

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.

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

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

Sourcepole at FOSS4G 2014 in Portland

In one week, the 2014 FOSS4G Conference will start in Portland/Oregon. Sourcepole supports this major event as a bronze sponsor.

Our conference contributions:

Workshop presented by Horst Düster (@moazagotl)

  • Tuesday afternoon: QGIS Plugin Development with PyQt4 and PyQGIS

Presentations by Pirmin Kalberer (@PirminKalberer)

  • Thursday, Session 2, Track 7, 13:00 - 13:25: State of QGIS Server
  • Thursday, Session 2, Track 7, 13:30 - 13:55: From Nottingham to PDX: QGIS 2014 roundup
  • Thursday, Session 3, Track 6, 16:25 - 13:25: Easy ETL with OGR

Meet Pirmin and Horst at Sourcepole’s exhibition booth and have a look at our latest products.

We’re looking forward to meet you in Portland next week!

Follow @Sourcepole for selected QGIS news and other Open Source Geospatial related infos.

Sourcepole at FOSS4G 2014 in Portland

In one week, the 2014 FOSS4G Conference will start in Portland/Oregon. Sourcepole supports this major event as a bronze sponsor.

Our conference contributions:

Workshop presented by Horst Düster (@moazagotl)

  • Tuesday afternoon: QGIS Plugin Development with PyQt4 and PyQGIS

Presentations by Pirmin Kalberer (@PirminKalberer)

  • Thursday, Session 2, Track 7, 13:00 - 13:25: State of QGIS Server
  • Thursday, Session 2, Track 7, 13:30 - 13:55: From Nottingham to PDX: QGIS 2014 roundup
  • Thursday, Session 3, Track 6, 16:25 - 13:25: Easy ETL with OGR

Meet Pirmin and Horst at Sourcepole’s exhibition booth and have a look at our latest products.

We’re looking forward to meet you in Portland next week!

Follow @Sourcepole for selected QGIS news and other Open Source Geospatial related infos.

Sourcepole Kursprogramm Herbst 2014

Im November 2014 bietet Sourcepole wieder sein kompetentes Kursprogramm rund um alle GDI Komponenten an. Zu allen Kursen gehört umfangreiches Kursmaterial, Mittagessen und Kaffepausen. Bei Buchung eines Grundkurses und dem darauf folgenden Aufbaukurs erhalten die Teilnehmer Rabatt auf den Kurspreis.

Geo-Datenbank:

  • PostgreSQL / PostGIS Einführung (3. - 4. November 2014)
  • PostgreSQL / PostGIS für Fortgeschrittene (5. November 2014)

Desktop GIS

  • QGIS 2.4 / Enterprise Desktop Grundkurs (10. - 11. November 2014)
  • QGIS 2.4 / Enterprise Desktop für Power User (12. November 2014)

GDI

  • Verteilte GDI mit der QGIS Suite und PostgreSQL (20. November 2014)

QGIS Programmierung

  • QGIS 2.4 / Enterprise Plugin Entwicklung mit PyQt4 und PyQGIS (17. - 18. November 2014)

Informationen zu den Kursen und die Online Anmeldung finden Sie im Kursprogramm

Wir freuen uns darauf Sie in Zürich begrüssen zu können.

Multiple map grids in the QGIS print composer

In printed maps, having several coordinate grids over one map is a very usefull feature. For instance using a meter system as output CRS, it is nice to display a latitude / longitude grid as well. Until now, the QGIS print composer allowed only one coordinate grid per composer map and it was restricted to the map output CRS.

Having that multigrid / multiCRS feature in QGIS Enterprise since 13.04 already, I’ve recently found the time to port it into the QGIS developer version. Therefore it will be part of the upcoming version 2.6 in October. The screenshot below shows how it can be used to add a wgs84 grid onto a meter map. In the composermap widget, grids can be added / removed and reordered. Additionally there is now a CRS selection button to select the coordinate system for the grid. The development of this feature has been kindly funded by Canton of Solothurn (Switzerland).

Multiple map grids in the QGIS print composer

In printed maps, having several coordinate grids over one map is a very usefull feature. For instance using a meter system as output CRS, it is nice to display a latitude / longitude grid as well. Until now, the QGIS print composer allowed only one coordinate grid per composer map and it was restricted to the map output CRS.

Having that multigrid / multiCRS feature in QGIS Enterprise since 13.04 already, I’ve recently found the time to port it into the QGIS developer version. Therefore it will be part of the upcoming version 2.6 in October. The screenshot below shows how it can be used to add a wgs84 grid onto a meter map. In the composermap widget, grids can be added / removed and reordered. Additionally there is now a CRS selection button to select the coordinate system for the grid. The development of this feature has been kindly funded by Canton of Solothurn (Switzerland).

Composer_grid

Packaging PostGIS dev releases with Docker

Packaging PostGIS dev releases with Docker

We recently added support for GML curves to PostGIS, which enables TinyOWS to deliver WFS requests with curve geometries. More on this in a later post. This enhancement is in the current PostGIS developement version (SVN master) and not released yet. To enable our customer testing this functionality, we had to build packages for their server environment which is Ubuntu Precise with UbuntuGIS repositories. After working with Linux LXC containers and it's predecessor VServer for years, Docker was a logical choice for a clean reproducible build environment.

Rebuilding a Debian package is usually quite easy:

apt-get build-dep <package>
apt-get source <package>
cd <packagedir>
#Make your changes
dch -i
dpkg-buildpackage

But getting build dependencies for PostGIS currently fails with libssl-dev conflicts, maybe because the dev packages got out of sync after the recent Heartblead updates. So the Dockerfile uses equivs to build a dummy package which satisfies the dependencies.

The command

docker run -v /tmp:/pkg sourcepole/postgis-svn-build-env sh -c 'cp /root/*postgis*.deb /pkg'

loads the Docker image with packages built from the latest SVN version of PostGIS in /root and copies the deb files from the containter into /tmp.

Now we're ready to install these packages on the Ubuntu server:

sudo dpkg -i /tmp/*postgis*.deb

Thats it. Feedback welcome!

@PirminKalberer

P.S.

If you happen to be a developer, then you may prefer running a cutting-edge version of PostGIS in a Docker container instead of building packages. Our colleagues from Oslandia just published how to do this.

  • Page 1 of 8 ( 148 posts )
  • >>

Back to Top

Sponsors