Showing results for 
Search instead for 
Do you mean 

HOW TO convert XYZ data to multiple raster DEMs in batch mode

by Technical Evangelist on ‎09-28-2016 08:16 AM (1,417 Views)


How to convert XYZ data files (*.xyz) to separate raster DEMs in batch mode?


Select the ERDAS IMAGINE Terrain tab and choose the Terrain Prep Tool button.


In the Terrain Prep Tool dialog load at least one XYZ file (*.xyz) that you want to convert to a raster image by clicking the Add DTM files to the list button. You will add the other XYZ files later.




To change the pixel size of the output DEM choose Split from the Process menu of the Terrain Prep Tool.




In the Split DTM dialog click the Settings button. This will open the Output Settings dialog where you can enter the X and Y Cell Sizes.




Click OK in the Output Settings dialog and then click Cancel in the Split DTM dialog. 


Save the Terrain Prep Tool project by choosing Save from the File menu.


Batch Command File creation


Create your Batch Command file (*.bcf) and point to the saved Terrain Prep Tool project file (*.dfp). In the example below the project is saved in “d:/input/test.dfp”. Create a new text file with following content:



** IMAGINE Version 16.0 Batch Commands File


variable Input1 User;

variable Output1 Auto "d:/output/$(Input1.pathright)$(Input1.root)_convert.img" Delete_Before;


dtmsplitprocess -single d:/input/test.dfp '$(Input1)' '$(Output1)' -even 1 1 -overlap 0 -meter 'DTM Split'


If you want to change the output folder path you should modify it where it is highlighted in red in the above example (d:/output/).


Save this file with the filename extension *.bcf.


Load the Batch Command File (*.bcf) in the Batch Command Editor.

ERDAS IMAGINE > File tab > Batch > Open Batch Command file.




Click the Add Files button to add all of the XYZ files to be processed.


You can choose the Multiple File Selection tab and enable the Use the following Selection Pattern option specifying the path where the XYZ files are located.




Or you can click the Load button in the Batch Command Editor dialog to load a Batch List file (*.bls).


To create a Batch List file you should create a text file with following content, specifying the location of your input data:


Input1 Output1

d:/temp2/ ""

d:/temp2/ ""


Change the filename extension of this text file to *.bls.


Click the Run Now button to begin the batch process.