20. Travailler avec des nuages de points

20.1. Introduction aux nuages de points

Qu’est-ce qu’un nuage de points ?

A point cloud is a three-dimensional image of a space made up of many individual of data points (up to billions, even trillions). Each of the points has an x, y and z coordinate. Depending on the capture method, point clouds usually also have additional attributes that came from the capture, such as color values or intensity. These attributes can be used, for instance, to display point clouds in different colors. In QGIS, a point cloud can be used to generate a three-dimensional image of the landscape (or of another space).

Formats pris en charge

QGIS supports the data formats Entwine Point Tile (EPT) and LAS/LAZ. To work with point clouds, QGIS always saves the data in EPT. EPT is a storage format that consists of several files stored in a common folder. To allow quick access to the data, EPT uses indexing. For more information on the EPT format, see entwine homepage

If the data is in LAS or LAZ format, QGIS will convert it to EPT when it is loaded for the first time. Depending on the size of the file, this may take some time. In this process, a subfolder is created in the folder in which the LAS/LAZ file is located according to the scheme ept_ + name_LAS/LAZ_file. If such a subfolder already exists, QGIS loads the EPT immediately (which leads to a reduced loading time).

Bon à savoir

In QGIS it is not (yet) possible to edit point clouds. If you want to manipulate your point cloud, you can use CloudCompare, an open source point cloud processing tool. Also the Point Data Abstraction Library (PDAL - similar to GDAL) offers you options to edit point clouds (PDAL is command line only).

Due to the large number of data points, it is not possible to display an attribute table of point clouds in QGIS. However, the identify Identify tool supports point clouds, so you can display all attributes, even of a single data point.

20.2. Propriétés des nuages de points

The Layer Properties dialog for a point cloud layer offers general settings for the layer and its rendering. It also provides information about the layer.

Pour ouvrir la fenêtre Propriétés de la couche :

  • Dans le panneau Calques, double-cliquez sur le calque ou faites un clic droit et sélectionnez Propriétés… dans le menu contextuel ;

  • Allez dans menu Couche ► Propriétés couche … lorsque la couche est sélectionnée.

La boîte de dialogue Nuage de points Propriétés du calque propose les sections suivantes :

|métadonnées| Informations

|système| Source

|symbologie| Symbologie[1]

3d 3D View `:sup:`[1]

rendering Rendu

échelle d'élévation Élévation[1]

editMetadata Metadata

basicStatistics Statistiques

[1] Aussi disponible dans le panneau Style de Couche

Note

Most of the properties of a point cloud layer can be saved to or loaded from a .qml file using the Style menu at the bottom of the properties dialog. More details at Sauvegarder et Partager les propriétés d’une couche

20.2.1. Onglet Information

The metadata Information tab is read-only and represents an interesting place to quickly grab summarized information and metadata on the current layer. Provided information are:

  • Généralités telles que nom dans le projet, le chemin source, l’heure et la taille de la dernière sauvegarde, le fournisseur utilisé

  • Basé sur le fournisseur de la couche : étendue et nombre de points

  • Le système de coordonnées de référence : nom, unités, méthode, précision, référence (c’est-à-dire statique ou dynamique)

  • Métadata délivrées par le prestataire : date de création, version, format des données, échelle X/Y/Z, …

  • Sélectionné dans editMetadata Onglet Metadata (où elles peuvent être éditées) : accès, étendues, liens, contacts, historique…

../../../_images/point_cloud_information.png

Fig. 20.1 Onglet d’informations sur le nuage de points

20.2.2. Onglet Source

Dans le |système| :guilabel:onglet Source, vous pouvez voir et modifier les informations de base sur la couche de nuage de points :

  • Settings: Set a Layer name different from the layer filename that will be used to identify the layer in the project (in the Layers Panel, with expressions, in print layout legend,…)

  • Assigned Coordinate Reference System (CRS): Here you can change the layer’s assigned Coordinate Reference System, selecting a recently used one in the drop-down list or clicking on setProjection set Projection Select CRS button (see Sélectionneur de Système de Coordonnées de Référence). Use this process only if the CRS applied to the layer is a wrong one or if none was applied.

../../../_images/point_cloud_source.png

Fig. 20.2 Onglet source de nuage de points

20.2.3. Onglet Symbologie

In the symbology Symbology tab the settings for the rendering of the point cloud are made. In the upper part, the settings of the different feature renderers can be found. In the lower part, there are sections with which general settings for the entire layer can be made and which apply over feature renderers.

20.2.3.1. Feature Rendering types

There are different options for rendering point clouds that can be selected using the drop-down menu at the top of the Symbology tab (see Fig. 20.3):

  • étendue du nuage de points Extent Only: Only a bounding box of the extent of the data is displayed; convenient for overviewing the data extent. As usual, the Symbol widget helps you configure any properties (color, stroke, opacity, sub-layers, …) you’d like for the box.

  • Pseudo couleur à bande unique Attribute by Ramp: The data is drawn over a color gradient. See Attribute by Ramp Renderer

  • Couleur multi-bande RGB : dessine les données en utilisant les valeurs de couleur rouge, vert et bleu. Voir RGB Renderer

  • palette Classification: The data is drawn using different colors for different classes. See Classification Renderer

When a point cloud is loaded, QGIS follows a logic to select the best renderer:

  • if the dataset contains color information (red, green, blue attributes), the RGB renderer will be used

  • else if the dataset contains a Classification attribute, the classified renderer will be used

  • sinon, il reviendra au rendu basé sur l’attribut Z

If you do not know the attributes of the point cloud, the basicStatistics Statistics tab provides a good overview of which attributes are contained in the point cloud and in which ranges the values are located.

../../../_images/point_cloud_symbology_overview.png

Fig. 20.3 Point cloud symbology tab

Attribute by Ramp Renderer

With Pseudo couleur à bande unique Attribute by Ramp, the data can be displayed by numerical values over a color gradient. Such numerical values can be, for example, an existing intensity attribute or the Z-value. Depending on a minimum and a maximum value, the other values are spread to the color gradient via interpolation. The distinct values and their assignment to a certain color are called « color map » and are shown in the table. There are various setting options, which are described below the figure.

../../../_images/point_cloud_attribute_by_ramp.png

Fig. 20.4 Point cloud symbology tab: Attribute by Ramp

  • Min and Max define the range that is applied to the color ramp: the Min value represents the left, the Max value the right end of the color ramp, the values in between are interpolated. By default QGIS detects the minimum and the maximum from the selected attribute but they can be modified. Once you have changed the values, you can restore the defaults by clicking on the Load button.

  • The Interpolation entry defines how values are assigned their color:

    • Discrete (a <= symbol appears in the header of the Value column): The color is taken from the closest color map entry with equal or higher value

    • Linear The color is linearly interpolated from the color map entries above and below the pixel value, meaning that to each dataset value corresponds a unique color

    • Exact (a = symbol appears in the header of the Value column): Only pixels with value equal to a color map entry are applied a color; others are not rendered.

  • The Color ramp widget helps you select the color ramp to assign to the dataset. As usual with this widget, you can create a new one and edit or save the currently selected one.

  • The Label unit suffix adds a label after the value in the legend, and the Label precision controls the number of decimals to display.

The classification Mode helps you define how values are distributed across the classes:

  • Continuous: Classes number and color are fetched from the color ramp stops; limits values are set following stops distribution in the color ramp (you can find more information on stops in Définition d’une rampe de couleurs).

  • Equal interval: The number of classes is set by the Classes field at the end of the line; limits values are defined so that the classes all have the same magnitude.

The classes are determined automatically and shown in the color map table. But you can also edit these classes manually:

  • Double clicking in a Value in the table lets you modify the class value

  • Double clicking in the Color column opens the Sélecteur de couleur widget, where you can select a color to apply for that value

  • Double clicking in the Label column to modify the label of the class

  • Right-clicking over selected rows in the color table shows a contextual menu to Change Color… and Change Opacity… for the selection

Below the table there are the options to restore the default classes with Classify or to manually symbologyAdd Add values or symbologyRemove Delete selected values from the table.

Since a customized color map can be very complex, there is also the option to fileOpen Load an existing color map or to fileSaveAs Save it for use in other layers (as a txt file).

If you have selected Linear for Interpolation, you can also configure:

  • checkbox Clip out of range values By default, the linear method assigns the first class (respectively the last class) color to values in the dataset that are lower than the set Min (respectively greater than the set Max) value. Check this setting if you do not want to render those values.

  • Legend settings, for display in the Layers panel and in the layout legend. Customization works the same way as with a raster layer (find more details at Personnaliser une légende de raster).

RGB Renderer

With the Couleur multi-bande RGB renderer, three selected attributes from the point cloud will be used as the red, green and blue component. If the attributes are named accordingly, QGIS selects them automatically and fetches Min and Max values for each band and scales the coloring accordingly. However, it is also possible to modify the values manually.

A Contrast enhancement method can be applied to the values: No Enhancement, Stretch to MinMax, Stretch and Clip to MinMax and Clip to MinMax

Note

The Contrast enhancement tool is still under development. If you have problems with it, you should use the default setting Stretch to MinMax.

../../../_images/point_cloud_rgb.png

Fig. 20.5 The point cloud RGB renderer

Classification Renderer

In the palette Classification rendering, the point cloud is shown differentiated by color on the basis of an attribute. Any type of attribute can be used (numeric, string, …). Point cloud data often includes a field called Classification. This usually contains data determined automatically by post-processing, e.g. about vegetation. With Attribute you can select the field from the attribute table that will be used for the classification. By default, QGIS uses the definitions of the LAS specification (see table “ASPRS Standard Point Classes” in the PDF on ASPRS home page). However, the data may deviate from this schema; in case of doubt, you have to ask the person or institution from which you received the data for the definitions.

../../../_images/point_cloud_classification.png

Fig. 20.6 The point cloud classification renderer

In the table all used values are displayed with the corresponding color and legend. At the beginning of each row there is a checkbox check box; if it is unchecked, this value is no longer shown on the map. With double click in the table, the Color, the Value and the Legend can be modified (for the color, the Sélecteur de couleur widget opens).

Below the table there are buttons with which you can change the default classes generated by QGIS:

  • With the Classify button the data can be classified automatically: all values that occur in the attributes and are not yet present in the table are added

  • With symbologyAdd Add and symbologyRemove Delete, values can be added or removed manually

  • Delete All removes all values from the table

20.2.3.2. Point Symbol

Under Point Symbol, the size and the unit (e.g. millimeters, pixels, inches) with which each data point is displayed can be set. Either Circle or Square can be selected as the style for the points.

20.2.3.3. Layer Rendering

In the Layer Rendering section you have the following options to modify the rendering of the layer:

  • Maximum error: Point clouds usually contains more points than are needed for the display. By this option you set how dense or sparse the display of the point cloud will be (this can also be understood as “maximum allowed gap between points”). If you set a large number (e.g. 5 mm), there will be visible gaps between points. Low value (e.g. 0.1 mm) could force rendering of unnecessary amount of points, making rendering slower (different units can be selected).

  • Opacity: You can make the underlying layer in the map canvas visible with this tool. Use the slider to adapt the visibility of your layer to your needs. You can also make a precise definition of the percentage of visibility in the menu beside the slider.

  • Blending mode: You can achieve special rendering effects with this tool. The pixels of your overlaying and underlying layers are mixed through the settings described in Modes de fusion.

20.2.4. Propriétés de la vue 3D

In the 3d 3D View tab you can make the settings for the rendering of the point cloud in 3D maps. Following options can be selected from the drop down menu at the top of the tab:

../../../_images/point_cloud_3d_view.png

Fig. 20.7 The point cloud 3D view tab with the classification renderer

In the lower part of the 3d 3D View tab you can find the Point Symbol section. Here you can make general settings for the entire layer which are the same for all renderers. There are the following options:

  • Point size: The size (in pixels) with which each data point is displayed can be set

  • Maximum screen space error: By this option you set how dense or sparse the display of the point cloud will be (in pixels). If you set a large number (e.g. 10), there will be visible gaps between points; low value (e.g. 0) could force rendering of unnecessary amount of points, making rendering slower (you can find more details at Symbology Maximum error).

  • Point budget: To avoid long rendering, you can set the maximum number of points that will be rendered

  • Point cloud size: For your information only, the total number of points is shown here

  • checkbox Show bounding boxes: Especially useful for debugging, shows bounding boxes of nodes in hierarchy

20.2.5. Onglet Rendu

Under the Scale dependent visibility group box, you can set the Maximum (inclusive) and Minimum (exclusive) scale, defining a range of scale in which features will be visible. Out of this range, they are hidden. The mapIdentification Set to current canvas scale button helps you use the current map canvas scale as boundary of the range visibility. See Visibility Scale Selector for more information.

Note

Vous pouvez aussi activer l’échelle de visibilité sur une couche depuis le panneau de couches. Clic-droit sur la couche et dans le menu contextuel, sélectionner Définir l’échelle de visibilité.

../../../_images/point_cloud_rendering.png

Fig. 20.8 L’onglet de rendu du nuage de points

20.2.6. Onglet Élévation

Dans l’échelle échelle d'élévation :guilabel:”Élévation”, vous pouvez définir des corrections pour les valeurs Z des données. Cela peut être nécessaire pour ajuster l’altitude des données dans les cartes 3D. Il existe deux options de réglage :

  • Vous pouvez définir un Echelle : si 10 est entré ici, un point qui a une valeur Z=``5`` est affiché à une hauteur de 50.

  • Un décalé au niveau z peut être entré. Ceci est utile pour faire correspondre différentes sources de données dans sa hauteur. Par défaut, la valeur z la plus basse contenue dans les données est utilisée comme valeur. Cette valeur peut aussi être restaurée avec le refresh :sup:bouton « Actualiser » à la fin de la ligne.

../../../_images/point_cloud_elevation.png

Fig. 20.9 L’onglet élévation du nuage de points

20.2.7. Onglet Métadonnées

Écart-type` editMetadata L’onglet Metadata vous offre des options pour créer et modifier un rapport de métadonnées sur votre couche. Voir Metadata pour plus d’informations.

20.2.8. propriétés statistiques

Dans les basicStatistics :guilabel: L’onglet « Statistiques » vous permet d’avoir un aperçu des attributs de votre nuage de points et de leur répartition.

En haut vous trouverez la section Attribut Statistics. Ici tous les attributs contenus dans le nuage de points sont listés, ainsi que certaines de leurs valeurs statistiques : Minimum, Maximum, Moyenne, Écart-type

S’il y a un attribut Classification, alors il y a une autre table dans la section inférieure. Ici toutes les valeurs contenues dans l’attribut sont listées, ainsi que leur abondance absolue Compte et relative %.

../../../_images/point_cloud_statistics.png

Fig. 20.10 L’onglet Statistiques du nuage de points