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

Home » Public Forums » archive » Re: how to get pixel data corresponding to some coordinates' points?
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 get pixel data corresponding to some coordinates' points? [message #56222 is a reply to message #56214] Sat, 13 October 2007 18:22 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
highstone wrote:
> On Oct 14, 1:21 am, "Jean H." <jghas...@DELTHIS.ucalgary.ANDTHIS.ca>
> wrote:
>> highstone wrote:
>>> I have a point vector file(.shp) containing a lot of weather
>>> stations, how can I get corresponding pixel data from a '.img' file
>>> with least works? 3q!
>> if you have envi too, you can use envi_convert_file_coordinates
>>
>> Jean
> to Jean,
> I look up the help of ENVI, find the role of
> "envi_convert_file_coordinates" is to "Use this procedure to convert
> x,y pixel coordinates to their corresponding map coordinates".

"and vice-versa"
By pixel coordinate, they mean the row and column number, by map
coordinate, they mean the geographical coordinate (lat-long or else)

Maybe I
> didn't have said clearly. My vector file and raster file had the same
> coordinates, what I want to get is the pixels' data corresponding to
> these points in vector file as soon as possible.so I don't know why to
> use this procedure?
> please forgive me for my poor knowledge,3q.

Yes, the idea is, if you want to program it (maybe there is a built-in
tool... I don't know... ArcGis has one for sure):
1)open your shape file
2)get the coordinates (let's say, lat-long) of each point in an array
3)open your image to gets its FID
4)call envi_convert_file_coordinates, fid, X,Y, lat,long (with NO
keyword), which will change your lat-long to the corresponding pixel row
and column on your image
5)extract the pixels values, using image[X,Y]

the help file for envi's function is terrible and often needs a few
dozen reading before to get the code working well!

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Neural Networks In IDL?
Next Topic: multiple line plots in colors & legend

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

Current Time: Fri Oct 10 08:07:30 PDT 2025

Total time taken to generate the page: 1.67691 seconds