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!



New ENVI Agent, IDL Agent, and GeoAgent Quick Guides

New ENVI Agent, IDL Agent, and GeoAgent Quick Guides

6/9/2026

The recent release of ENVI® Agent, IDL® Agent, and GeoAgent™ revolutionize how users interact with geospatial software. These agentic AI applications act as partners to plan, simplify, and execute complex workflows. Knowing where to start can be challenging for new users. To this end, we developed three new quick guides to... Read More >

Introducing NISAR Data Support

Introducing NISAR Data Support

6/5/2026

The release of ENVI® SARscape 6.3 in April 2026 includes preliminary support for NASA-ISRO SAR (NISAR) data. The NISAR mission is a joint Earth-observing satellite project between NASA and the Indian Space Research Organization designed to monitor changes in the planet’s land and ice surfaces using advanced radar imaging. It... Read More >

Monitoring Illegal Mining in the Amazon: Turning Persistent Data Into Actionable Insight

Monitoring Illegal Mining in the Amazon: Turning Persistent Data Into Actionable Insight

5/28/2026

Illegal mining over decades has constituted one of the most persistent and complex socio-environmental problems in the Brazilian Amazon. In recent years, with the increasingly intensive use of mechanized extraction, the associated environmental impacts—such as deforestation, intense soil disturbance, river siltation, and mercury... Read More >

From Answers to Action: Why ENVI and IDL Agents Go Beyond General AI

From Answers to Action: Why ENVI and IDL Agents Go Beyond General AI

4/20/2026

As generative AI tools like Claude and Gemini continue to gain traction, many organizations are asking the same question: Can general purpose AI actually support real geospatial workflows, or does it stop at surface-level answers? That question was front and center in our recent webinar, Meet Your New Partners in Science: ENVI... Read More >

Mapping Earthquake Deformation in Taiwan With ENVI

Mapping Earthquake Deformation in Taiwan With ENVI

12/15/2025

Unlocking Critical Insights With ENVI® Tools Taiwan sits at the junction of major tectonic plates and regularly experiences powerful earthquakes. Understanding how the ground moves during these events is essential for disaster preparedness, public safety, and building community resilience. But traditional approaches like field... Read More >

1345678910Last
«June 2026»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011
23764 Rate this article:
4.2

IDL 8.4 - Sliced bread, step aside

Jim Pendleton

For my money, there have been a handful of IDL releases that have had the greatest impact on my ability to produce efficient and flexible applications in my professional life, both in my 18+ years in the Custom Solutions Group and in my earlier incarnations as a science data analyst for various research projects.

  • Version 1:  "You mean I don't have to spend hours writing Tektronix PLOT-10 FORTRAN programs to see my data?"  My remaining undergrad years flew by after that.
  • Version 3.6: Cross-platform widget support and a GUI-oriented development environment
  • Version 5.0. Object Graphics and object-oriented language syntax
  • Version 6.4. The last of the releases largely shepherded by Ali Bahrami, former IDL product architect, provided much of the infrastructure for TCP/IP client and server applications we rely on.

IDL 8.4 has the potential to have a similar level of positive influence on the way I write code.  In particular the addition of built-in variable attributes and static methods will at the very least reduce the amount of code needed to perform the functionality I use regularly in IDL through functions such as SIZE, STRTRIM, and N_ELEMENTS.

 

Using other programming languages such as Python as a pattern, IDL_Variable types have been extended to have object-like behavior when certain syntax is encountered by the interpreter at run-time.

 

Some static methods and attributes act as more compact means to access existing functionality.  Some of these also offer improved performance relative to their procedural counterparts.

 

Others represent brand-new functionality that in previous releases required multiple IDL statements.  Don't overlook this wide selection of new static methods that expand functionality. For example, there's a very useful new static substitution method on string variables, ".Replace".

 

Though it's not called out explicitly, you can add your own static methods as well.

 

For example, to serialize an IDL variable's contents for transmission via HTTP, for example in an ENVI Services Engine task request parameter, we might compress the data and convert to a Base-64 encoding.


FUNCTION IDL_Variable::jp_Serialize, s
   COMPILE_OPT STATIC
   RETURN, IDL_Base64(ZLib_Compress(s))
END

 

IDL> b = BINDGEN(5,5)
IDL> r = b.jp_Serialize()
IDL> r
eJxiYGRiZmFlY+fg5OLm4eXjFxAUEhYRFROXAAAAAP//AwAKQQEt

 

In order to reconstruct the variable on the receiving end, the client will need the ASCII stream along with the data type code and the dimensions.  The latter two items can be retrieved via the variable attributes ".Typecode" and ".Dim".

 

IDL> b.typecode, b.dim
           1
           5           5

 

The deserialization static method is simply the inverse operation.

 

FUNCTION IDL_Variable::jp_Deserialize, s, TYPE=type, DIMENSIONS=dims
    COMPILE_OPT STATIC
    RETURN, ZLIB_Uncompress(IDL_Base64(s), TYPE=type, DIMENSIONS=dims)
END

 

IDL> r.jp_Deserialize(TYPE=1,DIMENSIONS=[5,5])
   0   1   2   3   4
   5   6   7   8   9
  10  11  12  13  14
  15  16  17  18  19
  20  21  22  23  24

 

For future compatibility it's important to provide a namespace for your IDL_Variable class extensions that have little potential to conflict with possible extensions by the IDL engineering team in the future.  In this example, I'm using a "jp_" prefix.

 

Given that the IDL_Variable class does not extend objects or structures, how would you consider implementing a serialization/deserialization mechanism for those data types?  For named structures and objects, it's entirely possible via proxy static class methods and temporary SAVE files.  This is an exercise left for the reader.  Or a topic for a future blog post!

Please login or register to post comments.