X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



4265 Rate this article:
No rating

ENVI 5.4: ENVITASK schema change

If you had a task with ENVI 5.3.1 and you try to run it with ENVI 5.4, you encounter the following error message:

Error: ENVITASK: Invalid task definition: Task template missing required "schema" attribute

The reason this error is occurring is because the schema was changed between ENVI 5.3.1 and ENVI 5.4. To fix this issue, you need to add a line that says "version":"5.3" to the ".task" file associated with the older tasks. The reason you need to add '"version":"5.3"' to the task file is to tell ENVI 5.4 that this is a task is going to use ENVI 5.3 syntax.  

For example, the ".task" file below would work with ENVI 5.3.1: 

{
  "name": "BandMathExample",
  "baseClass": "ENVITaskFromProcedure",
  "routine": "bandmathexample",
  "displayName": "ENVI Band Math Example",
  "description": "This is an example of a custom task that performs band math on two rasters.",
  "parameters":[
    {
      "name": "INPUT_RASTER1",
      "displayName": "Input Raster 1",
      "dataType": "ENVIRASTER",
      "direction": "input",
      "parameterType": "required",
      "description": "Specify the first raster on which to perform band math. This raster is used to determine data type on output."
    },
    {
      "name": "INPUT_RASTER2",
      "displayName": "Input Raster 2",
      "dataType": "ENVIRASTER",
      "direction": "input",
      "parameterType": "required",
      "description": "Specify a second raster on which to perform band math."
    },
    {
      "name": "OUTPUT_RASTER",
      "displayName": "Output Raster",
      "dataType": "ENVIRASTER",
      "direction": "output",
      "parameterType": "required",
      "description": "This is a reference to the output raster of filetype ENVI."
    }
  ]
}

 


To get the ".task" file to work with ENVI 5.4, the file would need to be changed to the following:


{

  "name": "BandMathExample",
  "version":"5.3",
  "baseClass": "ENVITaskFromProcedure",
  "routine": "bandmathexample",
  "displayName": "ENVI Band Math Example",
  "description": "This is an example of a custom task that performs band math on two rasters.",
  "parameters":[
    {
      "name": "INPUT_RASTER1",
      "displayName": "Input Raster 1",
      "dataType": "ENVIRASTER",
      "direction": "input",
      "parameterType": "required",
      "description": "Specify the first raster on which to perform band math. This raster is used to determine data type on output."
    },
    {
      "name": "INPUT_RASTER2",
      "displayName": "Input Raster 2",
      "dataType": "ENVIRASTER",
      "direction": "input",
      "parameterType": "required",
      "description": "Specify a second raster on which to perform band math."
    },
    {
      "name": "OUTPUT_RASTER",
      "displayName": "Output Raster",
      "dataType": "ENVIRASTER",
      "direction": "output",
      "parameterType": "required",
      "description": "This is a reference to the output raster of filetype ENVI."
    }
  ]
 }




Written by DS 12/5/2016 Reviewed by MM

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »