Posts by Lutra Consulting

FOSS4GUK Workshop: Collecting data with QGIS, Input and Mergin

During FOSS4GUK 2019 in Edinburgh we ran a workshop for collecting data using Input. This is the content of the workshop with all the datasets.

Prerequisites

To be able to work with Input, you will need the following:

Setting up the survey project

For the purpose of this workshop, we have prepared a QGIS project. Let’s use that as a starting point:

  • Log into Mergin
  • In the top-left, click on Projects and select Explore
  • Find and click on saber/foss4guk
  • In the top panel, click on the mergin_clone icon to create a copy of the project under your own Mergin account (foss4guk_YOURNAME)

Exploring the project in QGIS

The project you have copied in Mergin, is a QGIS project with various map layers. To see the content of the project in QGIS:

  • In Mergin, in the top menu, select Projects > My projects

  • Select foss4guk_YOURUSERNAME (or the name you assigned when copying the project).

  • In the top menu, click on the mergin_download icon to download the project

  • Extract the content of the zip file

Alternatively:

The above process can be done through the Mergin plugin for QGIS. To do that:

  • Install the Mergin plugin in QGIS

  • Restart QGIS

  • In the QGIS Browser panel, right-click on Mergin and select Configure

  • Enter your Mergin username and password

  • Under My Project, right-click on foss4guk_YOURUSERNAME and select Download

  • Select a location under which the project will be downloaded to

  • Once downloaded, select Open to open the project.

Layer settings and forms

Input is based on QGIS, therefore, any layer symbology / styles you set in QGIS, will be displayed in Input. If you are using SVGs (e.g. OS MasterMap), you need to embed these in the QGIS project.

Input also supports most of the edit widgets from QGIS. Edit widgets allow you to simplify filling-in forms with drop-down options, TRUE/FALSE switches, sliders, calendar and time, default values, attachments, value relations and more. To see some of those settings:

  • From the Layers panel (in QGIS), right-click on the listed buildings (points layer) and open the Properties window.

  • From the left-hand panel, select Attributes Form. Explore the various widgets assigned to different fields.

For this layer, we have set the Photo field to use an Attachment widget. This will allow Input to make use of your mobile camera to attach photos to features.

For the Surveyor field, we have linked it to an external CSV table, to populate a drop-down option with the names of surveyors.

Input can also use a pop-up window (similar to Google Maps) to display basic information about a single feature:

To customise this pop window’s content:

  • Open the properties table, and select the Display tab

  • You can see the title is set to ENT_TITLE and there is an image tag referencing the Photo field:

      # image
      file:///[%@project_folder%]/[% "Photo" %]
    

Map themes

To simplify handling layer visibility, Input makes use of map themes defined in your QGIS project. In this project, there is a map theme for aerial photo (using a Bing aerial layer) and OpenStreetMap (geopackage).

[]{#anchor-5}Survey layer

In Input, any vector layer (point, line, polygon) can be edited (as long as editing that format is supported in QGIS). This could be very confusing when dealing with large numbers of vector layers in a single project (trying to figure out which one to edit).

Luckily you can set background layers (or those you don’t want to be editable in Input) to read-only:

  • In QGIS, from the main menu, select Project > Properties

  • In the new window, select the Data Sources tab from the left-hand panel

Below is the list of layers and their capability settings for the project. Layers not marked as read-only will be shown as survey layers (editable) in Input.

By default, the file paths to layers are relative. You can change that under the General tab of this window.

Using Input

To use Input, open the app on your device. On its first run, Input will show the Projects page.

  • Under Projects, select My projects
  • From the list, find YOUR_Mergin_USERNAME/foss4guk_YOURUSERNAME (e.g. saber/foss4guk_saber)
  • Tap the download icon on the right-hand side of the project to download the project (warning: if you are not connected to WiFi, this will use some of your mobile data allowance)
  • After downloading, tap Home
  • Select your downloaded project

When you open the project, you may not see all layers. This is because some of the layers have zoom-dependant visibility settings (again configured in QGIS).

Exploring the project

To switch map themes:

  • Tap More on the bottom-right side of the screen

  • Tap Map themes > aerial photo

You can also display feature details simply by tapping on them.

  • Tap on the point representing Queensberry House:

Capturing data

To capture data:

  • Tap Record

  • You can then choose the layer in which you want to record your feature, by tapping on the light green band, in the lower part of the screen, above the Input menu.

  • If you are capturing a point, by default, the suggested point to capture will be on your GPS location. You can drag the map to adjust the location of the new point. To switch back to the current GPS location, tap the GPS icon on the bottom-left of your screen.

  • After adding a point, you will be prompted to fill-in the form.

If you are recording a line or a polygon, you can either add points to define the shape of your feature or press and hold the GPS icon when in Record mode to generate a shape from your GPS track.

Editing data

You can edit the existing features on your map. For point layers, you can edit geometry and form data. For lines and polygons, you can edit only the form data.

Try it!

Let’s get out and capture some data for the Path layer!

Uploading your changes

Once you have made changes to your data, you can upload them back to Mergin:

  • In Input, tap Projects

  • Select My projects

  • Click on the sync/refresh icon to the right of your project

You can now download the project again to your desktop and see the changes in QGIS. Alternatively, you can synchronise the changes you made back to QGIS by using the Mergin plugin for QGIS (described earlier).

Learn More

Google Summer of Code 2019 : QGIS 3D Improvements

In this year Google Summer of Code (GSoC), there is a project involving QGIS 3D. Ismail Sunni as the student with Martin Dobias and Peter Petrik as the mentors have implemented 3D On-Screen Navigation, 3D Measurement Tool and 3D Rendering Point Feature as A Billboard.

You can also learn more about this GSoC project here.

3D On-Screen Navigation

Previously, user could already navigate the 3D world by using mouse and keyboard. Unfortunately, for a new user it is not easy to start using them. 3D On-Screen Navigation will help navigating the 3D world. There are buttons to do zoom in/out, tilt up/down, pan up/down/left/right, and rotate the 3D map view. This feature can be activated from the 3D map view toolbar. See how to use it in this video:

3D Measurement Tool

Now you can measure distance in 3D map view with considering the z-value. This tool is available in the 3D map view toolbar. It has the same UI as in 2D measurement tool with the same configuration (rubber band color, unit, decimal place, and keeping the base unit). It also has the same behavior (left-click to add a new point, middle-click to delete the last point, and right-click to restart the measurement). Now you can measure the distance between two building’s top or length of a river in a mountain. See the 3D measurement tool in action:

3D Point Feature Rendering As Billboards

A new kind of rendering style has been added for point layers. It allows you to show the point with QGIS symbol (e.g. marker, SVG, etc) that always face to the user and always has the same size. You can see sample usage:

You may also like...

Mergin Maps, a field data collection app based on QGIS. Mergin Maps makes field work easy with its simple interface and cloud-based sync. Available on Android, iOS and Windows. Screenshots of the Mergin Maps mobile app for Field Data Collection
Get it on Google Play Get it on Apple store
Learn More

Input on iOS

After a long wait and weeks of development, we finally managed to release Input on iOS platform.

Update: Input app is now available through Apple App Store:

Get it on App Store

We are pleased to announce the Beta release of Input on iOS TestFlight. To install the app, simply click on this link from your iOS device: https://testflight.apple.com/join/JO5EIywn. This will open a window to first install TestFlight app. After that, you should be able to install Input on your device.

Input on iPhone

Input is the first QGIS based app to be released for iOS. Using Input, you can open, view and edit your QGIS projects and data on your iPhone/iPad.

For setting QGIS projects, transferring data/projects and capturing data, you can see the documentation here.

In addition to the great works of the QGIS community in the past to port QGIS to Android devices, we had to do major changes to be able to have Input on iOS. Below are the steps we had taken in the past couple of years, to pave the way:

QGIS Quick

As a first step, we decided to create a new library in QGIS based on Qt Quick for QGIS. This allowed us to easily create platform independent apps for touch devices.

The library has been built on components ported from QField project. In addition, we have been improving the library and added support for new types of edit form widgets. Details of the QGIS Enhancement Proposal for QGIS Quick can be found here.

Static data providers

By providing static data providers, it was possible to compile code of data providers directly into qgis_core library. This was a major step, as iOS does not support dynamic libraries. Details of this QGIS enhancement can be found here.

Feedback and suggestions

We will be delighted to hear your suggestions and feedback, mainly critical ones so that we can improve the application and user experience. After ironing out any issues reported during the Beta testing in the TestFlight, we will publish the app to the App Store.

Learn More

FOSS4G 2019 in Bucharest

FOSS4G is a gathering of like-minded people from around the world to share their experience with the Open Source GIS software. This year, we had a number of talks, a workshop and a lot of fun!

The event started with the QGIS Developers meeting. We joined the meeting to discuss the upcoming release of QGIS (3.10) and some of the new features and bugs.

FOSS4G - 1

We had a workshop on Mesh layer. Participants created animation of the Hurricane Michael in QGIS. Details of the workshop can be found here.

Our first talk was on Input: a QGIS based app for mobile/tablet. During the talk, Saber demonstrated the workflow for setting up a survey project in QGIS and transfer it through the Mergin service to mobile device. Input was then used in a live demo to collect data and synchronise the information back to the server.

You can find the video recording from the talk here

Martin Dobias presented the current state of QGIS 3D and future plans. Martin and Peter Petrik have been mentoring Ismail Sunni for his Google Summer of Code to implement 3D billboard in QGIS. The work was completed and merged to QGIS project recently. Martin demonstrated the new features as the result of the GSoC.

Full presentation can be found here

Mesh layer has been a part of the QGIS for the past year. Peter discussed the improvements made over the recent months. He also gave an overview of the upcoming works to extend the mesh layer to handle 1D and 3D data.

Peter’s talk on mesh layer can be found here

The event was not all about work! We had fun times catching up with friends, partying and running around!

A lot of effort, sleepless nights and sweat went into organising this event. We thank the organisers to make this happen.

FOSS4G - 3 FOSS4G - 2

You may also like...

Mergin Maps, a field data collection app based on QGIS. Mergin Maps makes field work easy with its simple interface and cloud-based sync. Available on Android, iOS and Windows. Screenshots of the Mergin Maps mobile app for Field Data Collection
Get it on Google Play Get it on Apple store
Learn More

FOSS4G Workshop: Working with mesh layer in QGIS

We presented a workshop on Mesh layer in QGIS during FOSS4G in Bucharest. Below is step-by-step guide for those who’d like to know more about mesh layers in QGIS.

Introduction

Data for this tutorial can be found here.

In this tutorial, we are going to work with a mesh layer in QGIS. Throughout this tutorial you will learn to:

  • Load a mesh layer

  • Change symbology

  • Working with time

  • Creating time series/cross section plots

  • Export mesh

  • Creating animation

For the purpose of this tutorial, we are going to use the ERA5 dataset from ECMWF:

(the data in the first link should contain what you need to proceed with this tutorial).

Loading mesh in QGIS

Before loading the mesh layer in QGIS, we are going to add the world map as a background layer.

In QGIS, from the Browser panel, browse to the downloaded data > Working with mesh layer > vector_data.gpkg and add world_map layer.

You can change the project background layer to blue to have an image similar to the one below:

To add the mesh layer:

In QGIS, from the Browser panel, browse to the downloaded data > Working with mesh layer and add Hurricane Michael data from Copernicus ECMWF.nc as a mesh layer (not raster).

Depending on your QGIS settings, the CRS setting window might appear. Ensure you assign EPSG:4326 to the mesh layer.

Mesh layer symbology and styling

To change the mesh layer style:

In QGIS, from the layers panel, select the mesh layer and press F7

The layer styling panel will appear on the right of your QGIS window

Within this panel, you can switch on/off quantities, vectors, style the layer and browse through time.

Below, we are going to switch on the wind data and style it:

On the Style panel, click on Symbology tab

  • **Under Settings section, click on the icon in front of 10 metre

    wind to switch on the quantity**

  • Under color ramp section:

    • Set Min to 0

    • Set Max to 20

    • Interpolation to Linear

    • Color ramp to Blues (Inverted)

    • Mode to Equal Interval

    • Classes to 11

You can change the blending mode to Darken and you will see an image similar to the one below:

To style vector component of the wind data:

  • **Under Settings section, click on the arrow icon in front of 10

    metre wind to switch on the vector**

  • Click on the vector settings section:

    • Enable the option for Display Vectors on User Grid

      • X Spacing: 10 px

      • **Y Spacing: 10 px **

    • For Arrow Length, select Scaled to Magnitude

      • Set the Scale by a Factor of 1

Working with time

If your mesh layer has time dimension, you should be able to browse through time using the slider provided under the settings tab:

Note that the time reference does not always parse correctly. To change the time (if you know the correct format and starting date/time):

Click on the setting in front of time

In the new window:

  • Use absolute time

  • Reference date/time: 29.09.2018 04:00:00

Plotting time series and profiles

To plot time series, you will need to install Crayfish plugin from QGIS plugin repository. Once the plugin is installed:

In QGIS, from the main menu > Mesh > Crayfish > Plot

An empty plot appears at the bottom of your QGIS window. To generate time series for multiple points on the map:

Make sure you have the following settings

Layer: Hurricane Michale data from Copernicus ECMWF

Plot: Time series

Group: [current]

And then click on From Map: Point

Hold Ctrl key on your keyboard and click on the locations you want to plot time series:

A series of graphs will be plotted for each point with matching colours.

You can also create long profile (including aggregated long plot) for a specific time step.

Export mesh to vector or raster

To export mesh to a raster or vector, you can use the processing toolbox:

In QGIS, from the main menu > Processing > Toolbox

Under Crayfish algorithm, double click on Rasterize

A new window will appear:

  • For Input mesh layer select Hurricane Michale data from Copernicus ECMWF

  • For Minimum extent click on … and select Use Layer Extent. In the new pop-up, select Hurricane Michale data from Copernicus ECMWF

  • For Map units per pixel, type: 0.500

  • For Dataset group, select 2 metre temperature

  • For Timestep, select 29 days, 6:00:00

  • Click Run

Similarly, you can export your mesh to points or polygon for each time step.

Export to animation

To export to animation, you can set up a print layout template.

Ensure you have selected 10 m wind quantity from the mesh layer properties panel

Right-click on Hurricane Michael data from Copernicus ECMWF and select Export to animation

Set the correct parameters for start time/end time

Set the values for time, legend, title, etc

Set the filename for the animation file

Mesh calculator

Mesh calculator is similar to the Raster calculator with the following added functionalities:

  • Aggregate functions, e.g. calculate maximum values over time

  • Time filter

Try to calculate the maximum precipitation values for Hurricane Michale data from Copernicus ECMWF dataset

Learn More

Input new release

To join the FOSS4G in Bucharest this week, we have released a new version of Input, a mobile app based on QGIS for field survey.

There have been many new features and enhancements in the new release. You can download the latest version from here:

Get it on Google Play

New form widgets

Slider widget has been added as a method to insert values in the forms. The widget configuration follows the QGIS form settings. In addition, the default value settings in QGIS are also recognised in Input forms.

Defaults in Input

Map rendering indicator

An indicator will appear on the map, while the app is trying to render the content.

Better synchronisation

Download and upload to the Mergin service have been improved substantially. There is a progress bar indicator for the download/upload. You can also cancel the process.

64-bit version

With the new Google Play Store requirement, we are also now shipping the 64-bit version of the application. Our initial tests showed faster loading and rendering of the maps.

FOSS4G

We will be in Bucharest during FOSS4G 2019. Come and talk to us about Input, QGIS, web mapping, etc during the conference!

Learn More

Mergin QGIS plugin

One of the key features of Input mobile app, is the ability to upload/download your data from field through Mergin directly from the app.

For uploading/downloading your project, the only method was to use Mergin web interface. But with this plugin, users can interact with their projects and data directly from within QGIS desktop.

How to use the plugin?

You can install the Mergin plugin from QGIS plugin repository. Once it’s installed, you will see Mergin provider from your QGIS browser panel.

Mergin QGIS plugin

To use the plugin, you need to sign into your Mergin account. You can then easily:

  • Download your existing projects
  • Create a project
  • Synchronise your changes
  • Delete a local copy of your project

For more information about this plugin, see user documentation.

Once you synchronise your changes to Mergin, the data will be available from your Input mobile app. To download the app for your Android device, click below:

Get it on Google Play

Learn More

Input: a mobile app for surveying

We are pleased to announce the first public release of Input. Input is a Free and Open Source mobile application built on top of QGIS.

Get it on Google Play

Why Input?

Input in action

Collecting data is often an essential part of a geo-data management workflow. The problems we have tried to resolve with Input:

  • A mobile app: to collect the data. The app has an intuitive interface. Similar to Google Maps, you don’t need to read a whole bunch of documentation to be able to use the app.

  • Data synchronisation: a collaborative way of managing the data. We provide Mergin, a central storage, where data administrators can upload their data/projects for their users to change in the field. Changes made to the data through Input will be tracked and can be uploaded to Mergin. Likewise, data administrators can propagate changes to their users by updating the files on Mergin.

How to use Input?

You can set up your projects in QGIS. Input is based on QGIS, so it can read all data and services (e.g. Shapefile, Geopackage, TIF, WMS, XYZ tiles, WFS, etc) available in QGIS.

You can customise your forms and identify panel for the layers to be surveyed. Input uses Display tags and Map Themes to better view the data. For more information, see QGIS project configuration of the user documentations.

Input in action

You can then upload your data and projects to Mergin and share them with your users. Permissions to users to read/write the project can be granted through Mergin.

Input can be installed from Google Play Store. Users will be able to log in to the their Mergin account and download the projects.

Within the app, users can capture geometries (e.g. points, lines and polygons). Capturing of data can be free-hand, or it can be achieved by streaming the GPS locations and generating vertices.

Forms can be easily edited based on the widgets users have set up in the QGIS project. For example, you can add photos, notes, dates, etc to the digitised features.

Input keeps track of changes and you can upload the changes back to Mergin from within the app.

Feedback

If you’d like to use Input and Mergin within your enterprise environment, please contact us so that we can provide you with a dedicated hosting and no data limit.

Learn More

QGIS for macOS - update

Following our crowdfunding campaign, we are pleased to announce the completion of QGIS packages for macOS.

Thanks to the response from the QGIS community, we have finalised the packages, ready for your day-to-day use. Below are the list of improvements we have carried out:

  • Support for Processing tools:
    • GRASS (7.6): most algorithms work but there are still some reliant on Python 2.x. This issue will be resolved with the release of GRASS 7.8
    • SAGA and GDAL/OGR: all algorithms work
  • Extra Python modules: similar to OSGeo4W, common Python modules are now shipped with the packages.
  • Support for ECW and MrSid raster formats
  • Support for dark theme

The main benefits of the packages:

  • Built with Apple Developers Certificate
  • Availability of QGIS nightly (master)
  • Automatic packaging
  • Use of the latest libraries (Proj, GDAL, etc)

Unfortunately, we did not raise enough funds to resolve issues with macOS 10.11 and 10.12. Python (and hence plugins) are not supported for those OSes. In addition, it was not possible to polish the code and move the infrastructure to QGIS.org.

Supporters of our campaign

Our work was made possible with the help of the supporters of our campaign. Below is the list of individuals and organisations who supported this campaign:

  • Ujaval Gandhi
  • Loïc Ségalou
  • Fletcher Applied Sciences, Inc
  • Auspatious
  • Gecosistema SRL
  • Farallon Geographics
  • L - P : Archaeology
  • 3D geoinformation group, TU Delft
  • Henry Walshaw
  • Joe Tennis
  • Nathaniel Vaughn KELSO
  • Geobits Ltd
  • Hillcrest Geographics
  • Larry Spencer
  • Malte Pill
  • John Steggall
  • Spatial Networks
  • Dogwood Geospatial
  • Hugh Saalmans
  • Ryan Cooper
  • QGIS Usergroup Denmark
  • LuminFire

In addition, there were individuals who donated directly to QGIS.org for this work.

You may also like...

Mergin Maps, a field data collection app based on QGIS. Mergin Maps makes field work easy with its simple interface and cloud-based sync. Available on Android, iOS and Windows. Screenshots of the Mergin Maps mobile app for Field Data Collection
Get it on Google Play Get it on Apple store
Learn More

Crowdfunding: QGIS for macOS

If you are a macOS user, there are already several methods to install QGIS. But, unfortunately the packages are not signed and often using old libraries. We have started a prototype to automatically generate QGIS packages for macOS.

The packages are proved to be popular and the QGIS PSC has accepted to take over the infrastructure and publish them eventually as the official QGIS packages for macOS.

To polish the work and sort out some of the issues, we will need extra funds. We are hoping QGIS macOS users will be able to help the crowdfunding campaign. The target amount is 8,500 € and the campaign will be active until 31 January 2019.

Please have a look at the dedicated page QGIS for macOS for further details and help us spread the word!

You may also like...

Mergin Maps, a field data collection app based on QGIS. Mergin Maps makes field work easy with its simple interface and cloud-based sync. Available on Android, iOS and Windows. Screenshots of the Mergin Maps mobile app for Field Data Collection
Get it on Google Play Get it on Apple store
Learn More