IMAGINE Discussions

Discuss and share topics of interest using ERDAS IMAGINE the world’s leading geospatial data authoring system.
Showing results for 
Search instead for 
Do you mean 
Reply
New Contributor
Posts: 3
Registered: ‎08-21-2017

convert XYZ data to multiple raster DEMs in batch mode

How to convert XYZ data to multiple raster DEMs in batch mode using ERDAS IMAGINE 2015?

I've found tutorial: http://community.hexagongeospatial.com/t5/ERDAS-IMAGINE-Q-A/HOW-TO-convert-XYZ-data-to-multiple-rast...

but it is dedicated for version 2016. Unfortunately, when I used version 2015 and I open window Select Batch Files, format XYZ is unavailable (in both tabs: File and  Multiple File Selection).

Do You know any solution in ERDAS 2015?

Highlighted
Technical Evangelist
Posts: 130
Registered: ‎07-04-2016

Re: convert XYZ data to multiple raster DEMs in batch mode

[ Edited ]

Dear GODGIK_1,

 

Same solution works for IMAGINE 2015. If you can't see your XYZ files, place an asterisk (*) in File name row. Click Enter.

 

2017-08-21 10_32_27-Select Batch Files.png

 

Then select XYZ files you want to process. 

 

2017-08-21 10_33_35-Select Batch Files.png

 

The selection pattern on Multiple File Selection tab you need to specify manually (e.g. D:/*.xyz). 

 

2017-08-21 10_34_12-Select Batch Files.png

 

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
New Contributor
Posts: 3
Registered: ‎08-21-2017

Re: convert XYZ data to multiple raster DEMs in batch mode

Thank You for reply @mvardovs

I have one more question:

How should I prepare batch file if I want to convert XYZ files (for example 1.xyz, 2.xyz, 3.xyz) to raster ( respectively convert_1.img, convert_2.img, convert_3.img) ?

Technical Evangelist
Posts: 130
Registered: ‎07-04-2016

Re: convert XYZ data to multiple raster DEMs in batch mode

Hello CODGIK_1,

 

In the batch file I've created there is a line for Output1 variable. $(Input1.pathright) $(Input1.root)_convert.img part will do the automatic naming for the output IMG file. If you have 1.xyz, so in an example provided the output IMG file will be 1_convert.img . If you want to change it to convert_1.img, so you should place "convert_" at the beginning. See below:

 

/*

** IMAGINE Version 16.0 Batch Commands File

*/

variable Input1 User;

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

 

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

 

 

Note: I've removed $(Input1.pathright) here just in case if you would want to open XYZ files from different directories. (there is also an article for this issue Incorrect Output Paths)

 

 

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
New Contributor
Posts: 3
Registered: ‎08-21-2017

Re: convert XYZ data to multiple raster DEMs in batch mode

Hello @mvardovs

Thanks for reply.

 

I have last question:

I prepare surface using Terrain Prep Tool. I add *.xyz file, next Process-->Surface-->Rasterization

I sign Output DEM, set cell size (1m) and I click Cancel button in the Surface DTM dialog.

I save Terrain Prep Tool project file (*.dfp).

I prepare Batch Command file (*.bcf):

/*
** IMAGINE Version 15.0 Batch Commands File
*/
variable Input1 User;
variable Output1 Auto "e:/temp/wynik/convert_$(Input1.root).img" Delete_Before;
dtmmergeprocess -single e:/temp/tptp.dfp '$(Input1)' '$(Output1)' -temp temp 0 -meter 'Terrain Processing'

 

 

I load the Batch Command File (*.bcf) in the Batch Command Editor.

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

 

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

I create a Batch List file(*.bls):

Input1 Output1

d:/temp2/test.xyz ""

d:/temp2/testv2014.xyz ""

 

I click the Run Now button to begin the batch process, but it does not work, what can be wrong?