Metashape Professional allows to generate and visualize a digital elevation model (DEM). DEM represents a surface model as a regular grid of height values.


Metashape enables to perform DEM-based point, distance, area, volume measurements as well as generate cross-sections for a part of the scene selected by the user. More information on measurement functionality can be found in the tutorial - DEM based measurement.


This article describes the following processing steps:


Build DEM procedure can be performed only for projects saved in .PSX format.

DEM is calculated for the part of the model within the bounding box. To adjust the bounding box use the Resize Region and  Rotate Region toolbar buttons. Rotate the bounding box and then drag corners of the box to the desired positions.



Build DEM (Projection type - Geographic)


1. Select the Build DEM... command from the Workflow menu (Workflow > Build DEM...). 


2. In the Build DEM dialog box set Coordinate system for the DEM or choose the parameters for building DEM.




Projection type:

  • Geographic -  allows to choose a geographic coordinate system from the dropdown list or upload parameters of a customized geographical coordinate system. The coordinate system set by default is the coordinate system previously selected for the model itself. You can switch to a different one, providing that corresponding datum transformation parameters are available.
  • Planar - Metashape allows to project DEM onto a plane set by the user. You can select the projection plane and orientation of the resulting DEM.
  • Cylindrical - allows to project DEM on a cylindrical surface. In this case, the height value is calculated as the distance from the model surface to the cylindrical surface.

Source data it is recommended to calculate DEM based on Point Cloud. Elevation data results can be generated from a Depth maps, Tie Point Cloud. Mesh and Tiled Model options can be used, if DEM should follow the polygonal model precisely or point cloud has not been reconstructed.

Interpolation:

  • If interpolation mode is Disabled it leads to accurate reconstruction results since only areas corresponding to point cloud or polygonal points are reconstructed. Usually, this method is recommended for Mesh and Tiled Model data source.
  • With Enabled (default) interpolation mode Metashape will calculate DEM for all areas of the scene that are visible on at least one image. Enabled (default) setting is recommended for DEM generation.
  • In Extrapolated mode the program generates holeless model with some elevation data being extrapolated up to the bounding box extents.

Point classes the parameter allows to select a point class/classes that will be used for DEM calculation.


3. Click OK button when done.


4. The progress dialog box will appear displaying the current processing status. To cancel processing click Cancel button.





You can enable Basemap in Ortho view when viewing build DEM. Click Basemap button on the Toolbar



Build DEM (Projection type - Planar)


The article will consider the option when you can manually set the direction of the axes using markers when building DEM. 

You can use markers that are already in the project or create new markers. We have added 3 markers to the project by which we want to orient the XY axes. 



1. Select the Build DEM... command from the Workflow menu (Workflow > Build DEM...). 


2. In the Build DEM dialog box set Planar projection and orientation the axis for building DEM.




3. Click OK button when done.


4. The progress dialog box will appear displaying the current processing status. To cancel processing click Cancel button.





Export DEM


To export Digital Elevation Model: 


1. Select Export DEM... command from the File menu (File > Export > Export DEM...).


2. In the Export DEM dialog specify parameters for export.


Parameters:

  • No-data value is used for the points of the grid, where elevation value could not be calculated based on the source data. Default value is suggested according to the industry standard, however it can be changed by user.
  • Write KML file option is available only if the model is georeferenced in WGS84 coordinate system due to the fact that Google Earth supports only this coordinate system.
  • World file specifies coordinates of the four corner vertices of the exporting DEM. This information is already included in GeoTIFF elevation data as well as in other supported file formats for DEM export, however, you could duplicate it for some reason.
  • Split in blocks option in the Export DEM dialog can be useful for exporting large projects or meeting special DEM requirements.
  • To export a particular part of the project use Region section of the Export DEM dialog


In Metashape DEM export colored from RGB palette is supported. Select Palette option in the
Raster transform section of the Export DEM dialog box. The palette option is supported for the
following export formats: TIFF, JPEG, JPEG2000, PNG.




3. Click Export button to start export.


5. Browse the destination folder, choose the file type, and print in the file name. Click Save button.


6. The progress dialog box will appear displaying the current processing status. To cancel processing click Cancel button.


The following formats are supported for DEM export:
• GeoTIFF elevation data (*.tif)

• JPEG (*.jpg)
• JPEG 2000 (*.jp2)
• JPEG XL (*.jxl)
• PNG (*.png)
• BMP (*.bmp)
• GeoPackage (*.gpkg)
• MBTiles (*.mbtiles)
• Tile Map Service Tiles (*.zip)
• Google Map Tiles (*.zip)
• Google KMZ (*.kmz)
• World Wind Tiles (*.zip)
• Arc/Info ASCII Grid (*.asc)
• Band interleaved file format (*.bil)
• XYZ file format (*.xyz)