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

Home » Public Forums » archive » Re: ENVI_GLT_DOIT and ENVI_GEOREF_FROM_GLT_DOIT
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: ENVI_GLT_DOIT and ENVI_GEOREF_FROM_GLT_DOIT [message #84358 is a reply to message #84354] Thu, 30 May 2013 08:29 Go to previous messageGo to previous message
Oana Coman is currently offline  Oana Coman
Messages: 27
Registered: December 2011
Junior Member
On Thursday, May 30, 2013 10:27:51 AM UTC-5, Kat wrote:
> Hi guys,
>
> I'm trying to use an envi batch file to automate georeferencing from GLT to try and put the pixels in an image in the right place according to their lat/lon position information. When I do the process by hand in ENVI it works fine, but once I try and run it through IDL none of it works.
>
>
>
> My first problem is that when I go to view the completed GLT, it does not have any header information or map information, so when I go to open the file and give it a file ID, it asks for header info (which I don't have), and if I don't give it a header info then it will have an invalid file ID. When I create a GLT file in regular ENVI, it doesn't give it any header or map info...so I'm not sure how to get around this issue. I think the invalid file ID is what's causing the second problem: The ENVI_GEOREF_FROM_GLT_DOIT doesn't even run. IDL seems to just skip past this procedure.
>
>
>
> Does anyone have an idea how to get around this missing header information?
>
>
>
> This is my code:
>
> ;make projections for ENVI_GLT_DOIT
>
> inProj = ENVI_PROJ_CREATE(/GEOGRAPHIC) ;geographic lat/lon
>
> param=[3396190.0, 0.000000, 0.000000, 0.0, 0.0]
>
> outProj = ENVI_PROJ_CREATE(NAME='Mars Equirectangular Default', PARAMS=param, TYPE=17) ;mars equirectangular
>
>
>
> ENVI_OPEN_FILE, TRR, R_FID=cTRR, NO_REALIZE=1 ;I/F image
>
> ENVI_FILE_QUERY, cTRR, dims=TRRdims
>
> ENVI_OPEN_FILE, DRR, R_FID=cDDR, NO_REALIZE=1 ;lat/lon image
>
> ENVI_FILE_QUERY, cDDR, dims=DDRdims
>
>
>
> ;run super GLT
>
> outGLT = 'testGLT_15mpp'
>
> ENVI_DOIT, 'ENVI_GLT_DOIT', DIMS=DDRdims, I_PROJ=inProj, O_Proj=outProj, OUT_NAME=outGLT, $
>
> PIXEL_SIZE=15, R_FID=GLT15, ROTATION=0.0, /SUPER, $
>
> X_FID=cDDR, X_POS=1, Y_FID=cDDR, Y_POS=0
>
>
>
> ;georeference TRR using super GLT
>
> ENVI_OPEN_FILE, outGLT, R_FID=OUT, NO_REALIZE=1
>
> print, 'open GLT files' ;this is where idl wants me to enter header information.
>
> ENVI_FILE_QUERY, OUT, ns=ns, nl=nl, nb=nb, dims=GLTdims
>
> print, 'get GLT file dims' ;dims end up being undefined
>
> outimage = 'GLTbatchTEST.IMG'
>
> ENVI_DOIT, 'ENVI_GEOREF_FROM_GLT_DOIT', BACKGROUND=0.0, FID=cTRR, GLT_DIMS=GLTdims, GLT_FID=GLT15, $
>
> OUT_NAME=outimage, R_FID = ATO_15mpp, SGL_NAME=outGLT, /SUPER

correction, ENVI_OPEN_FILE, outGLT, R_FID=OUT, NO_REALIZE=1 should read ENVI_OPEN_FILE, outGLT, R_FID=GLT15, NO_REALIZE=1. Either way, the FID is -1
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: NG windows always on top, linux Mint
Next Topic: Assigning the values of a matrix to a larger matrix

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

Current Time: Fri Oct 10 13:02:40 PDT 2025

Total time taken to generate the page: 0.71997 seconds