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

Home » Public Forums » archive » Re: an envi question- extracting the pixel values of seveal points with lat-lon values
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: an envi question- extracting the pixel values of seveal points with lat-lon values [message #51027 is a reply to message #51026] Tue, 31 October 2006 12:15 Go to previous messageGo to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
Ed Hyer wrote:
> Jeff,
>
> This problem should be ridiculously easy to solve in ENVI, but when I
> had to solve it, I had to do it the hard way. At bottom, the text of
> ENVI_POINT_PRO.PRO, which is a mini-library of routines for solving
> your point extraction problem.
>


Holy cow!! That's a lot of code! This works for me, if i understand the
original poster's problem correctly:

pro junk

;open bhtmref.img that comes with ENVI.
fname = 'C:\Program Files\RSI\IDL62\products\ENVI42\data\bhtmref.img'
envi_open_file, fname, r_fid = fid


;use pixel locator to find map coords for pixel
;at file coords 242,195 (picked at random).
;They are:
e = 282015.00
n = 4901085.00

envi_convert_file_coordinates, fid, xf, yf, e, n
print, xf+1, yf+1 ;should print 242, 195

end


Here's the output:

Compiled module: JUNK.
ENVI> junk
242.00000 195.00000

Seems about right to me :)

Jeff
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Fonts
Next Topic: Naming batch files and main-level programs

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

Current Time: Wed Oct 08 19:58:14 PDT 2025

Total time taken to generate the page: 0.00363 seconds