map_proj_inverse question [message #74388] |
Wed, 12 January 2011 09:59 |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hi folks,
I'm setting a projection using MAP_SET (IDL 7.1), after that I want to
retrieve the lat/lon values of the mouse position.
What I'm doing is the following :
1) I retrieve the mouse position, using event.X and event.Y
2) After that, I normalize the X,Y position, taking in account the
UV_BOX of the map structure
uv_box_lenght=[!map.UV_BOX[2]-!map.UV_BOX[0],!map.UV_BOX[3]- !
map.UV_BOX[1]]
X=event.X/dim[0]*uv_box_lenght[0] + uv_box_lenght[0]
Y=event.Y/dim[1]*uv_box_lenght[1] + uv_box_lenght[1]
3) And I calculate the lat/lon values using map_proj_inverse
PRINT, MAP_PROJ_INVERSE(X,Y,MAP_STRUCTURE=!map)
Mmmmh !!!! Something is not working well because the values I obtain
are incorrect.
What am I missing ?
Thank you for your help,
nata
|
|
|