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

Home » Public Forums » archive » displaying an image in simple geographic coordinates
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: displaying an image in simple geographic coordinates [message #54224 is a reply to message #54165] Fri, 25 May 2007 13:54 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Matt wrote:
> does anyone know how i can display an image in simple geographic
> coordinates using IDL? all documentation that i have read deals with
> reprojection images to various projections or reprojecting a window to
> a given image's projection. geographic coordinates is never listed as
> an option in any of these functions. maybe it's because i'm dealing

In IDL, the default projection is cylindrical, which is (almost) the
same thing as what you're calling geographic coordinates. In this
projection, the x coordinate is the longitude in radians, and the y
coordinate is the latitude in radians.

IDL> map_set, /continents, /grid
IDL> print,map_proj_forward([-90,90],[-45,45])*!RADEG
-89.999995 -44.999998
89.999995 44.999998

You can also use MAP_PROJ_INIT, but you have to override the default
sphere radius:

IDL> proj = MAP_PROJ_INIT('Equirectangular', SPHERE_RADIUS=1.0)
IDL> print,map_proj_forward([-90,90],[-45,45],map_structure=proj) *!
RADEG
-89.999995 -44.999998
89.999995 44.999998

Alternatively, you could simplify by building the conversion factor
into the projection itself:
IDL> proj = MAP_PROJ_INIT('Equirectangular', SPHERE_RADIUS=!RADEG)
IDL> print,map_proj_forward([-90,90],
[-45,45],map_structure=proj)
-89.999995 -44.999998
89.999995 44.999998
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL GLT creation.
Next Topic: Changing the labels orientation

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

Current Time: Wed Oct 08 19:29:43 PDT 2025

Total time taken to generate the page: 0.00502 seconds