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

Home » Public Forums » archive » Re: how to use Mosaic_doit procedure
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 use Mosaic_doit procedure [message #54748 is a reply to message #54642] Thu, 05 July 2007 05:48 Go to previous message
wlz is currently offline  wlz
Messages: 3
Registered: June 2007
Junior Member
On Jul 2, 8:27 pm, "devin.wh...@gmail.com" <devin.wh...@gmail.com>
wrote:
> There are two main issues with how your program is set up. First,
> MOSAIC_DOIT can't be used in a FOR loop to build one large output
> file. Using the routine in this way, and providing the same output
> filename during each loop, results in the one output file being
> overwritten each time MOSAIC_DOIT is called. Second, your call to
> MOSAIC_DOIT is missing some keywords. Chief among them are XSIZE and
> YSIZE. These two keywords, in units of pixels for image-based output
> or the units of a particular projection for map-based output, tell
> MOSAIC_DOIT how large the output mosaic canvas will be. The other two
> important keywords are X0 and Y0, which tell MOSAIC_DOIT where to
> place each contributing input image on the output canvas. The
> following Tech Tip on the ITT VIS website should get you going in the
> right direction:
>
> http://www.ittvis.com/services/techtip.asp?ttid=3336
>
> On Jun 29, 9:00 am, wlz <wuliz...@gmail.com> wrote:
>
>> I want to Mosaic the SRTM data,I used the "mosaic_doit" procedure,but
>> it doesn't work.Can you tell me why? my code as followed:
>
>> PRO MOSIC_SRTM
>> Compile_opt strictarr
>> File_Path='F:\WorkSpace\SRTM\test\'
>> Filelist=file_search(File_Path+'*.img',count=count)
>> Envi, /restore_base_save_files
>> Envi_batch_init, log_file='batch.txt'
>> ;
>> ; Open the input files
>> ;
>> mosaic_image='F:\WorkSpace\SRTM\mosaic.img'
>> mosaic_image1='F:\WorkSpace\SRTM\mosaic1.img'
>> FOR i=0,count-1 DO BEGIN
>> envi_open_file, mosaic_image, r_fid=mosaic_fid
>> envi_file_query,mosaic_fid,dims=mosaic_dims,ns=m_ns
>> ;print,mosaic_dims
>> ;print,'m_ns=',m_ns
>> envi_open_file,Filelist[i],r_fid=f_fid
>> envi_file_query,f_fid,dims=f_dims
>> mapinfo=ENVI_GET_MAP_INFO(fid=mosic_fid)
>> m_fid=[mosaic_fid,f_fid]
>
>> pos=[0,0]
>> dims=[[mosaic_dims],[f_dims]]
>> ;print,dims
>> Envi_doit,'mosaic_doit',fid=m_fid,pos=pos,dims=dims,/
>> GEOREF,MAP_INFO=mapinfo,$
>> out_name=mosaic_image1,out_bname='Mosaic
>> image',background=255,R_FID=r_fid;,Out_DT=2,PIXEL_SIZE=3.0
>> print,'r_fid = ',r_fid
>> ENDFOR
>
>> Envi_batch_exit
>> END

thanks.
[Message index]
 
Read Message
Read Message
Previous Topic: Get Latitude and Longitude from Tiff files
Next Topic: One Millionth Visitor is Astonomer at Glasgow University...

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

Current Time: Fri Oct 10 10:20:57 PDT 2025

Total time taken to generate the page: 1.43313 seconds