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 #86496 is a reply to message #86495] Thu, 14 November 2013 03:35 Go to previous messageGo to previous message
dm_gty88 is currently offline  dm_gty88
Messages: 8
Registered: October 2013
Junior Member
It's in the limits keyword. Did I use it correctly?

MinLon = 111.6969
MaxLon = 127.7102
MinLat = 10
MaxLat = 20

Or alternatively,
Upper Left = 20, 117.0596
Upper Right = 20, 127.7012
Lower Left = 10, 111.6969
Lower Right = 10, 121.8512

On Thursday, November 14, 2013 10:03:01 AM UTC+8, David Fanning wrote:
> 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:30 PDT 2025

Total time taken to generate the page: 0.00187 seconds