Data Download and Preparation for the Classification Tutorial
Overview
In this tutorial, you will learn how to transform a raw, unclassified point cloud into a fully classified point cloud. By the end of the tutorial, the point cloud will be classified into the following classes: ground, vegetation (low, medium and high), buildings, power lines, and pylons. All the required functionality is available in the standard LIS Pro 3D installation; no additional LIS Pro 3D add-ons are required.
In this section, we will download and prepare the data for processing using the LIS Pro 3D graphical user interface (GUI). This will introduce you to the individual processing steps that will eventually be automated in the final section of this tutorial.
Step 1: Download Data for This Tutorial
Here you can download two files in *.laz format that will be used throughout this tutorial. This data is provided by the Canton of Zurich under the CC BY 4.0 license.
Download the following two files:
472053_5245153.laz472053_5245903.laz
Step 2: Create a Folder Structure for Processing
First, create a top-level project directory, for example pc_classification.
Next, create a folder named data and place the two downloaded *.laz files in it.
Finally, create a folder named processing. This is where we will save all the output files generated during the processing steps.
The resulting folder structure should look like this:
pc_classification/ # top-level folder
├── data/
│ ├── 472053_5245153.laz
│ └── 472053_5245903.laz
└── processing/
Step 3: Prepare Data for Processing
Since we are using only two datasets to demonstrate the classification workflow in the GUI, we could simply import and merge the two *.laz files using the Import LAS/LAZ Files and Merge Point Clouds tools.
However, we will create and use a point cloud data catalog instead, as this will demonstrate how to handle larger projects.
Point clouds acquired through airborne laser scanning (ALS) are often delivered as individual files, either as tiles arranged in a regular grid or overlapping flight strips. A data catalog allows us to treat theses individual files as a single large dataset. We can query spatial subsets of the point cloud without having to worry about how the data is organized at the file level.
Data catalogs will also play an important role in the automation part of this tutorial. We will use them to query and process individual tiles based on a user-defined tile size and overlap.
Throughout our tutorials, we demonstrate how to execute individual tools using the Tool Libraries interface. If you are not yet familiar with this approach, please refer to the corresponding sections in our “Getting Started with the SAGA & LIS Pro 3D GUI” tutorial: Running Tools/Executing Tools in the GUI and Finding tools in the GUI.
Create a Point Cloud Data Catalog
To create a point cloud data catalog from the *.laz files, run the Create Virtual LAS/LAZ Dataset tool.
The resulting catalog references all the individual point cloud files and allows us to treat them as a single dataset containing all the points, without actually merging or duplicating the data.
Follow these steps:
- Add all available *.laz files as Input Files
- Specify an output *.lasvf file named tiles.lasvf. Save it in the same folder as the *.laz files.
- Click Execute
Tool: Create Virtual LAS/LAZ Dataset
Geoprocessing: LIS Pro 3D → Virtual → LAS/LAZ // Tools → LIS Pro 3D → Virtual
| Parameter | Setting |
|---|---|
| Input Files | “/…/data/las/472053_5245903.laz” “/…/data/las/472053_5245153.laz” |
| Input File List | |
| Filename | /…/data/las/tiles.lasvf |
| File Paths | relative |
| Color Depth | 16 bit |
| Riegl Extra Bytes | ☐ |
| Ignore LAS File Version | ☐ |
| Ignore Point Data Record Format | ☐ |
| Ignore Coordinate Reference System | ☐ |
Create a Spatial Index
To speed up spatial queries when working with data catalogs, we will create a spatial index for each *.laz file using the Create LAS/LAZ Index tool:
- Add all available *.laz files as Input Files
- Click Execute
Tool: Create LAS/LAZ Index
Geoprocessing: LIS Pro 3D → Import/Export → LAS/LAZ // Tools → LIS Pro 3D → Import/Export
| Parameter | Setting |
|---|---|
| Input Files | “/…/data/las/472053_5245903.laz” “/…/data/las/472053_5245153.laz” |
| Input File List | |
| Index All Files | 🗹 |
| Indexing | |
| Tile Size | 0 |
| Threshold | 1000 |
| Adaptive Coarsening | |
| Minimum Point Count | 100000 |
| Maximum Interval Count | -20 |
The tool creates a sidecar file with the extension *.lax for each *.laz file. Each *.lax file stores the spatial index associated with its corresponding point cloud file.
Create a Polygon Layer of the Data Catalog’s Extent
Finally, we will create a polygon layer representing the spatial extent of the data catalog. We can then use this layer to define an area of interest (AOI) for subsequent data processing.
As a first step, we will create a vector layer containing the bounding box of each file referenced in the data catalog using the Create Tileshape from Virtual LAS/LAZ tool:
- Specify the data catalog file (tiles.lasvf) in the Filename parameter
- Click Execute
Tool: Create Tileshape from Virtual LAS/LAZ
Geoprocessing: LIS Pro 3D → Virtual → LAS/LAZ // Tools → LIS Pro 3D → lis_virtual
| Parameter | Setting |
|---|---|
| Filename | /…/data/las/tiles.lasvf |
| << Tileshape | <create> |
The resulting vector layer containing the bounding boxes is now available in the Data tab.
Double-click the layer to open it in a Map View.
You should now see the bounding boxes of both input datasets displayed as polygons.
To obtain the overall spatial extent of all datasets referenced in the catalog, we use the Get Shapes Extents tool:
Tool: Get Shapes Extents
Geoprocessing → Shapes → Tools // Tools → Shapes → Tools
| Parameter | Setting |
|---|---|
| Data Objects | |
| Shapes | |
| >> Shapes | Tileshape_tiles |
| << Extents | <create> |
| Options | |
| Get Extent for … | all shapes |
| Add Buffer | 0 |
Rename the output dataset (Tileshape_tiles [Extent]) to AOI. To do this, select the datasets in the Data tab and change its name in the dataset settings.
Note that the datasets we have created in the GUI have not yet been saved to disk. We could save each dataset individually, but it is often more convenient to create a SAGA project instead. A project file stores references to the data files along with their GUI settings. Saving a project allows us to save all modified datasets in one go.
To create a project, go to File → Project → Save Project as… and save the project as pc_classification.sg-project in the processing folder.
After clicking Save, a new dialog will appear, listing all modified (and unsaved) datasets. Simply select Save all to save both datasets in the processing folder.
Recap
We have now completed the data preparation and are ready to start processing. So far, we have performed the following steps:
- Created a point cloud catalog.
- Created a spatial index for each file referenced in the catalog.
- Created a vector dataset defining the AOI that we will use for the interactive processing in the GUI.