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

Home » Public Forums » archive » how to make lat/long grid for MODIS in IDL
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: how to make lat/long grid for MODIS in IDL [message #86495 is a reply to message #86494] Wed, 13 November 2013 18:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dm_gty88 writes:

> Thanks for the reply! I've tried to do it but to no avail. Here's the code I used:
>
> ; Opens the file
> fileID = HDF_SD_START('MOD09A1.A2002081.h29v07.005.2007136054406.hdf' , /read)
> index1 = HDF_SD_NAMETOINDEX(fileID, 'sur_refl_b01')
> dataset1 = HDF_SD_SELECT(fileID, index1)
> HDF_SD_GETDATA, dataset1, data1
> HDF_SD_ENDACCESS, dataset1
>
> ; Reverses the file to make it upright
> data1r = reverse(data1, 2)
>
> ; Setup map projection
> smap = MAP_PROJ_INIT('Sinusoidal', LIMIT=[10,111.6969,20,127.7102])
>
> ; Forward transform
> fmap = MAP_PROJ_FORWARD(data1r, MAP_STRUCTURE=smap)
>
> When I print, fmap all I get is an array of zeroes.

I can imagine, since the data values are not in EITHER latitude OR
longitude! Where are the latitude and longitude values of your corner
pixels? You told us you had those.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CONTINUE from function within loop
Next Topic: RANDOMN function

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

Current Time: Wed Oct 08 15:18:12 PDT 2025

Total time taken to generate the page: 0.00175 seconds