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!



Easily Share Workflows With the Analytics Repository

Easily Share Workflows With the Analytics Repository

10/27/2025

With the recent release of ENVI® 6.2 and the Analytics Repository, it’s now easier than ever to create and share image processing workflows across your organization. With that in mind, we wrote this blog to: Introduce the Analytics Repository Describe how you can use ENVI’s interactive workflows to... Read More >

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 >

1345678910Last
«November 2025»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
13429 Rate this article:
No rating

ENVITask: The New ENVI 5.1 Analytics API

Anonym

ENVI 5.1 introduced a new ENVITask API for processing your data. We developed this new API with the information on how to use it built into the API and validation as you go. The first step is to query the system to learn what ENVITasks are available for you to use. This is available as the new TASK_NAMES property on the ENVI object:

IDL> nv = ENVI()
ENVI> PRINT, nv.TASK_NAMES
QUAC RPCOrthorectification RadiometricCalibration ReprojectGLT

 Once you have the task name you want, you create it using the new enviTask() function.

ENVI> oTask = ENVITask('RadiometricCalibration')
ENVI> help, oTask
oTASK          ENVIRADIOMETRICCALIBRATIONTASK <196531>

 Now that you have the task, you might be wondering how to use it. You can programmatically get information about individual parameters. You can get the list of parameters from the ParameterNames() function ,and can get a reference to one of the ENVITaskParameter objects by passing its name into the Parameter() function:

ENVI> print, oTask.ParameterNames()
CALIBRATION_TYPE INPUT_RASTEROUTPUT_DATA_TYPE OUTPUT_RASTER OUTPUT_RASTER_URI SCALE_FACTOR

ENVI> oParam = oTask.Parameter('input_raster')
ENVI> print, oParam
ENVITASKPARAMETER <196676>
CHOICE_LIST               = !NULL
DEFAULT                   = !NULL
DESCRIPTION               ='Specify an ENVIRaster object on which to perform radiometric calibration'
DIRECTION                 = 'IN'
NAME                      ='INPUT_RASTER'
REQUIRED                  = 1
TYPE                      ='ENVIRASTER'
VALUE                     = !NULL

As you can see from the print output, we give you all the information you need to construct a variable to pass in as each parameter’svalue. Aside from the parameter’s name, you get a human readable description of it, plus its IDL type, whether it is aninput or output parameter, if it’s required or optional, and its current value. Some parameters will have a default value already set for you, and some will have defined an array of allowed values in the CHOICE_LIST property. If you print on the ENVITask, you’ll get output like the above about all the parameters it owns. You don’t have to request each parameter by name to get or set its VALUE property, you can retrieve or set the values:

ENVI> print, oTask.Scale_Factor
       1.0000000000000000
ENVI> oTask.Scale_Factor= 3.0

Each time you set a parameter value, it is validated. Any values that can’t be converted to the required type or don’t match the CHOICE_LIST, if it’s defined, will give you immediate feedback so you can fix them now instead of waiting for their use halfway through a lengthy calculation. Once you’ve set all your input parameters, you call the ENVITask::Execute method to run the algorithm. Here is an example that loads a user selected raster and calibrates it to a percent reflectivity, and then loads the resulting output in a raster layer:

; load the raster
nv = ENVI()
inputFile = Dialog_Pickfile(TITLE='Select a file to calibrate')
oRaster = nv.OpenRaster(inputFile)
; load the enviTask
oTask = enviTask('RadiometricCalibration')
; Set parameters
oTask.INPUT_RASTER = oRaster
oTask.CALIBRATION_TYPE = 1 ; TOA Reflectance
oTask.SCALE_FACTOR = 100
oTask.OUTPUT_DATA_TYPE = 12 ; UInt
; run the task
oTask.Execute
; load output into layer
oView = nv.GetView()
oLayer = oView.CreateLayer(oTask.Output_Raster)

This example is a little contrived, but shows how you can easily use ENVITasks for bulk batch processing of entire collections ofdata. You don’t have to open each raster in ENVI and use the Radiometric Calibration toolbox item UI anymore, you can use FILE_SEARCH and do a FOR loop over each file in a given directory. One thing to note is that this example did not use the OUTPUT_RASTER_URI parameter at all. The ENVITasks are defined using a convention where each ENVIRaster output parameter is coupled with an input parameter, which has the same name with ‘_URI’ appended. This allows the user of the task to specify the output location and filename they want, if they want to keep the output raster. If the input URIparameter is not defined, then ENVITask will generate a temporary file. Furthermore, it will delete the temporary file when ENVI shuts down. This way if you want to chain multiple ENVITasks together you don’t have to worry about cleaning up intermediate products.

In ENVI 5.1 we released just a few ENVITasks, however look for many more ENVITasks in future releases.

Please login or register to post comments.