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

Home » Public Forums » archive » Re: Preserving coordinate transformation
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: Preserving coordinate transformation [message #50817 is a reply to message #50814] Tue, 17 October 2006 05:53 Go to previous messageGo to previous message
Sverre Solberg is currently offline  Sverre Solberg
Messages: 18
Registered: February 2005
Junior Member
Hm, well, that's just what I tried, still it is unclear to me how to
actually use the !x, !y and !map. I cant simply reset, like !x = <saved
!x> etc, as I guess I also need the !D which is a read-only
variable(?). Furthermore, I havent been able to dig out how/where idl
do the conversion from device to map coordinates. The documentation for
convert_coord is only describing transformation between data, device
and normal, but doesnt mention the situation when there's a map
involved. Trying to hardcode the transformation formulas described in
the manual for convert_coord (after first saving the values stored in
!x, !y and !d) doesnt seem to give the correct answer. Am I missing
some important point here?

Sverre





Wox wrote:
> Save the !x, !y and !map after making the plot and restore them before
> you use convert_coord.
>
>
> On 17 Oct 2006 03:47:17 -0700, "Sverre Solberg" <sso@nilu.no> wrote:
>
>> I plot a map (by the MAP_SET etc routines) inside a widget_draw area
>> using "/button_events". When the user is clicking on the map the
>> program use the event (x and y) and the "convert_coord" to compute the
>> geographical coordinates of the position. However, when making other
>> plots in between, opening other draw widgets, the built-in coordinate
>> transformations (device->data) changes and destroys the conversion to
>> geo. coord. next time this window is clicked on. How could I store the
>> coordinate transformation? If it was a simple 2D plot, without the map,
>> I could just save the !x and !y variables and compute the conversion
>> myself, but that dont work when there's a map projection. I then need
>> to know how idl converts from device coordinates (returned by widget
>> draw) to map coordinates (lat/long) and I havent been able to find out
>> that. Any hints?
>>
>> Sverre
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Preserving coordinate transformation
Next Topic: idl6.3 bug on Macintel?

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

Current Time: Thu Oct 09 02:47:46 PDT 2025

Total time taken to generate the page: 0.15699 seconds