QGIS Planet

Overview of QGIS 3.16 LTR and QGIS 3.18 Mesh Features

QGIS Mesh Layer now support DHI dfsu and HECRAS 6.0 format.

The releases of QGIS 3.16 LTR/QGIS 3.18, MDAL 0.8.0 and Crayfish 3.5.0 are planned for 19 February 2021. We are delighted to present the following improvements for the upcoming releases:

  • In-memory mesh datasets with persistence
  • Multi identify tool for mesh
  • Virtual dataset groups for mesh layer
  • 3D Mesh Layer Bug Fixes and speed optimizations
  • DHI’s dfsu format support (QGIS 3.18 only)
  • HECRAS 6.0 format support

If you’d like try the latest features, you can always install QGIS nightlies/master, which comes with all the latest features described in this blog post.

If you want to learn more about Mesh Layer in QGIS, read more here…

Mesh Calculator and Layer Improvements

The Virtual dataset groups for mesh layer and In-memory mesh datasets with persistence improvements greatly improves the workflows when using the Mesh Calculator in QGIS. Users can store the intermediate results into virtual layers that are recalculated on the fly (similarly to QGIS expressions for vector layers). The layers can be later persisted to any supported MDAL formats with write capabilities.

Multi identify tool for mesh feature allows to browse the temporal mesh data in more intuitive way and includes the extra information about the Mesh datasets loaded.

These features were sponsored by Artelia Group.

DHI’s dfsu format support

MDAL 0.8.0 supports loading of the external drivers. A first driver, available on Windows QGIS 3.18 only, is popular DFSU format by DHI, which is used to store MIKE 21 output results.

You can see how to configure and use QGIS to work with DFSU format on the DHI’s YouTube channel

Special thanks to the sponsor DHI this feature.

QGIS

We have added the following new features to QGIS to convert between mesh and vector/raster:

  • TIN Mesh creation
  • Ported most of the processing algorithms from Crayfish to QGIS core
  • 3D rendering improvements
  • Many Mesh Layer bugfixes

MDAL

  • Support for external drivers.
  • Fixed HECRAS vector datasets support
  • Packaging in conda

Crayfish

  • Fixed SAGA flow direction support
  • Fixed FFMPEG download link
  • Ported most of the processing algorithms from Crayfish to QGIS core

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

Mergin and PostGIS in action

One of the challenges of data collection projects is consolidating all the data a central database, such as Postgres/PostGIS. Using PostGIS as a live survey layer is not usually recommended:

  • Security: exposing your database to the wider internet
  • Access and connectivity: internet connection is not always guaranteed for field survey projects

A more cumbersome way around this, is to convert your tables from PostGIS to a file based GIS layer (e.g. GeoPackage) and take the files with you to the field. This will create a new problem: keeping all the tables (from multiple surveyors) and the PostGIS table up-to-date.

During a survey to assess water access for villages in Limpopo province, South Africa, our friends at Kartoza have commissioned us to extend the Mergin service to support PostGIS. The Mergin service already supports file-based data synchronisation. The aim was to bridge the gap between the Mergin service and PostGIS so that the changes from Mergin immediately appear on PostGIS and vice versa.

To facilitate that, we further developed the Geodiff library to support Postgres driver. In addition, we developed mergin-db-sync tool to sync the tables from Postgres database with the Mergin service. The mergin-db-sync tool runs as a service (daemon) that keeps an eye on a particular Mergin project, and if there is a new version of the project, it will fetch the most recent changes and apply them to database tables in PostgreSQL. It works also the other way around at the same time: it looks for changes in the configured PostgreSQL schema and upload them in a new version of the Mergin project if any changes were detected. This service can be easily started on the local Intranet (where the PostgreSQL database is run) and therefore it does not need any adjustments to the firewall to allow access to the local database from public Internet.

DB-Sync schema

The above diagram details how Postgres/PostGIS synchronisation works with the Mergin service via the DB-Sync tool.

  • Tables 1 and 2 from the Postgres/PostGIS server are set up to work with the Mergin service
  • DB-Sync tool runs on a server on a regular interval to sync with the Mergin service
  • An offline version of Tables 1 and 2 are provided within the QGIS survey project on Mergin
  • Several surveyors download the project and add their data mostly while offline. The data are then synced with the Mergin.

From the surveyors’ point of view, the extra set up to sync with the Postgres/PostGIS does not affect their workflow. In fact, mergin-db-sync tool acts as another client syncing data to the Mergin project, therefore it is possible to see all the changes in the project log originated from mergin-db-sync tool.

The tool is available on GitHub with a permissive open source license (MIT). At this point it supports PostgreSQL, but the mechanism is fairly generic and support for other database engines may be added in the future without great effort. All the heavy lifting is done by the Geodiff library which has been significantly enhanced during the development of mergin-db-sync tool.

To try the tool, please follow the instructions on the project’s readme on GitHub. The easiest way is to use it in a Docker container.

If you have any issues or feedback to enhance the tool, you can file a ticket on the project repo.

If you’d like to set up DB-Sync tool with your Mergin survey projects, you can contact us on [email protected]

New version of Serval QGIS plugin

Raster selection tools and editing with QGIS expressions.

What’s new?

In the previous version Serval allowed for setting a constant value to a single raster cell at a time. The latest version brings in new raster cells selection tools and new ways of manipulating cells value:

  • QGIS expressions and
  • 3x3 low-pass filter.

Multi-bands rasters are fully supported - each band can be edited separately. Serval is meant to provide a convenient way to modify selected parts of a raster layer. It is not optimized to process entire images - use Raster Calculator for that.

Raster selection tools

In order to modify raster cells values users need to select them first with a line or polygon selection tool. The line selection tool has a configurable width and unit. Selections can also be easily imported/exported from/to a vector map layer.

Multiple selections are allowed and users can add or remove from existing selection using CTRL and SHIFT keys modifiers, respectively.

Selecting raster cells

Modifying rasters with QGIS expressions

In addition to setting a constant value, new cells value might be evaluated using QGIS expressions. Users can build their expressions using cells’ row and column variables, or x and y of cell center point.

In the Serval group of the builder users will find several expression functions for:

  • interpolating raster value from a mesh layer,
  • averaging attribute values from vector layer features intersecting the cell,
  • getting the nearest vector layer feature attribute,
  • interpolating z-value from the nearest 3D linestring feature.

Interpolation on a mesh layer

With the recent QGIS additions it is very easy to create mesh layers. Users can use a mesh layer for raster cell value interpolation. For example, interpolate_from_mesh() function will identify mesh dataset value and return it as a new raster value, optionally only when the value is higher than existing cell value. It is a convenient way for finding an embankment shape on a raster DTM - see pictures below.

Serval QGIS expression builder

Raster values interpolated on a mesh layer

Interpolation on 3D linestrings

Another useful function finds the nearest point on a 3D line feature and interpolate its z-value. It could be used for fine-tuning terrain elevation from a 3D profile line.

For example, if the existing embankment crown needs to be raised by an amount at one of its ends, a user could create a profile line, adjust the vertex elevation in the Vertex Editor and use it for the interpolation.

Raising embankment elevation based on 3D profile line

Creating custom expression functions

In the Expression builder users can define their own functions using other types of vector and raster layers.

Applying 3x3 low-pass filter

For eliminating peak values or local cell values averaging, users can use 3x3 low-pass filter.

Applying low-pass filter

For more details and examples, refer to the plugin’s Manual.

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

Google Summer of Code 2020 : QGIS 3D Improvements

In this year Google Summer of Code (GSoC), multiple new features were added to QGIS 3D. Belgacem Nedjima as the student with Martin Dobias and Peter Petrik as the mentors have implemented the following features into the 3D viewer of QGIS:

Feature 1 : Textures support

Now it is possible to add textures to vector layer data (buildings) in the 3D viewer: To do that you need to go the vector layer properties and select Realistic Textured (Phong) shading mode and select the image to be displayed on the surfaces by providing an image file to the diffuse texture field. texture-support-UI You can adjust the scale of the image and its rotation from the texture scale and texture fields respectively. texture-support-preview There is a workaround to seperate roofs from walls using rule based rendering by adding 2 seperate rules and selecting which facet (roof or a wall) to display and select which rendered facade to be used and the shading setting for each rule. texture-support-walls-roofs-UI Results for seperating roofs and walls texture-support-walls-roofs-preview

Feature 2 : Directional lights

QGIS 3.16 adds support for directional lights that you can think of as the sun. The default light in QGIS 3.16 is now directional which makes the lighting of the whole scene better. To use directional lights, open the 3D configuration dialog and from the lights tab you can configure how many lights you use. If you select a directional light, you will see the new improved way to provide the direction of the light (Thanks to Vincent Cloarec for the UI improvements). directional-lights-UI

Feature 3 : Scene export as .obj file

In the 3D viewer there is a new tool to export the scene as a .obj file and visualize or edit it in other software like Blender or MeshLab. To export the scene, from the 3D viewer select the 3D object icon and you will see the following dialog: export-UI You can select the name of the .obj file and where to save it (you need to select a folder because you will have multiple files if you export textures or color informations). You can specify the resolution of the terrain in case you’re using a DEM as well as the resolution of the exported textures. Here is a view of what an exported scene that has multiple rendering rules looks like in MeshLab: export-meshlab-preview

Feature 4 : Skybox rendering

You can add a skybox to your scene from the 3D configuration dialog and selecting from the 2 skybox formats provided:

  • Panoramic Texture: One 360 image is used to generate the skybox
  • Distinct Faces: 6 different faces describing the cube map of the skybox skybox-panoramic skybox-distinct-faces The result of applying a skybox to the scene: skybox-preview

Feature 5 : Shadow rendering (beta)

Althought it might not work for everyone, shadow rendering was added as a technical preview in QGIS 3.16. To try shadows, you need to open the 3D configuration dialog and enable shadows from the Shadows tab. shadows-settings-menu You can experiment with the shadow rendering parameters if you want to decrease the visual artifacts and make the shadows look better in the scene. Here is how the shadows look like in our scene: shadows-preview

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

QGIS 3.16 package on macOS

QGIS 3.16 on macOS coming with Proj6, GDAL3 and major fixes! macOS packaging mechanism is completely reworked for QGIS 3.16. This will bring QGIS on macOS on par with other platforms that already benefit from the new versions of PROJ and GDAL libraries - especially the greatly improved reprojection support.

QGIS nightly and QGIS 3.16

QGIS3.16

If you want to try the new packages, download and install the QGIS from nightly builds. There are still few weeks before QGIS 3.16 release for testing and bug-fixing, so make sure you report all your issues before the 23rd October 2020. Multiple packages now can be installed side-by-side, just rename or move the installed QGIS.app!

The earlier packages were based on Homebrew, but we didn’t have control over the versions of dependencies. We switched to the new system where we have full control, which is important for good quality releases.

The package/installer is not yet notarized by Apple, so you need to right-click on the QGIS.app icon and open it to overcome the security control of your macOS (only for 10.15+).

If you want to join the effort in testing and/or development of macOS packages, please drop me a mail on [email protected] We have a dedicated Slack channel to discuss the maintenance of the macOS packages.

What is in the all-in-one bundle?

The goal is to have all advanced functionality of QGIS prepared and ready to use after simple one-click installation.

QGIS and utilities

QGIS Desktop, of course, but also

  • QGIS server (try with /Applications/QGIS.app/Contents/MacOS/bin/qgis_mapserver)
  • QGIS process (try with /Applications/QGIS.app/Contents/MacOS/bin/qgis_process)
  • QtDesigner for custom forms (/Applications/QGIS.app/Contents/MacOS/bin/designer)
  • ogr2ogr and various other gdal utilities

FOSS4G libraries

  • Geos 3.8.1
  • Proj 6.3.2
  • GDAL 3.1.2
  • GRASS 7.8.3
  • SAGA 7.3.0

Python 3.7

with pip, so you can install the missing packages with command /Applications/QGIS.app/Contents/MacOS/bin/pip3 install <your package>

but, many packages are already preinstalled for you!

  • pipenv
  • requests
  • plotly
  • matplotlib
  • scipy
  • numpy
  • shapely
  • geopandas
  • gdal
  • h5py
  • pyproj
  • pillow

QGIS Processing

  • GRASS processing tools
  • GDAL processing tools
  • SAGA processing tools
  • OTB processing tools (needs external installation of OTB)

Data Providers

All basic providers

  • GeoPackage
  • Spatialite
  • DB2
  • WCS/WFS/OWS/WMS/WMTS
  • Vector Tiles
  • XYZ Tiles
  • OGR/GDAL
  • PostgreSQL
  • MDAL

But also:

  • ECW
  • MrSID
  • MSSQL
  • OracleDB

Acknowledgments

In Spring 2020, we prototyped the building of FOSS macOS libraries in completely controlled environment. Few weeks ago we have successfully finished the QGIS 2020 Grant “QGIS macOS Package Improvements”. This wouldn’t be possible without support from QGIS.org and its sponsors. And without proper testing and reporting of issues from our macOS power-users.

QGIS for iOS

Do you want to see your QGIS projects and data from your iPhone and iPad? Check InputApp

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

Crowdfunding: Support for point cloud data in QGIS

We are delighted to announce that in collaboration with North Road and Hobu, we are running a crowdfunding campaign to implement native support for point cloud data in QGIS.

point cloud support in QGIS

With the proposed changes, you will be able to load, style and visualise your point cloud data in QGIS in 2D and 3D map views.

The work will be carried out by the trusted and highly skilled developers across PDAL and QGIS community (Lutra Consulting, North Road and Hobu) who have been at the forefront of some of the exciting features in Open Source projects.

If you or your organisation are point cloud data users, this is your chance to bring native support for your data in QGIS. With this work, you will be able to overlay your point cloud data to your other data (vector/raster). The addition of native support for point cloud data in QGIS will pave the way to support analytical tools for point cloud data in future.

The target amount is 49,000 € and the campaign will be active until 15 October 2020.

Please have a look at the dedicated page point cloud data support in QGIS 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

Overview of QGIS 3.14 Mesh Features

Mesh layer is now supported for the 1D, 2D and 3D data frames. It also comes with integration to the temporal controller in QGIS 3.14.

The releases of QGIS 3.14, MDAL 0.6.1 and Crayfish 3.4.4 are planned for this Friday We are delighted to have made improvements for the upcoming release:

  • full integration with the new temporal controller
  • 1D meshes support (e.g. to support urban drainage system models)
  • New rendering and styling options for mesh layers
  • improving greatly rendering speed for large datasets
  • various other enhancements and bug-fixes

If you are eager to try the latest features, you can always install QGIS nightlies/master.

Special thanks to all contributors and the sponsors of these features

Do you want to use QGIS Mesh Layers in your projects? Read more…

Native QGIS Temporal Controller

The long awaited native temporal support in QGIS is finally materialised. We managed to port all QGIS Mesh Layer code to the new infrastructure and remove the custom time slider in the Mesh Layer properties/styling dialog. The native temporal support will greatly benefit users in the long run. We can now share the code components for time handing with raster, vector and WMS-T and other temporal data types. Also user can load multiple temporal layers and change time-domain for all of them at the same time.

mesh 3d in time

Unfortunately, the new temporal framework changed the API, so if you use QgsMeshLayer in your plugins, consult the QGIS documentation for required changes.

New MDAL logo and docs

We have started writing the proper documentation for all supported formats and also reference documentation for developers. We welcome all contributions to improve the documentations. Just go to https://www.mdal.xyz and click “Edit on GitHub”!

mdal logo

Support for 1d meshes

MDAL and QGIS now supports 1D meshes, currently for UGRID and 3Di formats. Other formats should be easy to add. If you are interested in supporting a format, drop us a line.

You can read the full technical description in the following QGIS Enhancement Proposal.

The 1D meshes can be styled with the various renderers, for example use of pressure data to calculate line width: variable with 1D mesh

Furthermore, Crayfish plugin has been extended to support such mesh data frames. For example, 1D plots in Crayfish with the snapping and routing along the network can be used: snapping 1D mesh

2D mesh rendering improvement

2D meshes streamlines/particles/arrows can be now styled by the colour ramp. You can better display streamlines and mesh vectoral data varaition: streamline colorram

Meshes in 3D map view

The mesh layer is now fully supported in the 3D map view. You can visualise your terrain and overlay vector arrows (e.g. velocity) and other mesh quantities (e.g. water surface) in the 3D map view.

meshes 3D

Other features and bugfixes

QGIS

  • The mesh rendering speed increased by 2-20 times depending on various mesh/zoom/map/data combinations
  • Ability to show only subset of dataset groups in the Mesh styling window
  • Support for reading multiple meshes in one file (e.g. UGRID)
  • Ability to resample vertex values to faces
  • Support for saving/loading of QML styles
  • Full usage of temporal controller, even in print templates, animation, …

MDAL

  • The GRIB and NetCDF datasets are now loaded twice as fast
  • Support for UGRID datasets with magnitude and direction
  • Support for reading of UGRID classified data and its usage in QGIS color ramps
  • Renamed the pointers and functions in the API for consistency
  • Created brand new logo and started the online-docs
  • Support XMS Tin

Crayfish

  • Ported to new temporal API
  • Added 1D plots
  • Fixed various UI bugs

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

Working with vector tiles - Part 1

After a successful crowdfunding campaign to support Vector Tiles in QGIS, we have been busy adding new features for the upcoming release (3.14).

In this blog post, we are exploring different methods to add your vector tiles and style them.

Loading data - local files

If you have an MBTiles file containing vector tiles, you can simply drag and drop the layer in QGIS. Alternatively, you can connect to a local vector tile file(s) from the Data Source Manager or the Browser Panel. As an example, you can use this QGIS project which contains Switzerland vector tiles (maximum zoom level =14).

Vector tile file

You can also test this project on your mobile device. Download Input app (for iOS you need the TestFlight version of the app), head to Projects > Explore and download saber\blogpost-vectortile.

Loading data - web resources

You can access vector tiles served through the web. You need to have the URL and possibly API key to add them in your QGIS. In the example below, vector tiles from MapTiler are added to QGIS:

Vector tile file

To use MapTiler data, we recommend using their dedicated QGIS plugin, which comes with vector tiles in different styles. The plugin should be available on the QGIS plugin repository.

Styling data

Vector tiles contain points, line and polygon geometries. You can define a set of rules for features and apply style and label. Style and labelling can be dependent on the zoom level. Similar to vectors and rasters, styles for vector tiles can be stored in QML format. To set up filters, you can use the identify tool in QGIS to inspect geometries of your vector tile:

Vector tile file

Currently, the most common format to store vector tiles styles are Mapbox GL (json). The OpenMapTiles repo contains some excellent Mapbox GL styles. We initially developed a tool to convert the json files to QGIS style. The plugin has been further extended and developed by MapTiler to better handle the OpenMapTiles data schema. This will ensure future changes to the data schema will be addressed by the plugin.

Example of styles converted from Mapbox GL to QGIS from Maptiler QGIS plugin

Vector tile file

Vector tile file

Vector tile file

Vector tile file

In the next post, we will explore different options within QGIS or other 3rd party tools to generate vector tiles.

Credits

All the data used in this blog post was from OpenStreetMap server by Geofabrik. OpenMapTiles conversion tool was used to generate the tiles from OpenStreetMap to vector tiles. See software license for more details.

The following OpenMapTiles Mapbox GL styles Bright, Positron, Basic and Fiord were converted using mapbox2qgis and QGIS MapTiler plugin.

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

QGIS development on macOS

We introduced a new packaging and build environment for QGIS and its dependencies for macOS. This will bring a completely new experience for QGIS macOS developers and subsequently, the users.

Overview of the changes

What is new

In 2019, we upgraded the QGIS macOS packaging to address several issues at the time. This was made possible with the help of the QGIS project and donors who supported our work.

The upgraded system had a more transparent and automated packaging approach. But it came with its own limitation. We have been using Homebrew to fetch the QGIS dependencies and to compile only QGIS for the LTR, PR and nightly releases. The main problems with this approach are:

  • Homebrew can only support one version of a package. This will limit QGIS to be built against multiple versions of, for example GDAL or Proj libraries. In one hand, we want QGIS nightlies to use more bleeding edge versions of the dependencies (e.g. for plugin or core developers) . On the other hand, using a more stable and tested versions of the dependencies for PR or LTR are not recommended (e.g. users and organisations). OSGeo4W offers the same approach for different versions of QGIS in Windows. Unfortunately, Homebrew does not offer such an option.

  • Continuous integration has been a major part of QGIS infrastructure to ensure pull requests by developers do not break workflows in certain Operating Systems. Microsoft Windows and Linux have been well supported in the CI. But with the macOS packages, it was left to user to test and report back any bugs after Pull Requests were merged to QGIS source code.

With the recent work, we have addressed both of the above issues. QGIS and almost all of its dependencies are built from sources. It will be also possible to easily integrate the code with the current CI for macOS with GitHub Workflows. This will bring more stability and control over the way we build and package QGIS for our users, whilst helping developers to identify issues with their pull requests for macOS platform, before merging them to the QGIS source code.

QGIS development on macOS

If you want to check the latest QGIS master on macOS or tweak the code to see some new exciting features, now it should be easier with the following steps, to compile QGIS from source code an a clean machine:

1. Install XCode

  • Upgrade to latest MacOS version
  • Install latest XCode from the official AppStore
  • Open XCode and accept license
  • Install command line tools from XCode, AppStore or from command line by sudo xcode-select --install

2. Install Qt and QGIS-Deps

  • Download the latest install qgis-deps script and check the version of Qt required
  • Install the required Qt version referenced from the official Qt download area. Or alternatively download qt-version.tar.gz from deps area
  • Download latest qgis-deps package too.
  • Run install_qgis_deps.bash script to install Qt in /opt/Qt/5.14.1/clang_64 and QGIS-Deps to /opt/QGIS/qgis-deps-0.3.0 folder. You may need to use root privileges or create those folders under /opt/ and assign the right permission beforehand.

3. Install other tools

  • Install Homebrew
  • Install minimal set of packages required for macOS build tools listed in this list

You may use MacPorts, Conda or other packaging system, but by the end you need cmake, git, astyle and other useful tools to be on the system PATH

4. Download and compile QGIS

  • Open the terminal (Note that the qgis-deps package is not yet signed, so you may need to add Terminal to System Preferences -> Security & Privacy -> Privacy -> Developer Tools)
  • In your work folder (e.g. ~/Projects/), clone QGIS with git clone [email protected]:qgis/QGIS.git
  • Create a build folder mkdir -p ~/Projects/build-QGIS
  • Go to the created empty directory cd ~/Projects/build-QGIS
  • Run CMake to generate the build system (use your download qgis-deps and qt package)
    QGIS_DEPS_VERSION=0.3.0;\
    QT_VERSION=5.14.1;\
    PATH=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage/bin:$PATH;\
    cmake -DQGIS_MAC_DEPS_DIR=/opt/QGIS/qgis-deps-${QGIS_DEPS_VERSION}/stage \
        -DCMAKE_PREFIX_PATH=/opt/Qt/${QT_VERSION}/clang_64 \
        ../QGIS
    

Note that all libraries are picked from qgis-deps and not from system /usr/lib or Homebrew’s /usr/local/ or system Frameworks /Library/Frameworks/. Especially check Proj, GDAL, sqlite3 and Python paths. You should see output similar to this:

-- QGIS version: 3.13.0 Master (31300)
-- Found OpenCL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenCL.framework (found version "1.2")
-- Found OpenCL C++ headers: /Users/peter/Projects/mesh/QGIS/external/opencl-clhpp/include
-- Found GRASS 7: /opt/QGIS/qgis-deps-0.3.0/stage/grass78 (7.8.2, off_t size = 8)
-- Looking for openpty
-- Looking for openpty - found
-- Found Proj: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libproj.dylib version 6 (6.3.1)
-- Found GEOS: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libgeos_c.dylib (3.8.1)
-- Found GDAL: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libgdal.dylib (3.0.4)
-- Found Expat: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libexpat.dylib
-- Found Spatialindex: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libspatialindex.dylib
-- Found Qwt: /opt/QGIS/qgis-deps-0.3.0/stage/lib/qwt.framework (6.1.4)
-- Found LibZip: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libzip.dylib
-- Found libzip: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libzip.dylib
-- Found Sqlite3: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libsqlite3.dylib
-- Found Protobuf: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libprotobuf.dylib (found version "3.11.4")
-- Found Protobuf: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libprotobuf.dylib
-- Found ZLIB: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libz.dylib (found version "1.2.11")
-- Found zlib: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libz.dylib
-- Found PostgreSQL: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libpq.dylib
-- Found SpatiaLite: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libspatialite.dylib
-- Qt WebKit support enabled
-- Found Qt version: 5.14.1
-- Found QScintilla2: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libqscintilla2_qt5.dylib (2.11.4)
-- Found QtKeychain: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libqt5keychain.dylib
-- Found QCA: /opt/QGIS/qgis-deps-0.3.0/stage/lib/qca-qt5.framework (2.3.0)
-- Found QCA OpenSSL plugin
-- Found Libtasn1: /opt/QGIS/qgis-deps-0.3.0/stage/include
-- Pedantic compiler settings enabled
-- Found PythonInterp: /opt/QGIS/qgis-deps-0.3.0/stage/bin/python3 (found suitable version "3.7.7", minimum required is "3")
-- Found Python executable: /opt/QGIS/qgis-deps-0.3.0/stage/bin/python3
-- Found Python version: 3.7.7
-- Found Python library: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libpython3.7m.dylib
-- Found Python site-packages: /opt/QGIS/qgis-deps-0.3.0/stage/lib/python3.7/site-packages
-- Found PyQt5 version: 5.14.1
-- Found SIP version: 4.19.21
-- Found QScintilla2 PyQt module: 2.11.4
-- txt2tags not found - disabled
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found exiv2: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libexiv2.dylib
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libhdf5.dylib;/opt/QGIS/qgis-deps-0.3.0/stage/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib (found version "1.10.0")
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Found NetCDF: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libnetcdf.dylib
-- Found LibXml2: /opt/QGIS/qgis-deps-0.3.0/stage/lib/libxml2.dylib (found version "2.9.10")
-- Looking for updwtmpx
-- Looking for updwtmpx - not found
-- Found GSL: -L/opt/QGIS/qgis-deps-0.3.0/stage/lib -lgsl -lgslcblas
-- Using PROJ 6 srs database.
-- Ctest Binary Directory set to: /Users/peter/Projects/mesh/build-QGIS/output/bin
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/peter/Projects/mesh/build-QGIS
  • Compile QGIS make -j4 and wait for [100%] mark :)
  • Now you can run QGIS with command ./output/bin/QGIS.app/Contents/MacOS/QGIS or open ./output/bin/QGIS.app

Notes:

  • If you use QT Creator, you can open already generated project to modify files from it.
  • The critical CMake variable is QGIS_MAC_DEPS_DIR and you must ensure it contains valid qgis-deps installation
  • You can add more variables to CMake command to tweak the build settings, e.g. enable 3D with ‘-DWITH_3D’, etc.
  • Consult QGIS’s [INSTALL]https://github.com/qgis/QGIS/blob/master/INSTALL) for latest developement tips

Development of the QGIS-Deps package

If you want to help with development of the qgis packages on macOS, please feel free to contact [email protected]. The development is taking place on public QGIS-Mac-Packager repository.

Next steps

Currently, we are carrying out the following tasks:

  • to move all-in-one QGIS bundle for LTR/PR/nighlies to use this new package of dependencies. Check out Twitter for for any news on the packages. We are aiming to have the new packaging in place for the QGIS 3.14 release, which will bring GDAL 3 and Proj 6 to macOS users

  • to sign the qgis-deps packages, so that developers do not need to tweak Privacy settings to use it for compiling QGIS and its dependencies.

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

Successful crowdfunding for vector tile support in QGIS

We are delighted to announce that the crowdfunding to support Vector Tiles in QGIS has been successful!

Here is the list of donors who have supported us and the wider QGIS user by funding this feature.

List of donors

(in no particular order)

Also many thanks to those who spread the word and offered us moral support!

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

Recording tracks using QGIS and Input app

In this post, we will use Input app to record tracks. The first step is to set up a project in QGIS.

Quick recap

In the previous tutorial, we set up a simple QGIS project and transferred it to our devices using the Mergin service.

In this tutorial we are going to set up a new survey project with more advanced features:

  • Forms with more options
  • Different background layers (aerial imagery and street map)
  • Using different geometry type of survey layer
  • Exploring other Input app functions

Software needed

To start with, you will need to install the following software applications:

In addition, you will need to register with the Mergin service. The Mergin service allows you to transfer data between your PC/laptop and mobile/table via the cloud. Note that after signing up to the Mergin service, you have to activate the account by clicking on the link sent to your email.

Configuring QGIS project

Similar to the previous tutorial, we are going to start with a blank QGIS project. All the data and the project will be stored locally on a folder called recording tracks.

First, start a QGIS project and add the OpenStreetMap layer under XYZ Tiles. You can add also add aerial imagery as an XYZ layer to your QGIS.

Project setup

Save your project as tracks in the recording tracks folder.

In addition, we need to create a Geopackage survey layer. Below are the attribute columns for your survey layer. Also note that need to select Line as geometry type.

To create a survey layer, in QGIS, from the main menu select Layer > Create Layer > New Geopackage Layer …. A new window will appear:

For Database click on and select the recording tracks folder then type survey.gpkg for the name of your database.

For Table name, type tracks.

For Geometry type, select Line.

You can select the option to Include Z dimension. The upcoming version of Input app supports capturing altitude from your device (or external GPS device tethered with your phone/tablet).

For Coordinate Reference System (CRS), select WGS 84 / Pseudo-Mercator EPSG:3857.

Add the following Fields. Note, different field types:

  • Type field type as text
  • Public field type as Boolean or bool
  • Photo field type as text
  • Date field type as Date & time

Geopackage survey layer

Click OK to create and add the layer to your QGIS session.

Styling layers and setting up forms

We are going to style the tracks layer based on Type field and use four categories:

  • Footpath
  • Byway
  • Cycle path
  • Bridle way

In the Layer Panels right-click on tracks layer and select Properties. A new window will appear. From the left panel, select Symbology. Change the styling from Single to Categorized on the top left section of the window. For the Value, select Type from the drop-down menu.

In the bottom-left section of the window, click on Classify. Then add 4 classes (by adding the green plus adjacent to Classify) for track types. In addition, we can add another class for Other types. Adjust the colours and line style accordingly:

Setting up style

To set up the form, select Attribute forms from the left panel of the layer properties window. Adjust the Widget type as below:

  • For fid, select Hidden
  • For Type, select Value map and add the 5 categories (Footpath, Byway, Cycle path, Bridle way and Other) for Value and Description section (see image below)
  • For Public, select Checkbox
  • For Photo, select Attachment and select the option for Relative path
  • For Date, select Date/Time

Setting up forms

Input app allows you to have a custom pop-up drawer window when you tap on feature. To customise that, you can change the Display settings under the layer properties window. For Display name select Type and in the HTML Map Tip section type:

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

Custom pop-up

Setting up map themes

We can set up two different map themes: one with aerial imagery and one with street map. To do that, ensure you have only the following layers are set to visible in your layer panel:

  • tracks
  • Aerial images

Layer visibility

On top of the layers panel, select Manage Map Themes > Add Theme …

Creating a new theme

A new window will appear. Type Aerial photo for the name of your map theme and press OK.

Now, turn off your Aerial images layer in the layer panel and turn on the OpenStreetMap layer:

OSM theme in QGIS

You can now add a new map theme and call it Street map.

Save your project and transfer your data and project to your phone through the Mergin service as described in the previous tutorial.

If you missed a step, you can see the final version of the project here. You can also skip the above section by cloning the project in the above link.

Recording tracks using Input app

In Input app, download and open Tracks project.

Downloading a project

Map view in Input

You can easily change between different map themes in Input, by going to (… More) > Map Themes:

Selecting theme in Input

OSM map theme

To capture tracks, press Record button in the lower panel in Input. A green cross will appear, centred on your GPS location. You can capture a line in two different methods:

  • Adding points to form the line by moving the map and pressing Add Point
  • Streaming GPS location while moving to form a line. To do that, press and hold GPS icon on the bottom left of your screen (see image below)

Streaming GPS

You can change the frequency of adding points when streaming GPS location, under Settings in Input. Also note that the GPS streaming can be done for polygon survey layer.

Once you finished capturing the track, press Done and you will be presented with a form:

Forms

You can easily fill the form using the drop-down menu for Type and checkbox option for Public.

By tapping on tracks on the map, you will should be able to see a small preview window presenting Type and Photo:

Preview panel

After completion of the survey, you can synchronise your data back through the Mergin and see the results in QGIS desktop.

Working with QGIS 3D - Part 2

In an earlier blog post, we looked into how to visualise rasters and terrains in QGIS 3D.

In this post, we will explore 3d vectors and how to view buildings and trees.

Data Sources

For the purpose of this blog post, we will be using

You can download all the dataset and final QGIS project from our Mergin service. Note that the DTM has been resized from 1m resolution to 5m. All of the datasets have been clipped to Luxembourg commune extent.

After styling the layers you should be able to see an image like the one below in your map view.

Options

3D Buildings

You can open a new 3D map window and set the DTM layer as your terrain as shown in the earlier blog post.

The other layer we want to view in 3D canvas is the building layer. To adjust the settings, you need to change the layer styling (by pressing F7 to open the styling panel):

Options

  • By default, the 3D rendering of vector layer is set to No symbol. Click on it and set it to Single symbol.

The buildings layer contain height information:

  • Change Altitude clamping to Absolute.
  • Change Altitude binding to Vertex.

In case, your building layer is not a 3D dataset, you can apply height and/or extrusion to be able to see them in 3D map view.

Culling mode helps rendering your scenes faster by not drawing certain features facing the camera. You can read more about culling modes here and here.

You can change Diffuse, Ambient, Specular and Shininess of the polygons using relevant widgets. These parameters are based on Phong reflection model.

Finally to better display the buildings, you can define the Edges.

You should be able to see a 3d scene similar to the one below:

Options

3D Points

Points can be displayed in 3D map view as different type of objects. In this example, we are going to display trees as combination of predefined shapes. You can extract tree points from the OpenStreetMap data (the osm_pois layer with filter: "fclass" LIKE 'tree').

For tree trunks, we can set the 3D properties as follows:

Options

The tree trunks are represented by a Cylinder shape. As you have noted, the Altitude clamping method for this layer is Relative.

For the tree top, we can duplicate the same tree layer in the layer panel and change the styling to be a Sphere shape. You will also need to set the Transformation for Y to e.g. 10, so that the spheres sit on top of the cylinders. For the example below, we have set the styling to be a mix of spheres and cones (Rule-based instead of Single symbol).

3D point renderer allows you to import 3d models supported by Open Asset Import Library.

Options

Fly-over animations

You can create animations of 3d scenes, by defining key frames. Click on the Animation icon from the 3D map view window. A new toolbar will appear at the bottom of your window.

Click on the green plus sign to add the timing of the key frames and then move the camera to a different location. You can then play the fly-over using different interpolation methods. Alternatively, you can export them as images and generate an animation outside QGIS.

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

Crowdfunding: Support for Vector Tiles in QGIS

We are happy to announce a new crowdfunding campaign to support Vector Tiles in QGIS!

This will be a great step for QGIS to support an increasingly popular technology used in web mapping to deliver maps that are faster and more flexible at the same time.

With native support for Vector Tiles in QGIS, you will be able to add more resources to your QGIS map:

  • Support for remote resources (e.g. HTTP/HTTPS map tiles)
  • Handling local vector tiles (in XYZ format)
  • Handling database vector tiles (Mapbox Vector Tiles format)

The target amount is 8,000 € and the campaign will be active until 20 March 2020.

Please have a look at the dedicated page Vector Tiles support in QGIS 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

Collecting data using QGIS and Input app

In this post, we will walk you through basic steps to set up a survey project in QGIS desktop and using it in Input app to collect data in field using your Android or iPhone/iPad device.

Software needed

To start with, you will need to install the following software applications:

In addition, you will need to register with the Mergin service. The Mergin service allows you to transfer data between your PC/laptop and mobile/table via the cloud. Note that after signing up to the Mergin service, you have to activate the account by clicking on the link sent to your email.

Configuring QGIS project

To be able to survey data, we need to set up a project in QGIS. Usually, you will need some data for your background layer (so that you can locate yourself!). In addition, you need to set up a table (or layer), to store your survey information.

For background data, we are going to use Open Street Map. For survey table, we need to decide on a form structure and the type of feature you want to survey (e.g. point of interest, tracks or parcel of land). In this case, we want to survey potholes. Also, it would be good to attach some notes for each pothole, take a photo of it and add a date for survey. The GIS format best suited to store spatial information, is Geopackage.

Let’s start by opening QGIS and add the above layers to our project. To simplify things, we can create a folder on Desktop (referred to in this tutorial as data collection folder) and store everything there.

Open QGIS from your PC/laptop. From the Browser panel (usually located on the top left side), expand XYZ Tiles and double-click on OpenStreetMap to add it to QGIS: QGIS

Browser panel in QGIS

You should see the OSM layer:

Adding OSM XYZ layer

Save your project as pothole survey in the data collection folder.

To create a survey layer, in QGIS, from the main menu select Layer > Create Layer > New Geopackage Layer …. Note that Geopackage is a file based database where you can store multiple tables (spatial or non-spatial). A new window will appear:

Creating a geodatabase

For Database click on and select the data collection folder on your Desktop and then type survey-db.gpkg for the name of your database.

For Table name, type Potholes.

For Geometry type, select Point.

For Coordinate Reference System (CRS), click on the icon to the right of EPSG:4326 - WGS84. A new window will appear. Under Filter section on the top of the window, type: 3857 and under Predefined Coordinate Reference Systems, select WGS 84 / Pseudo-Mercator EPSG:3857. Then click OK.

Assigning CRS

We can now create the column headers for our table under New Field section. For this form, we want to create the following columns to store data: Date, Notes, Photo

For Name, type Date

For Type, select Date

Click on Add to Field lists to add your column.

Repeat the same process for Notes and Photos columns, but make sure to change the Type for those columns to Text. At this stage, you should see an image similar to the one below:

Sharing projects through Mergin

Go ahead and click OK to create the layer and add it to QGIS.

Styling layers and setting up forms

The default style applied to Potholes layer is not very visible probably. To change it:

In the Layer Panels right-click on Potholes layer and select Properties. A new window will appear. From the left panel, select Symbology. Try to change the style to something shown in the image below:

Sharing projects through Mergin

Click on Apply.

We can also change the way user fills in the form. By default, you have to type in the values. But by using different widgets, we can simplify filling the form in the field.

In the Properties window, from the left panel, select Attribute forms.

Sharing projects through Mergin

We are going to change the Widget Type for each of the Fields.

fid is an auto-increment field and we can keep it hidden from users. So, highlight the fid field under Field section and then from the Widget Type select Hidden

For Data, it should have automatically selected the correct widget type:

Sharing projects through Mergin

For Notes, you can also leave the Widget Type as Text Edit.

For Photos, we need to change the Widget Type to Attachment. Also make sure to select the option for Relative paths. This will allow us to attach photos using mobile camera or gallery folder to the pothole point.

Tip: You can scroll further down and under Integrated Document Viewer and select Type as Image. This will show the image in QGIS forms too.

Sharing projects through Mergin

Project set up is completed and we can save the project.

Transferring data to mobile devices

You have 2 options to transfer your data to the mobile through the Mergin service: through website or through Mergin plugin in QGIS. In this tutorial we are going to use the plugin from within QGIS.

In QGIS, from the main menu, select Plugins > Manage and Install Plugins …. A new window will appear. From the left panel, select All and then in the search section (on the top) search for Mergin. Select the plugin from the list and click on Install plugin. After installation, you need to restart your QGIS.

After the restart, you should be able to see the Mergin icon in your Browser Panel:

Sharing projects through Mergin

In the Browser Panel, right click on the Mergin and select Configure. Type in your username (or email address) and password that you have registered with the Mergin service.

Sharing projects through Mergin

Click on Test Connection and you should see a green OK.

If you have selected to Save credentials (so you do not need to type in the username and password again) and you have not configured QGIS password manager, you will be prompted to set a password for your QGIS password manager.

After clicking OK, you should see a list of folders on your Mergin connection in your browser panel:

Sharing projects through Mergin

We can know upload the data:

Right click on the Mergin and select Create new project. A new window will appear:

For Project name type Potholes survey

Select Initialize from local drive

Click on … and and select data collection folder

Sharing projects through Mergin

Once click OK, the project will be created and content of the data collection folder will be uploaded there.

The project is now ready to be downloaded on your mobile device.

Collecting data using Input app

The project can now be accessed from Input app. Open your Input app and for the first time you should see a screen similar to the image below:

Sharing projects through Mergin

To log in to the Mergin service, you can select My projects or the green and white icon on the top right.

Sharing projects through Mergin

Type your Mergin username (or email address) and password and then select Sign in.

Once signed in, select My projects and you will see Potholes survey project in the lists

Sharing projects through Mergin

Select the download icon on the right side of Potholes survey to download your project on the phone and make it ready for survey.

After downloading is completed, select Home and you should be able to see Potholes survey.

Sharing projects through Mergin

Select Potholes survey and it will open the map:

Sharing projects through Mergin

To record a feature, select Record button and the pointer changes to a cross-hair.

Sharing projects through Mergin

By default, the cross-hair centres to your location (the orange point) on the map. You can move the map and adjust the location. To recentre the map to your location, you can select GPS button. Once you are happy with the location, you can select Add point and the form for your point will appear:

Sharing projects through Mergin

Fill in the form and press Save. You should see the map with the newly captured pothole:

Sharing projects through Mergin

Synchronising data

The data you have captured on your phone can be synchronised through the Mergin service.

In Input app, select Projects and then My projects. You should see a double arrow on the right side of the Potholes survey.

Sharing projects through Mergin

Select the double arrow to sync your project. You can also open QGIS from your PC/laptop and synchronise changes back to your desktop:

In QGIS, from the Browser Panel under Mergin > My projects right-click on Potholes survey and select Synchronize

Sharing projects through Mergin

After synchronising is completed, you should be able to see the point and its associated form on your QGIS.

Sharing projects through Mergin

Further reading

Input app’s manual can be found here.

With the Mergin service, multiple users can collect data on the same project. For more information, see this the blog post.

For more information on how to set up complex forms and map themes see QGIS documentation.

Overview of QGIS 3.12 Mesh Features

Ready for 3D meshes, vector streamlines or contour export?

The releases of QGIS 3.12, MDAL 0.5.0 and Crayfish 3.2.1 are planned for end of February 2020. We are proud to present you few of upcoming features we implemented for this release:

  • vector trace animation
  • 3D stacked meshes
  • mesh calculator enhancements
  • export contours
  • various smaller enhancements (reference time support, resampling, export plot data, mdal_translate utility)

If you are hesitant to wait till end of February, feel free to get nightly build and test it out!

Do you want to use QGIS Mesh Layers in your projects? Read more…

Support for vector trace animation and streamlines (QGIS)

Last feature from QGIS 2.x/Crayfish 2.x series that was not ported to QGIS 3 is finally available. You would be able to visualize streamlines and particles for vector datasets in mesh layers. In QGIS main menu, under Mesh>Crayfish>Export Trace you are also able to export animation with the particle traces to various video formats

Trace animation

This feature was funded by TUFLOW

Support for 3d Stacked Meshes (e.g. TUFLOW FV format)

MDAL and QGIS now supports 3D Stacked Meshes, particularly for TUFLOW-FV format. For this release, you need to choose appropriate averaging method in the QGIS interface and you are able to browse the data similarly to any other 2D dataset. 3d stacked

In Crayfish 3.2.1, you can create plots of the profile showing the variation along Z-axis.

3d stacked plot

The technical description can be found in the following QEP

This feature was funded by TUFLOW

On the fly resampling of data defined on faces to vertices

For datasets defined on faces, one can choose to interpolate data to vertices with neighbour average method. When no data interpolation method is chosen, each pixel on a single face has a single value/color. With data on vertices, the rendering for each pixel is interpolated from the values on the vertices, making smoother figures.

Use mesh contours styling panel to switch between the data interpolation methods.

No Mesh Data Resampling Dialog Mesh Data Resampling Mesh Data Resampling Dialog

This feature was funded by Austrian Ministry of Agriculture, Forestry, Environment and Water Management

Smooth export of the contours (Crayfish processing algorithm)

We have implemented a new algorithm in QGIS’s analysis library to export directly contour lines and polygons. The method is not based on GDAL as it was in the Crayfish 2.x releases. It is both faster and with smoother shapes, matching rendered images from QGIS. You can find the new processing algorithm in Crayfish processing toolbox.

Mesh Contours

This feature was funded by Austrian Ministry of Agriculture, Forestry, Environment and Water Management

Support of datasets defined on faces in QGIS Mesh Calculator

From QGIS 3.12 you can use mesh calculator for all datasets, both defined on faces and vertices. Additionally, it allows users to store the result of mesh calculator under different name or format. This allows for example to work with FLO-2D or HEC-RAS data in the QGIS mesh calculator

This feature was funded by Austrian Ministry of Agriculture, Forestry, Environment and Water Management

Support for reference time (QGIS)

For various dataset type, for example GRIB and NetCDF, the reference time in QGIS time settings dialog is prepopulated from the raw data and does not need to be set manually. Also we fixed various bugs related to time parsing, so in QGIS 3.12 it should be possible to format and show your time in plots/animations in proper way.

Reference Time

This feature was funded by TUFLOW

Support for conversion of 2dm to UGRID mesh (mdal_translate utility)

MDAL library now has a new utility: mdal_translate. For now, use can use the utility to convert text-based 2dm mesh definition files to UGRID NetCDF/HDF5 binary-based format and save up to 80% disk and speed up loading of your mesh by similar amount.

This feature was funded by TUFLOW

Support for export of 2D plot data (processing)

With Crayfish 3.2.1 you can export your time series or cross section raw dat to CSV format for further processing.

This feature was funded by Lutra Consulting

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

Tracking, calculating and merging vector changes with Input and QGIS

The latest beta release of Input (v.0.4.90) comes with smart diff support for vectors. This will allow you to use the app (current beta version) in a collaborative environment, where several users can make changes to a single survey layer (geopackage).

What does it mean?

It is often the case, where multiple users need to make changes to a single vector layer. If you work in office, this issue is usually addressed by having a central geodatabase (e.g. Postgres/PostGIS). If you want extra information (e.g. audit trails, versioning, latest changes, etc), you can modify your database, to keep track of it.

The problem arises when you want to collect data, without having access to the central geodatabase. You can do some manual work to handle this scenario, but it can easily lead into data management nightmare.

To simplify the workflow, we have developed Geodiff, a multi-platform library to keep track of changes, calculate the differences, merge and consolidate the differences.

How can I use it?

Geodiff has been integrated into the beta version of Input. This will allow you to share a project with your team and edit a single layer (geopackage format) all at the same time, even when you are offline.

To start with, you need to create a project and upload it to Mergin. You can then share the project (with write access) with your colleagues:

Sharing projects through Mergin

The project contains a survey layer (trees.gpkg). There is only one feature present within the layer:

Sharing projects through Mergin

The project is shared with two users. Both users download the project and take their devices to the field:

User 1, carried out a survey (using iPhone!), by adding a tree and editing the attribute table of the existing one. The changes were synchronised back through the Mergin:

Meanwhile, User 2 added a new feature to the survey layer. Once User 2 tries to synchronise the changes, Input automatically detects the changes not only made through User 2, but also the ones uploaded to the Mergin. The layer will be patched both locally and on the server to take all the changes into account:

The data administrator can now pull all the changes from both users in QGIS:

You can also see the history of changes to the project and the survey layer on the Mergin website. Below shows the changes from different users:

Sharing projects through Mergin

To see changes from each user, you can click on the version and it lists the changes. In this example, User 1 (jack) added a new feature and modified an existing feature:

Sharing projects through Mergin

You can also see the extended history and see where the changes have been made:

Sharing projects through Mergin

How can I test this new feature?

You can use Beta version of Input app in Android or TestFlight in iOS:

Get it on Google Play Get it on App Store

For any issues or feedback, please file a ticket on Input repository

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

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

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.

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

Back to Top

Sustaining Members