X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Jan 2017 09:27 AM by  anon
From ESRI Shape file to envi classic file.roi
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
12 Jan 2017 09:27 AM
    Hi all, i know that with the following steps i can transform a shapefile into a file.roi: Open the shapefile Open the raster file Open the ROI tool Import the vector and then chose "Unique records of an attribute to separate ROIs Select the Attribute The ROIS are now imported Open ROI tool Export as "classic roi" My question is: how make the same thing using ENVI api and IDL function?

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Jan 2017 09:54 AM
    I solved with the following workflow: open vector use VectorAttributeToROIs to produce a roiFile.xml open the roiFile.xml ---> rois = e.OpenRoi(xmlFile) open raster use the command: my_raster.ExportRois, fileroi, rois, 'Classic' I am discovering the potential of ENVI+IDL. Two more questions: Is it possible from IDL command line executing both ENVI and ENVI classic metods? Can every command (that correctly works if launched from idl command) be execute using the idlpy library with the sintax IDL.run('instruction')?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    12 Jan 2017 01:16 PM
    1. Yes, you can use both classic and new API calls. You will need to initialize the appropriate batch mode for each when running in IDL-only (headless). For example: ENVI new API: e=envi(/headless) Classic: envi, /restore_base_save_files envi_batch_init envi_batch_exit 2. As far as know you should be able run pretty much same commands using the RUN method and directly calling the IDL routines from the IDL object. If you do experience inconsistencies please let us know.
    You are not authorized to post a reply.