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

Home » Public Forums » archive » Gridded MODIS lat/lon array
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: Gridded MODIS lat/lon array [message #88191 is a reply to message #88187] Thu, 27 March 2014 06:13 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ddt88 writes:

> Hello David, I'm working with a large number of files so I want to avoid having to convert each hdf to geotiff for processing efficiency. I'm quite confused with the geotiff info and can't understand how I could extract the same information from the metadata of HDF files.

The information to navigate the image is in the metadata of the HDF
file. You are given the projection information (Sinusodial with
spherical datum) and the projected XY meter locations of the upper left
point and the lower right point of the image. Then, you are told the
dimensions of the image (4800x4800 in my case). This is everything you
need to know to navigate the image. For example, for the MOD09GQ image I
have here, I set the map coordinate object up like this:


IDL> map =cgmap('sinusoidal', ellipsoid=9, $
xrange=[6671703.118000d, 7783653.637667d], $
yrange=[3335851.559000d, 4447802.078667d], $
position=[0,0,1,1])
IDL> cgDisplay, 800, 800
IDL> cgImage, image, Stretch=2
IDL> cgMap_Grid, /Label, /cgGrid, Color='goldenrod', Map=map

I'm not sure why you think you need to make a GeoTiff file out of it for
"processing efficiency".

I read the information out of the file with NCDF_Browser. But, I'm sure
it is possible to read the metadata out of the file directly, too.

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
Previous Topic: Function syntax for any object class
Next Topic: CGMAP_GRID: Lattitude lines

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

Current Time: Fri Oct 10 07:07:59 PDT 2025

Total time taken to generate the page: 0.48142 seconds