X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Feb 2015 07:43 AM by  anon
Output to external format ...not closing result
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
16 Feb 2015 07:43 AM
    Dear all, I seem to have a really minor issue but can't figure out how to solve it. In some codes, I am using envi_output_to_external_format, i.e. as below. The problem is, I cannot really close the output file in Envi. This is not so bad in the classic version where it only appears in the available bands list but in the new version the image is also shown in Envi which is why I am running out of memory for bigger batch processes using the new version. Can anyone tell me how to close the output files properly or how to prevent it from opening? ENVI_OUTPUT_TO_EXTERNAL_FORMAT,fid=file_fid, dims=dims_out, out_name=outname, out_bname=bnames, pos=pos, /ENVI ENVI_FILE_MNG, id=file_fid, /REMOVE Cheers and thanks in advance, Kim

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    17 Feb 2015 06:50 AM
    ENVI_FILE_MNG closes files in ENVI Classic. If you are using ENVI and the new API, ENVIRaster has a CLOSE method that can be used. If you are processing using ENVI Classic routines, then you need to do an ENVIFidToRaster to get the raster object to close.

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Feb 2015 02:22 AM
    I do not see how this will work. Isn't it the same as envi_get_data in classic mode? However, the problem with envi_output_to_external_format is that it does not return an r_fid. Thus, I can neither use envi_file_mng nor envifidtoraster on the output or am I wrong?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    18 Feb 2015 10:47 AM
    If it is opening the file after you create it using ENVI_OUTPUT_TO_EXTERNAL_FORMAT (and it only does this for output to ENVI format), then there is a new FID for this file. Try using ENVI_GET_FILE_IDS to find the open FIDs and ENVI_FILE_MNG to remove them. I found this also removed them from ENVI's Data Manager as well as the ABL.

    Deleted User



    New Member


    Posts:
    New Member


    --
    19 Feb 2015 01:57 AM
    Thanks a lot! I did not know envi_get_file_ids but it does the job ...though memory files are still open in the data manager. At least, this does not overflow my working memory anymore.
    You are not authorized to post a reply.