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

Home » Public Forums » archive » Map Projections and Contour Plots.
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: Map projections [message #27968 is a reply to message #15827] Mon, 12 November 2001 08:16 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
James Kuyper wrote:
> Is there any way to get at the coordinate conversion function for the
> currently active map projection? I'm talking about a function that takes
> a physical position in latitude and longitude coordinates, and converts
> it into an image position using either data, device, or normal
> coordinates. It doesn't matter which; once the position is in any one of
> those forms, I can get the others by using CONVERT_COORD. Such functions
> have to exist in order for IDL to perform mapping, but they don't seem
> to be publically exposed. I'd also like to have access to the inverse
> function, to get a lat/lon corresponding to an image position.

James,

When a map projection is active, longitude and latitude correspond to
x/y data coordinates. Therefore CONVERT_COORD will allow you to obtain
the device or normal coordinates for a given lon/lat. For example:

window, /free
map_set, 45, -90, scale=20e6, /usa
lon = -89.6
lat = 43.5
print, convert_coord(lon, lat, /data, /to_device)
326.465 217.622 0.000000
print, convert_coord(lon, lat, /data, /to_normal)
0.510102 0.425044 0.000000

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Data Miner problem
Next Topic: autoregressive code

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

Current Time: Sun Oct 12 10:38:55 PDT 2025

Total time taken to generate the page: 0.88688 seconds