Re: How to spatial subset files by ENVI vector file (EVF) or other shapefile ? [message #57583] |
Mon, 17 December 2007 06:01 |
wita
Messages: 43 Registered: January 2005
|
Member |
|
|
On Dec 17, 1:58 pm, Lucia <lucia...@gmail.com> wrote:
> I can spatial subset files by EVF in ENVI, but I need to do it by IDL.
Dear Lucia,
I have never tested this, but it seems to me that you need to use
ENVI_GET_ROI_DIMS_PTR to get the dimensions pointer for the ROI.
So you basically carry out the following steps:
roi_ids = envi_get_roi_ids(fid = fid)
dims = [envi_get_roi_dims_ptr(roi_ids[0]), 0, 0, 0, 0]
data = envi_get_data(fid=fid, dims=dims)
then you can write the data to a file and set up an ENVI header file
for it. I haven't figured out how to find the map coordinates for the
selected subset but I guess the ENVI manual will give a clue
somewhere.
with best regards,
Allard
|
|
|
|