I have a set of ~20 hyperspectral rasters I would like to subset to a region. I am trying to get the grid definition for each raster to I can see which raster overlaps with other rasters. However, under the spatial reference data for each raster, the rotation is set to -1 except for a single raster that has a rotation of -88. How to I add in the rotation information to the grid definiton to account for this rotation? Below is my current code.
function gridDefinitionFromRaster, oRaster_init
compile_opt idl2
oRaster = oRaster_init.SPATIALREF.dehydrate()
;oRasterCoordSys = ENVICoordSys(COORD_SYS_STR=oRaster.SPATIALREF.COORD_SYS_STR)
oRasterCoordSys = ENVICoordSys(COORD_SYS_STR=oRaster['COORD_SYS_STR'])
gridDefinition = ENVIGridDefinition(oRasterCoordSys, $
PIXEL_SIZE=oRaster['PIXEL_SIZE'], $
NROWS=oRaster_init.NROWS, $
;ROTATION=oRaster['rotation'],$
NCOLUMNS=oRaster_init.NCOLUMNS, $
TIE_POINT_MAP=oRaster['TIE_POINT_MAP'], $
TIE_POINT_PIXEL=oRaster['TIE_POINT_PIXEL'])
return, gridDefinition
end
|