X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Feb 2014 12:03 PM by  anon
FILEPATH??
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
27 Feb 2014 12:03 PM
    Colleagues, I am doing exactly what I did not want to do today, fighting with ENVI and IDL. I am trying to create a batch file to do orthrectification. My installation path is on Drive C and my data and code are on Drive D, but the FILEPATH examples that are on the website assume that our data is hanging off of some subdirectory of our installation path. I would guess this is not the case in the majority of situations. In any case, the first line of my code, the online program suggests a call to FILEPATH.I have set the working directectory to: D:\NASA_LCLUC\Data\RS Images\ds, and I have done the ENVI> cd, current=current and print, current and it recognizes the correct folder. However, Now I have the following in the front of my pro file: Imagefile = FILEPATH('D:\NASA_LCLUC\Data\RS Images\ds\po_1413262_pan_0000000.tif', ROOT_DIR=e.ROOT_DIR, $ SUBDIRECTORY = ['']) Raster = e.OpenRaster(ImageFile) with the assumption that this is sufficent to open the file, but each time it balks and tells me it cannot find the data. In Variables, it has glued the Drive C installation path on to the front of my data path. For example in Variables for variable IMAGEFILE it now says: 'C:\\Program Files\\Exelis\\envi50\\D:\\NASA_LCLUC\\Data\\RS Images\\ds\\po_14132'... Please, how can I get this to stop? Please help. Thanks. Peter

    Berangere Casson



    New Member


    Posts:61
    New Member


    --
    28 Feb 2014 02:02 AM
    FILEPATH is a routine to automatically create a path based on directory names. If you want to hardly code the path to your file using a string you can directly use the following commands (without FILEPATH): Imagefile = 'D:\NASA_LCLUC\Data\RS Images\ds\po_1413262_pan_0000000.tif' Raster = e.OpenRaster(ImageFile)

    Deleted User



    New Member


    Posts:
    New Member


    --
    04 Mar 2014 06:32 AM
    Thanks so much!
    You are not authorized to post a reply.