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

Home » Public Forums » archive » Re: map_image and latmin/latmax, lonmin/lonmax - edges or centres?
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_image and latmin/latmax, lonmin/lonmax - edges or centres? [message #86039] Wed, 25 September 2013 12:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
AMS writes:

> I'm trying to map a regularly-gridded image (in IDL 7.1.1). I'm using
map_image to figure out where in the output window the image should go.
But, it's not lining up exactly as I expect with e.g. coastlines. I am
using compress=1 (i.e. inverse transform each point), so I don't think
it is that. I wonder if I am using the latmin/latmax and lonmin/lonmax
keywords incorrectly.
>
> The documentation ( http://www.exelisvis.com/docs/MAP_IMAGE.html ) says this:
>
> LATMIN
> The latitude corresponding to the first row of Image. The default is -90 degrees. Note also that -90°= LATMIN < LATMAX = 90°.
> LATMAX
> The latitude corresponding to the last row of Image. The default value is 90 degrees. Note also that -90°= LATMIN < LATMAX = 90°.
> LONMIN
> The longitude corresponding to the first (leftmost) column of the Image argument. Select LONMIN so that -180°= LONMIN = 180°. The default value is -180.
> LONMAX
> The longitude corresponding to the last (rightmost) column of the Image argument. Select LONMAX so that it is larger than LONMIN. If the longitude of the last column is equal to (LONMIN - (360. /Nx)) MODULO 360, it is assumed that the image covers all longitudes (Nx being the total number of columns in the Image argument).
>
> My question: are these keywords expecting you pass the centre values for the edge rows/columns? Lower-left corners? Or the outer values (lower-left and upper-right)? (The difference being half the pixel size in lat/lon.)
>
> My testing suggests that using the outer values of these corner pixels is probably the intention (in that the image then covers the intended portion of the output window), but to me at least the wording in the documentation could be clearer. And the end result does not look entirely correct to me, as it looks like some pixels don't match up entirely with the coastlines (from map_continents,/hires,/coast), although I don't know whether that is something that I am doing
incorrectly, a deficiency with the dataset I am using (it isn't one created here), or a deficiency in the IDL coastline database.
>
> If someone in the know could confirm the intended use of these map_image keywords, I'd appreciate it. :)

It seems to me the answer to your questions is "none of the above". I
think the only way these keywords make any sense at all is if they
represent the limits of the image rectangle. So, I would say, the should
be the outside edges of the pixels in the very center of the image, as
if you set up orthogonal axes with 0,0 at the center of the image. These
values will represent the values where the axes leave the image.

Of course, none of this makes much sense in lat/lon space, so I presume
the program converts to xy projected meter space (where all this *does*
make sense) first, then does the warping into this space. But, that's
just my guess. I don't often use Map_Image.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to read string data from excel file
Next Topic: combination of two integration methods in a specified time interval

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

Current Time: Wed Oct 08 13:44:27 PDT 2025

Total time taken to generate the page: 0.00512 seconds