comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » problems with EOS_GD_EXTRACTREGION
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
problems with EOS_GD_EXTRACTREGION [message #72347] Fri, 27 August 2010 11:44
Snow53 is currently offline  Snow53
Messages: 32
Registered: July 2010
Member
I'm trying to run EOS_GD_EXTRACTREGION and I keep getting a fatal
error warning, and then ENVI/IDL crashes. Yikes! I'm not sure what is
wrong. My results from EOS_GD_CREATE and EOS_GD_DEFBOXREGION are
ok.... Any suggestions?

The code:

pro hdf_eos_extractpix_region


;find all the hdf-eos files in a folder and open for use
path = 'X:\MODIS_GPP\Lena\2006\test'
file_array=file_search(path, '*.hdf', count=num_file)
file=file_array

print, num_file
print, file

for i=0, num_file-1 do begin
file_name=file_basename(file[i], '.hdf')
;print, file_name

fid=EOS_GD_OPEN(file[i], /READ)
;print, fid


result=EOS_GD_INQGRID(file[i], gridlist)
;print, gridlist
gridname=gridlist
;print, gridname

out=EOS_GD_ATTACH(fid, gridname)
;print, fid
;print, gridname

;extract data based on a region within the image

uplft=[4390,846]
lowrgt=[4392,848]
gridid=EOS_GD_CREATE(fid, 'regionbuffer', 3, 3, uplft, lowrgt)
print, gridid

cornerlon=[127.250167, 127.268185]
cornerlat=[72.39189, 72.373873]
regionid=EOS_GD_DEFBOXREGION(gridid, cornerlon, cornerlat)
print, regionid

result1=EOS_GD_EXTRACTREGION(gridid, regionid, 'MODIS Gridded 1KM 8-
day Composite GPP', buffer22)
print, buffer22


output=EOS_GD_DETACH(fid)
status=EOS_GD_CLOSE(fid)
endfor

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Asynchronous IDL_IDLBridge causing memory leak
Next Topic: Re: problems with EOS_GD_EXTRACTREGION

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:33:28 PDT 2025

Total time taken to generate the page: 0.00472 seconds