5.1.4 DEM Conversion

Converts a geo-referenced DEM image into a general raster file compatible with OTB DEM handling.

Detailed description

In order to be understood by the Orfeo ToolBox and the underlying OSSIM library, a geo-referenced Digital Elevation Model image can be converted into a general raster image, which consists in 3 files with the following extensions: .ras, .geom and .omd. Once converted, you have to place these files in a separate directory, and you can then use this directory to set the ”DEM Directory” parameter of a DEM based OTB application or filter.

Parameters

This section describes in details the parameters available for this application. Table 5.4, page 375 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is DEMConvert.




Parameter key

Parameter type

Parameter description




in

Input image

Input geo-referenced DEM

out

Output File name

Prefix of the output files

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file








Figure 5.4: Parameters table for DEM Conversion.

Example

To run this example in command-line, use the following:

otbcli_DEMConvert -in QB_Toulouse_Ortho_Elev.tif -out outputDEM

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the DEMConvert application 
DEMConvert = otbApplication.Registry.CreateApplication("DEMConvert") 
 
# The following lines set all the application parameters: 
DEMConvert.SetParameterString("in", "QB_Toulouse_Ortho_Elev.tif") 
 
DEMConvert.SetParameterString("out", "outputDEM") 
 
# The following line execute the application 
DEMConvert.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.