The geographic corners (or the Extents as they are called in the metadata) are derived from the image spatial reference. You can also derive them from accessing the pixel locations and converting them to map coordinates. For example:
e = envi()
f =FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, SUBDIRECTORY = ['data'])
raster = e.openraster(f)
raster.spatialref.convertfiletomap, [0,0,raster.nsamples,raster.nsamples],[0,raster.nlines,0,raster.nlines], mapx, mapy
You could also use a task to do this:
e = envi()
f = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, SUBDIRECTORY= ['data'])
raster = e.openraster(f)
task = ENVITask('ConvertPixelToMapCoordinates')
task.SPATIAL_REFERENCE = raster.SpatialRef
task.INPUT_COORDINATE = [[0, 0], $
[0, raster.NROWS], $
[raster.NCOLUMNS, raster.NROWS], $
[raster.NCOLUMNS, 0]]
task.Execute
print, task.OUTPUT_COORDINATE
|