DEMConvert - 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 [1] presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is DEMConvert .

[1]Table: Parameters table for DEM Conversion.
Parameter Key Parameter Name Parameter Type
in Input geo-referenced DEM Input image
out Prefix of the output files Output File name
inxml Load otb application from xml file XML input parameters file
outxml Save otb application to xml file XML output parameters file
  • Input geo-referenced DEM: Input geo-referenced DEM to convert to general raster format.
  • Prefix of the output files: will be used to get the prefix (name withtout extensions) of the files to write. Three files - prefix.geom, prefix.omd and prefix.ras - will be generated.
  • Load otb application from xml file: Load otb application from xml file.
  • Save otb application to xml file: Save otb application to xml file.

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.