I'm trying to script some ENVI behavior using the IDL/ENVI command line tools on IDL Version 8.5.1 (linux x86_64 m64). However, I'm running into some problems that I think are bugs.
I'm using the ENVI GLT and GeoRef tools like such from the IDL/ENVI Command line with the following code extracted from my scripts:
e = ENVI(/HEADLESS)
geo_raster = e.OpenRaster("/path/to/2016-01-26.210054.HonorRancho.Line1-Run1-Segment01-110000-geo.dat")
geo_fid = ENVIRasterToFID(geo_raster)
ENVI_DOIT, 'ENVI_GLT_DOIT', DIMS=dims, /IN_MEMORY, I_PROJ=ENVI_PROJ_CREATE(/geographic), O_PROJ=ENVI_PROJ_CREATE(/geographic, datum='WGS-84', units=envi_translate_projection_units('Meters')), R_FID=glt_fid, ROTATION=0, X_FID=geo_fid, X_POS=1, Y_FID=geo_fid,Y_POS=0
data_raster_file_1 = e.OpenRaster("/path/to/L3_CMF2_Layers_Source_Data/2016-01-26.210054.HonorRancho.Line1-Run1-Segment01.L3-CMF2-L1Background.dat")
data_fid_file_1 = ENVIRasterToFID(data_raster_file_1)
ENVI_DOIT, 'ENVI_GEOREF_FROM_GLT_DOIT', FID=data_fid_file_1 , GLT_FID=glt_fid, /IN_MEMORY, POS=[0,1,2], R_FID=georef_fid_file_1
georef_raster_file_1 = ENVIFIDToRaster(georef_fid_file_1)
e.ExportRaster, georef_raster_file_1, '/path/to/L3_CMF2_Layers_Source_Data/2016-01-26.210054.HonorRancho.Line1-Run1-Segment01.L3-CMF2-L1Background.geo.tiff', 'TIFF'
data_raster_file_2 = e.OpenRaster("/path/to/L3_CMF2_Layers_Source_Data/2016-01-26.210054.HonorRancho.Line1-Run1-Segment01.L3-CMF2-NH3NoBack.dat")
data_fid_file_2 = ENVIRasterToFID(data_raster_file_2)
ENVI_DOIT, 'ENVI_GEOREF_FROM_GLT_DOIT', FID=data_fid_file_2 , GLT_FID=glt_fid, /IN_MEMORY, POS=[0,1,2], R_FID=georef_fid_file_2
georef_raster_file_2 = ENVIFIDToRaster(georef_fid_file_2)
e.ExportRaster, georef_raster_file_2, '/path/to/L3_CMF2_Layers_Source_Data/2016-01-26.210054.HonorRancho.Line1-Run1-Segment01.L3-CMF2-NH3NoBack.geo.tiff', 'TIFF'
What happens here is that the exported TIFF files (and the georef_raster_file_1 & 2) come out identical even though their source data is completely different (the first file just gets copied to the raster for the second). If I quit IDL between processing file_1 and file_2 (and load the GLT in place after relaunching) everything works correctly so it's not an issue with my code.
So, questions:
Is there some way I can remove a raster and file id from ENVI's memory space via the CLI? (I can't seem to find any documentation of such a command.) Perhaps this could be a way to work around the bug
Do I need to do anythign else to report this bug?
|