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

Home » Public Forums » archive » Re: Map_Image()
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Map_Image() [message #47060] Mon, 23 January 2006 00:26
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
If I may add in: the arrays in question here are not in regular lat /
lon grid but rather in sinusoidal projection. Thus, you can't create
the latitude / longitude arrays straightforward. And you can't use
MAP_IMAGE but rather Liam Gumley's IMAGE_MAP or derivatives.

Cheers,

Peter
Re: Map_Image() [message #47073 is a reply to message #47060] Sat, 21 January 2006 06:06 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sheldon writes:

> A friend, Peter Albert, whose work I am continuing, informed me that
> the images I am trying to warp with map_image will not work. This is
> due to the fact that they are simple arrays and not georegistered data.
> Nevertheless, you have again added to my knowledge in this area. I am
> now working on creating lat and lon files for my arrays. There is a
> another program - a hybrid of Liam's and some other expert's - that
> will take these lat and lon vector files and do the warping. The beat
> goes on....

You can see how I create lat/lon vectors for 2D arrays I wish
to display on a map projection here:

http://www.dfanning.com/graphics_tips/toms_tutorial.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Map_Image() [message #47074 is a reply to message #47073] Sat, 21 January 2006 05:17 Go to previous message
Liberum is currently offline  Liberum
Messages: 48
Registered: September 2005
Member
Much obliged David,

A friend, Peter Albert, whose work I am continuing, informed me that
the images I am trying to warp with map_image will not work. This is
due to the fact that they are simple arrays and not georegistered data.
Nevertheless, you have again added to my knowledge in this area. I am
now working on creating lat and lon files for my arrays. There is a
another program - a hybrid of Liam's and some other expert's - that
will take these lat and lon vector files and do the warping. The beat
goes on....

Cheers,
Sheldon
Re: Map_Image() [message #47088 is a reply to message #47074] Fri, 20 January 2006 04:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sheldon writes:

> As my IDl edification continues, let me express my gratitude to those
> of you who have shared your knowledge, and sometimes wit, with me :<).
> After going through plot(), I have arrived at MAP_IMAGE(). Some stuff
> is straight forward and I know that many of you know this stuff like
> the back of your hands; so, can someone please explain a little more in
> detail what these two arguments to map_image() are?

An image, when it is warped into a map projection space,
does not take up the entire window, but only a portion
of it.

warp = Map_Image(image, xx, yy, xs, ys)

The four positional parameters to the right of the
original image tell you how to put the smaller
warped image into the larger window. The first
two of the parameters (xx,yy) locate the lower-left edge
of the warped image in pixel units. The second two
of the parameters (xs,ys) tell you the size of the
image in pixel units. You want to use all four of
the parameters to place or locate the image on
the map projection in the window:

TV, warp, xx, yy, XSIZE=xs, YSIZE=ys

The XSIZE and YSIZE parameters are not used when you
issue the TV command on your display device (a pixel
is a defined size there), but is critical if you want
the warped image to show up in the correct location
in PostScript, where pixel sizes are flexible. It
does no harm to write the TV command as above, so
it is always done this way for warped images.

The notion of "upon return" is IDL shorthand for
saying that these variables are *output* variables,
not input variables. That is to say, then the
procedure or function *returns*, these variables
have valid information, but not when they are called.
You need to provide a variable to capture the output,
otherwise IDL has nothing to return the information in.

You can see how to use Map_Image in this article:

http://www.dfanning.com/graphics_tips/toms_tutorial.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Problem with reading IDL written binary file....corrupt values?
Next Topic: Re: cool way to determine durations in time series

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

Current Time: Wed Oct 08 15:56:15 PDT 2025

Total time taken to generate the page: 0.00705 seconds