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 #51023 is a reply to message #51021] Tue, 31 October 2006 12:39 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
I think 'gis_learner' wanted the value on the different images.... not
only the coordinate of the point. So once the image is opened and the XY
coordinated obtained, I would go for ENVI_GET_DATA ... you can loop
through your points, setting DIMS accordingly.

Jean

PS: and the whole code remains small :-)

> 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:21 PDT 2025

Total time taken to generate the page: 0.00417 seconds