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

Home » Public Forums » archive » Re: Modis Georeferencing
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: Modis Georeferencing [message #53098 is a reply to message #53044] Wed, 21 March 2007 08:03 Go to previous message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
Chitan,

Devin's GUI tool will be a welcome addition. I've played with an
early version using MODIS ocean data and it is fine for doing
interactive analysis - I haven't tried using it in batch mode,
though. The batch mode programming isn't that difficult using
existing ENVI routines, however. Assuming that you have ENVI+IDL, you
just open the MODIS hdf file, extract the data you want including
latitude and longitude using the HDF routines, write your data as an
ENVI file, open the ENVI file, create the GLT file, and georeference
using the GLT. Here is a extract from my code that does the above:

; Processing logic:
; 1. Write the calibrated MODIS L2 data to an ENVI
file in memory
; 2. Open that file
; 3. Create a GLT file mapping the original pixel
lat/lon to the standard projection (in memory)
; 4. Georeference the MODIS L2 data using the GLT
map (in memory)
; 5. Get map coordinages from geographic
definition of area of interest
; 6. Extract data from area of interest
; 7. Write extracted data
;
; geoData = calibrated data from original image
; enviName = ENVI file with calibrated data - mapped image
; geo_Points= A 16-element double floating array of geographic
coordinates for the four corners of the input data.
;
ENVI_WRITE_ENVI_FILE, geoData, BNAMES=geoNames,
GEOPOINTS=geo_Points, NB=nGeo, NL=nlines, NS=nsamps, $
/NO_OPEN,/IN_MEMORY, R_FID = fid1
ENVI_FILE_QUERY, fid1, NS=ns, NL=nl, NB=nb, DIMS=dims
;
ENVI_DOIT, 'ENVI_GLT_DOIT', DIMS=dims, I_PROJ=dataProj,
O_PROJ=gridProj, /IN_MEMORY, $
PIXEL_SIZE=pixel_size, R_FID=glt_FID, ROTATION=rotation,
$
X_FID=fid1, X_POS=xpos, Y_FID=fid1, Y_POS=ypos, /
NO_REALIZE
;
ENVI_FILE_QUERY, glt_Fid, DIMS=glt_dims, NS=nsglt, NL=nlglt
;
; At this point we've created the GLT file which gives the map
location for
; every pixel in the input file. Note the input file pixels are
referred to
; in a one-based coordinate system.
;
ENVI_DOIT, 'ENVI_GEOREF_FROM_GLT_DOIT', FID=fid1, GLT_DIMS=glt_dims,
GLT_FID=glt_FID, /IN_MEMORY, $
MIN_PIXELS=1, $
POS=LIndGen(nb), R_FID=map_FID
;

I hope this helps. Barry
[Message index]
 
Read Message
Read Message
Previous Topic: Manipulation using where
Next Topic: Re: spawn issue - was: open sockets

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

Current Time: Mon Dec 01 12:28:18 PST 2025

Total time taken to generate the page: 1.68187 seconds