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   |
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
>
|
|
|