set map information ERROR, help ,please [message #64965] |
Mon, 02 February 2009 08:24 |
Hu
Messages: 35 Registered: January 2009
|
Member |
|
|
Hi, there
I have got a 2-D array (eg. image[4000,4000] ), the data type is
float, this array could be visuaized by ENVI / open image files, but
there is no map information in "avaiblae bands list". So I want to set
some kinds of map projection information to this dataset, for example
Albers Conical Equal Area map projection,the central point would be N
20, W 35.
after I use these functions to add projection information (included in
a Header file) to a disk file, I can not load the disk file in ENVI
(from available bands list), the error information is "the array has
too many elements" and when I check the cursor location / value, I
found that the value is not the content of the array. I suppose the
value is DN but not the VALUE of the image(array). But I can check the
dataset array by using HDF Explorer, can someone tell me the reason?
;;;ps: the code I use to add map projection information is:
;----------code begin
ENVI_OPEN_FILE,'E:\My Documents\Data\test
\ia07nass_cdl_reSize_231_resample',R_FID=cdlFID
PROJ_STRUCTURE = ENVI_GET_PROJECTION(FID=cdlFID)
MC=[0.0,0.0,-7783644.6621,4846534.2049]
PROJ=PROJ_STRUCTURE
PS=[231.65671784,231.65671784]
ROTATION=0.0
UNITS=ENVI_TRANSLATE_PROJECTION_UNITS('Meters')
MAP_INFO_STRUCTURE=ENVI_MAP_INFO_CREATE
(MC=MC,PROJ=PROJ,PS=PS,ROTATION=ROTATION,UNITS=UNITS)
ENVI_SETUP_HEAD,DATA_TYPE=4,FNAME=FILE_PATH_1+'NDVIFILE_'+DA TE[i]
+'.HDF',INTERLEAVE=0,NB=1,NL=1511,NS=2302,OFFSET=0,MAP_INFO= MAP_INFO_STRUCTURE,
/write,/open
;;;-------code end
Thank you
|
|
|