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

Home » Public Forums » archive » eos_gd_getpixvalues() and eos_gd_* generally
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
eos_gd_getpixvalues() and eos_gd_* generally [message #49927] Mon, 28 August 2006 19:38
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
Hi Knowledgeable People,

1) I am working with specific files, namely HDF_EOS granules of the
level 3 MOD43 MODIS albedo product. This problem seems not to occur
with MOD12 MODIS land cover granules.

2) The difference, maybe, is grid attributes with non-geographic
dimensions. MODIS LC(works) provides a single grid (x,y), while MOD43
'Albedo' (does not work) provides multiple fields (10,2,x,y).

3) Problem outline:
fid=eos_gd_open(HDF_filename)
ngrid=eos_gd_inqgrid(filename,grid)
gid=eos_gd_attach(fid,grid); grid name from previous INQGRID
status=eos_gd_getpixels(gid,n_xy,x_latlong,y_latlong,x_image ,y_image)
f=where(x_image ge 0 and y_image ge 0,nf)
if(nf eq 0) then message, 'no points within image!'
fieldname='Albedo'
n_extracted=eos_gd_getpixvalues(gid,nf,x_image[f],x_image[f] ,fieldname,extracted_data)

Now, according to the documentation, n_extracted should be (nf * 10 *
2), and extracted data should be [10,2,nf], but this is not the case.
extracted_data is [nf], and n_extracted is [N * nf], where N=8 to 40.

4) In addition, while trying to debug this I keep getting creepy
SEGMENTATION FAULTS, suggesting that much more may be wrong with this
routine.

5) The workaround (and the way I know the files are good) is to use
EOS_GD_READFIELD() to extract the entire [10,2,1200,1200] multispectral
image, and then extract the points within IDL. However, this takes 13
seconds per file, which is not cool when there are 2000+ files to
process.

Basically, has anyone ever tried to use EOS_GD_GETPIXVALUES(), or tried
to work with multi-dimensional grids in HDF-EOS files? These
'SEGMENTATION FAULTS' are really bad for my nerves.

Goodness,

Edward H.
[Message index]
 
Read Message
Previous Topic: Greek font in ytitle ?
Next Topic: Re: eos_gd_getpixvalues() and eos_gd_* generally

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

Current Time: Fri Oct 10 05:10:51 PDT 2025

Total time taken to generate the page: 0.48031 seconds