How to create a topographic profile with QGis 3.26 (Part 5-2)

Here’s a 5-chapter tutorial on the new QGis feature in version 3.26: elevation profiles.

Chapter 1: Profiles from vector layers

Chapter 2: Profiles from raster layers

Chapter 3: Profiles from point clouds (Lidar)

Chapter 4: Profiles layout

Chapter 5: Profiles in QField

The data required for this tutorial is available here.

The versions used are QGis version 3.30.3 and QField version 2.8.2.

Chapter 5-1: Profiles in QField – Projects with a raster DTM layer

We’ll start with the project from the previous article, where we built a profile with two terrain layers:

  • a contour layer, whose representation on the profile has been put into linear form
  • a raster layer from the BDAlti, whose representation has been set to surface.

We also have 3D layers (XYZ) for roads and buildings, and 2D layers for hedges, watercourses and forests. In the Project properties, we indicated that the terrain type was FLAT.

On the terrain device with QField, the result of this project is:

The difference in result is explained by the fact that QField uses a default digital terrain model, MAPZEN Global Terrain, which appears as this grey surface.

QField’s default terrain layer

Layers with linear or point symbology, extruded or not, are displayed in front of the MAPZEN profile. Layers with “surface below line” symbology are displayed behind MAPZEN.

The line corresponding to the contour line is therefore visible, but the BDAlti is hidden behind the grey surface.

There is no option in QField to show or hide the MAPZEN profile. You can only replace it with a layer from your QGis project, at this project level.

To do this, return to the project properties window in QGis, in the terrain tab, and change the terrain type to DEM (raster layer).

Once you’ve applied this option, you won’t see any difference to your profile in QGis. On the other hand, once transferred to the mobile device, the same profile will appear as :

The case of 2D layers

One difference that continues to appear concerns vector layers that contain no elevation, either in their geometry or in an attribute.

This is the case for hedges, which are a 2D layer. In the QGis project, we have no problem displaying them on the profile, using an option in the layer properties window.

In the Terrain tab, we set the elevation restriction to Fixed to terrain. Entities will be “draped” over the layer representing the terrain.

In QField, this operation is not foreseen (at least for the moment). QField profiles use the data contained in each layer: either the Z of the geometry, or an attribute in the table, or an offset set in the layer properties. However, no inter-layer operations, such as draping, are implemented.

If you need to see these entities on your QField profile, the solution is to create a new XYZ layer.

To do this, go to Treatments->Toolbox->Vector Geometry-> Draped (set the raster’s Z value).

We define the hedges as the source layer and the BDAlti as the source of the Z values. The resulting file, haiesZ.shp, will be an XYZ file.

Once this layer has been created, go to Properties->Land and set the elevation restriction to ABSOLU, since the Z we’ve included corresponds to the height of the land.

On our QGis profile we’ll see:

We see the hedges, but now they come from the hedgesZ layer and not the hedge layer. Once transferred to the mobile device, we’ll get the following result:

The features are well placed on the profile.

Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

Leave a Reply

Your email address will not be published. Required fields are marked *