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.



161 Rate this article:
No rating

Recommendations to configure and use envipyengine on Linux

This article lists some recommendations to configure and run ENVI Tasks or SARscape Tasks using envipyengine on Linux flavors.

Instructions to use envipyengine on Windows can be found in the link below. they need to be executed in a Python prompt:

https://envi-py-engine.readthedocs.io/en/latest/envipyengine_api.html#

 

  • Make sure envipyengine is installed with the version of Python you are using. In this example version 3.10 of Python is used and started using python3 alias
python3 -m pip list  

should output a line including envipyengine.

support@Ubuntu22:~$ python3 -m pip list
Package                Version
---------------------- -------------
[...]
duplicity              0.8.21
envipyengine           1.0.9
  • If not use the command below to install envipyengine:
python3 -m pip install envipyengine 
  • If you are using Visual Studio Code configured with Python extensions, it should detect the envipyengine package and should not underline it.

 

 

  • Start a python prompt using your python alias: pyhton3 in this example
support@Ubuntu22:~$ python3
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
  •  Configure envipyengine engine with envitaskengine using the commands below
>>> import envipyengine
>>> import envipyengine.config
>>> envipyengine.config.set('engine','/usr/local/nv5/envi/bin/envitaskengine')

 

 

  • The Engine needs to be defined with an empty string '', instead of  ‘ENVI’ string:
>>> from envipyengine import Engine
>>> envi_engine = Engine ('')

 

  • The following commands should then execute as expected in Python and output the list of available ENVI tasks as well as the parameters of the GaussianStretchRaster task
>>> print(envi_engine.tasks())
>>> task1=envi_engine.task('GaussianStretchRaster')
>>> print(task1.parameters)

 

Output example for the parameters of GaussianStretchRaster task: 

>>> print(task1.parameters) 
[OrderedDict([('ALLOW_NULL', False), ('URI_PARAM', None), ('name', 'INPUT_RASTER'), ('description', 'Specify a raster on which to apply gaussian stretch.'), ('display_name', 'Input Raster'), ('required', True), ('type', 'ENVIRASTER'), ('direction', 'input')]), OrderedDict([('INCLUSIVE_MAX', True), ('INCLUSIVE_MIN', True), ('name', 'MIN'), ('description', 'Specify the minimum value to be considered, also known as the black point. If the array has one value, it applies to all bands, otherwise it must have the same number of elements as the input raster has bands.'), ('display_name', 'Minimum'), ('required', True), ('min', None), ('max', None), ('type', 'DOUBLE'), ('dimensions', '[*]'), ('direction', 'input')]), OrderedDict([('INCLUSIVE_MAX', True), ('INCLUSIVE_MIN', True), ('name', 'MAX'), ('description', 'Specify the maximum value to be considered, also known as the white point. If the array has one value, it applies to all bands, otherwise it must have the same number of elements as the input raster has bands.'), ('display_name', 'Maximum'), ('required', True), ('min', None), ('max', None), ('type', 'DOUBLE'), ('dimensions', '[*]'), ('direction', 'input')]), OrderedDict([('INCLUSIVE_MAX', True), ('INCLUSIVE_MIN', True), ('name', 'STDDEV'), ('description', 'Specify the standard deviation value for the Gaussian function. If the array has one value, it applies to all bands, otherwise it must have the same number of elements as the input raster has bands.'), ('display_name', 'Standard Deviation'), ('required', False), ('min', None), ('max', None), ('type', 'DOUBLE'), ('dimensions', '[*]'), ('direction', 'input'), ('default_value', [0.3])]), OrderedDict([('INCLUSIVE_MAX', True), ('INCLUSIVE_MIN', True), ('name', 'BRIGHTNESS'), ('description', 'Specify an integer value from 0 to 100, indicating the brightness level to display. If the array has one value, it applies to all bands, otherwise it must have the same number of elements as the input raster has bands.'), ('display_name', 'Brightness'), ('required', False), ('min', 0.0), ('max', 100.0), ('type', 'DOUBLE'), ('dimensions', '[*]'), ('direction', 'input')]), OrderedDict([('name', 'OUTPUT_RASTER_URI'), ('description', 'Specify a string with the fully qualified filename and path to export the associated OUTPUT_RASTER. If you set this property to an asterisk symbol (*), the output raster will be virtual and not written to disk. If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.'), ('display_name', 'Output Raster URI'), ('required', False), ('type', 'ENVIVIRTUALIZABLEURI'), ('direction', 'input'), ('fold_case', True), ('auto_extension', '.dat'), ('is_temporary', True), ('is_directory', False)]), OrderedDict([('ALLOW_NULL', False), ('URI_PARAM', 'OUTPUT_RASTER_URI'), ('name', 'OUTPUT_RASTER'), ('description', 'This is a reference to the output raster of filetype ENVI.'), ('display_name', 'Output Raster'), ('required', True), ('type', 'ENVIRASTER'), ('direction', 'output')])] >>>

 

---------------------------

created by BC on 1/9/2025

reviewed by MM on 1/9/2025

 

 

 

 

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 »