X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Nov 2009 05:37 PM by  anon
Getting latitude and longitude
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
26 Nov 2009 05:37 PM
    Hello everybody, I am working with a geo-corrected hyperspectral image composed by 224 bands. In its header the UTM location (latitude / longitude) of the upper-left corner (long0,lat0), the pixel size and the rotation appear. By clicking in Tools / Cursor Location Value it is shown all the information about the pixel the mouse cursor is over, including its value and its latitude and longitude. How is the UTM calculated for each pixel?? It would be very easy because: latitude=lat0+num_row*pixel_size_y longitude=long0+num_column*pixel_size_x But this is not exact because of the rotation. How is the rotation considered when calculating the UTM coordinates of each pixel? My final aim is to get a matrix with the same spatial resolution than the image, but with two bands. The first band would store the longitude of each pixel, and the second one would store the latitude. Is there any easier way to do this than using the expressions above (including rotation)? Does any IDL routine that given one pixel calculates de UTM coordinates exist? I hope you can help me, if you need some more information I can provide it. Thank you very much!!

    Deleted User



    New Member


    Posts:
    New Member


    --
    27 Nov 2009 12:00 PM
    [QUOTE]malche@mail.ru wrote   Normal 0 false false false MicrosoftInternetExplorer4 If you need calculate map coordinates of each pixels after rotation, than you need calculate number column and row after rotation and map coordinates for new upper left corner. Example for clockwise rotation:   A=-1*rotation_angle new_col_number=fix(num_column*cosA+num_row*sinA) new_row_number=fix(num_column*sinA+num_row*cosA)   New upper-left corner (lat'0,long'0):   lat'0=lat0 long'0=long0-pixel_size*fix(num_row*sinA)   For counterclockwise rotation:   A=rotation_angle new_col_number=fix(num_column*cosA+num_row*sinA) new_row_number=fix(num_column*sinA+num_row*cosA)   New upper-left corner (lat'0,long'0):   lat'0=lat0+pixel_size*fix(num_column*sinA) long'0=long0   Alex [/QUOTE]   Hi Alex, thanks to your help, i have been able to find the exact and right expression: lat=lat0+pixel_size*(num_col*sin(a)-num_row*cos(a)) long=long0+pixel_size*(num_col*cos(a)+num_row*sin(a)) Thank you very much!
    You are not authorized to post a reply.