I was able to find a way to do this (open and georeference) with separate files for VIIRS. Consider the example code below for two H5 files: ----------------------------------------- ; open image data file=’SVI01_npp_d20170807_t1931133_e1943460_b00001_c20170807204544199000_ipop_dev.h5’ raster_rad=e.openraster(file, DATASET_NAME='/All_Data/VIIRS-I1-SDR_All/Radiance') raster_rad=e.openraster(file, DATASET_NAME='/All_Data/VIIRS-I1-SDR_All/Reflectance') ;Open geometry raster that holds the x/y information: Loc = ‘GIMGO_npp_d20170807_t1931133_e1943460_b00001_c20170807204544199000_ipop_dev.h5' lat = e.OpenRaster(Loc, DATASET_NAME='/All_Data/VIIRS-IMG-GEO_All/Latitude') lon = e.OpenRaster(Loc, DATASET_NAME='/All_Data/VIIRS-IMG-GEO_All/Longitude') ; Get the reprojection task from the catalog of ENVITasks Task = ENVITask('ReprojectGLT') ; Define inputs Task.Input_Raster = raster_rad Task.Latitude_Raster = lat Task.Longitude_Raster = lon ; Define output raster URI Task.Output_Raster_URI = ‘radiance_geog.dat' ; Run the task Task.Execute ------------------------------------------- I also found in my notes that sometimes the lat/lon bands have 'background' values of -999.3. In that case, it can cause issues with reprojection, so I would open them with the data ignore value (div): lat = e.OpenRaster(Loc, DATASET_NAME='/All_Data/VIIRS-IMG-GEO_All/Latitude', DATA_IGNORE_VALUE=-999.3d) lon = e.OpenRaster(Loc, DATASET_NAME='/All_Data/VIIRS-IMG-GEO_All/Longitude', DATA_IGNORE_VALUE=-999.3d) If you want to open more than just the data bands, you can also use the 'Template' open to OpenRaster. When you open your first data set and select all the bands of interest, you can use the 'Save Template' in the dialog. Then when opening similar files, use OpenRaster with template=myDataTemplate.
|