Knowledge Base

Back to Terrain Module

Importing a Pix4D file into Terrain Module

Updated December 15, 2021

This article applies to:
  • Terrain 3D
  • Terrain Forestry
  • RoadEng Civil
  • RoadEng Forestry
  • Softree Optimal

Download and unzip "example_quarry_2.p4d"  dataset from the below address. Scroll down to the download project files section (Quarry). Note that the size of the file is 2.8 GB.

Over the past few years, Softree has seen a significant increase in customers using DEM data and imagery acquired from UAVs (unmanned aerial vehicles), commonly referred to as drones. This form of mapping has a wide range of applications such as surveying right-of-ways prior after felling and prior to construction, construction monitoring, and as-built surveys.

While RoadEng (Terrain Tools) is not a drone-post processing software solution, you can take full advantage of working with the data within our software.


Tips for working with drone data in Terrain 3D and RoadEng:

  • Setup / save/ and re-use your data import specifications – especially useful if you are flying the same area (ie. a stockpile or mine site) over again.
  • Selectively thin – depending on the size of your project, drone-collected point clouds can get really big, really fast. We highly recommend selecting thinning your data outside your area of interest – more info here:
  • With post-processing software, like Pix4D, you can output in a variety of formats that our RoadEng software works with.
  • *.las or *.laz are the best quality, but you can also export a geo-referenced *.tif.

Details on how to export *.laz and *.tif files with Pix4D. Please note that the following steps will take several hours; you may want to run this overnight!

  • Open the Pix4Dmapper software.
  • Project | Open Project. Navigate to find the example_quarry_2.p4d file (please download the file from the website' address mentioned in the second line of the article).
  • Click on the Processing icon on the bottom left side of the screen. Make sure the DSM, Orthomosaic Index is tagged and then press Start
  • Tag the Classify point cloud item in the Processing Options dialog box.
  • On the Menu bar, click View | rayCloud.
  • On the left sidebar, in the Layers section expand the Point Clouds list and then the Densified Point Cloud list and right-click on the point cloud to be exported.


Figure 1: Exporting Point Cloud in Pix4Dmapping

  • Click Export Point Cloud, the Export Point Cloud pop-up will appear. Tag all point groups since Terrain Module could recognize and import specific groups of points.


Figure 2: Export Point Cloud dialog box

  • Navigate to the path where you want to save the point cloud (example_quarry_2_group1 _densified_point_cloud_part_1 .laz).
  • It is possible to select the desired format between the following options: LiDAR LAS File Format (*.las), Compressed LiDAR LAS File Format (*.laz), Polygon File Format (*.ply), XYZ File Format (*.xyz). In this example, the LAZ format has been selected.
  • Click OK.

To open the LAZ file in the Terrain Module, follow the below steps.

  • File| Open and select example_quarry_2_group1_densified_point_cloud_part_1 .laz file from the folder and press Open

The Import Options dialog box will appear (figure below).

  • Select 2: Ground from the Point Class selection box. If you want to see the number of ground points, click on the Examine File(s) button (this can take a while). So other point groups include low vegetation, high vegetation, buildings and reserved will not be imported into the Terrain Module.


Figure 3: Import Options dialog box

Make sure that Display points is not checked and Display extents border is selected. 

Note: In this exercise the entire LiDAR data set is read into the Terrain module and then the data is thinned. This is not possible for very large LiDAR files; the Selection tab in the Import Options dialogue (figure below) allows you to thin your data as it is being read from files.


Figure 4: Selection tab in the Import Options dialog box

  • Press OK to proceed with importing the data in full resolution.
  • Press Continue if prompted by the warning message as shown below:


Figure 5: Softree Warning dialog box

In the status bar at the bottom of the screen, the total number of points (13,944,307) is mentioned. This is manageable but unnecessarily large. We will now reduce the size of the dataset. Note that because the Display points item was not checked, no point is drawn on the screen.

  • Select Terrain Modeling | Simplify. This will open the Simplify Surface Point Data dialogue box. 


Figure 6: Simplify Surface Point Data dialog box

  • Ensure the Method is set to Basic Grid Simplification (Fast)Set the Sample Grid Spacing to 0.5. 
  • Press Calculate.

Under Point Counts you will see that our settings will result in a 88.9 % reduction.

  • Press OK to proceed with the thinning.
  • Press OK when prompted with the warning message: “Warning there is not enough space to UNDO this operation. Do you wish to continue?”

In the status bar, the filtered dataset (selected points) contains 1,554,392 points. This is much more manageable for TIN computations.

Generate TIN from LiDAR

  • Terrain Modeling | Generate TIN. Set Terrain Calculation dialog box according to the below figure and press OK. Set Minor Contours interval to 2. 


Figure 7: Terrain Calculation dialog box

The generated TIN model should look like Figure 8 (plan and 3D view of the quarry).



Figure 8: Generated TIN model

  • File | Save as your file as example_quarry_2_group1_densified_point_cloud_part_1 .terx.


  • File | Open and select example_quarry_2_transparent_mosaic_group1.tif  file from the folder and press Open.  
  • In the Select Option dialog box select Image Files and press OK.


Figure 9: Select Options dialog box

  • In the Import Options dialog box the Reference Coordinates of the image are automatically filled out by the Terrain Module. Maximize the Image Quality and press OK. 


Figure 10: Import Options dialog box

Note that both GeoTIFF and LAZ files have the same coordinate system.

background impoerted.jpg

Figure 11: GeoTIFF file in the Terrain module

  • Save as your file as example_quarry_2_transparent_mosaic_group1.terx.

Now open the example_quarry_2_group1_densified_point_cloud_part_1 .terx file again.   

  • Click-right on the screen and select Active Window (Plan) Options (below figure).


Figure 12: Window appears on the screen after righ-clicking

  • In the Plan Window Options dialog box, select the Background tab and click on Add button.
  • Navigate to find example_quarry_2_transparent_mosaic_group1.terx file and press OK.

Now the photo of the quarry could be seen as a background on the screen (below figure).


Figure 13: GeoTIFF file on the background of the contours

Just because we enjoyed this article, here are some best practices for collecting better drone data