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

Home » Public Forums » archive » Re: problems with EOS_GD_EXTRACTREGION
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problems with EOS_GD_EXTRACTREGION [message #72346] Fri, 27 August 2010 11:54
Snow53 is currently offline  Snow53
Messages: 32
Registered: July 2010
Member
On Aug 27, 12:44 pm, Snow53 <jennifer_wa...@hotmail.com> wrote:
> 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

Hmmm... looks like my values for eos_gd_defboxregion needed to be in
lat/long units. I've corrected this, but my "crashing" hasn't stopped.
I still need to figure out why this happens.
[Message index]
 
Read Message
Previous Topic: problems with EOS_GD_EXTRACTREGION
Next Topic: Re: Constrained fit of a straight line: fixed intercept

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

Current Time: Fri Oct 10 07:15:09 PDT 2025

Total time taken to generate the page: 1.04232 seconds