X

NV5 Geospatial Blog

Each month, NV5 Geospatial posts new blog content across a variety of categories. Browse our latest posts below to learn about important geospatial information or use the search bar to find a specific topic or author. Stay informed of the latest blog posts, events, and technologies by joining our email list!



Deploy, Share, Repeat: AI Meets the Analytics Repository

Deploy, Share, Repeat: AI Meets the Analytics Repository

10/13/2025

The upcoming release of ENVI® Deep Learning 4.0 makes it easier than ever to import, deploy, and share AI models, including industry-standard ONNX models, using the integrated Analytics Repository. Whether you're building deep learning models in PyTorch, TensorFlow, or using ENVI’s native model creation tools, ENVI... Read More >

Blazing a trail: SaraniaSat-led Team Shapes the Future of Space-Based Analytics

Blazing a trail: SaraniaSat-led Team Shapes the Future of Space-Based Analytics

10/13/2025

On July 24, 2025, a unique international partnership of SaraniaSat, NV5 Geospatial Software, BruhnBruhn Innovation (BBI), Netnod, and Hewlett Packard Enterprise (HPE) achieved something unprecedented: a true demonstration of cloud-native computing onboard the International Space Station (ISS) (Fig. 1). Figure 1. Hewlett... Read More >

NV5 at ESA’s Living Planet Symposium 2025

NV5 at ESA’s Living Planet Symposium 2025

9/16/2025

We recently presented three cutting-edge research posters at the ESA Living Planet Symposium 2025 in Vienna, showcasing how NV5 technology and the ENVI® Ecosystem support innovation across ocean monitoring, mineral exploration, and disaster management. Explore each topic below and access the full posters to learn... Read More >

Monitor, Measure & Mitigate: Integrated Solutions for Geohazard Risk

Monitor, Measure & Mitigate: Integrated Solutions for Geohazard Risk

9/8/2025

Geohazards such as slope instability, erosion, settlement, or seepage pose ongoing risks to critical infrastructure. Roads, railways, pipelines, and utility corridors are especially vulnerable to these natural and human-influenced processes, which can evolve silently until sudden failure occurs. Traditional ground surveys provide only periodic... Read More >

Geo Sessions 2025: Geospatial Vision Beyond the Map

Geo Sessions 2025: Geospatial Vision Beyond the Map

8/5/2025

Lidar, SAR, and Spectral: Geospatial Innovation on the Horizon Last year, Geo Sessions brought together over 5,300 registrants from 159 countries, with attendees representing education, government agencies, consulting, and top geospatial companies like Esri, NOAA, Airbus, Planet, and USGS. At this year's Geo Sessions, NV5 is... Read More >

1345678910Last
«October 2025»
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
15823 Rate this article:
5.0

Batch processing with IDL

Anonym

Following the theme of Mike Galloy's post, I'd like to show an example of noninteractive batch processing with IDL. The example below uses Linux and bash, though I used to do similar things on Solaris (and SunOS before that!) with tcsh, so it should work with slight modifications on other UNIX-based operating systems and command shells. I'll start with my canonical bash statement:

$ nohup nice $IDL_DIR/bin/idl < in.pro > out.txt 2> err.txt &

The first two commands are optional: nohup allows a process to continue even if you've started it on a remote server then disconnected from it, while nice decrements the priority of the process (to be "nice" to other users), thus preventing the process from grabbing all the CPU time on the machine. Because nohup and nice don't recognize aliases, I directly call the IDL executive script in the bin/ directory of the IDL distribution. If you don't use nohup and nice, you can invoke IDL with the standard "idl" alias instead. The character "<" redirects stdin, the contents of the file in.pro, to IDL; the character ">" redirects stdout to the file out.txt. Console and error messages are redirected with "2>" to err.txt. The ampersand "&" backgrounds the process, allowing interactive shell access. Some detail is wrapped up in the file in.pro. It's an IDL batch file, which consists of single IDL statements, no loops (though there is a trick to get around this). A batch file is not a program—it cannot be compiled. Rather, each statement in the file is interpreted and executed sequentially by IDL. Here's in.pro:

print, 'Job started'
n = 100
task1, n
;task2
;task3
print, 'Job complete'

Note there is no END statement. The job of in.pro is to line up the tasks I want to execute; here, I've called them TASK1, TASK2, etc., each of which is an IDL program (I've chosen to use procedures to represent the tasks, but any program type will work). In this example, I'll execute a single task:

pro task1, n
   compile_opt idl2

   if n eq !null then n = 100

   x = findgen(n)
   p = plot(x, /buffer, title='Plot #000')
   p.save, 'plot000.png', resolution=96

   for i=1, n-1 do begin
      si = string(i, format='(i3.3)')
      p.title = 'Plot #' + si
      p.setdata, x + i
      p.save, 'plot' + si + '.png', resolution=96
   endfor

   p.close
end

TASK1 generates a series of N plots in an offscreen buffer, saving each plot, in turn, to a PNG file. It also serves as a simple example of batching with (New) Graphics—note the use of the SetData method to replace the plot data in each iteration. After executing the bash statement above, here's the contents of out.txt:

$ cat out.txt
Job started
Job complete

and err.txt:

$ cat err.txt
IDL Version 8.2.1 (linux x86_64 m64). (c) 2012, Exelis Visual Information Solutions, Inc.
Trial version expires on 30-sep-2013.
Licensed for personal use by ITTVISEvaluation Purposes Only only.
All other use is strictly prohibited.

% Compiled module: TASK1.
% Loaded DLM: PNG.

and a (truncated) directory listing:

$ ls | head
err.txt
in.pro
out.txt
plot000.png
plot001.png
plot002.png
plot003.png
plot004.png
plot005.png
plot006.png

Success! I've shown here a simple example of batch processing with IDL. Each step of the technique I've outlined above can have added complexity, which I hope to elaborate on in future posts. I hope you find this example useful, at least as a starting point.

Please login or register to post comments.