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 #86051 is a reply to message #86050] Thu, 26 September 2013 10:00 Go to previous messageGo to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
I agree with your explanation for this behaviour, but the question is then how to map the full image. ;-) There must be a way to do this which isn't excessively complicated, as I don't see that it is a very unusual problem.

It seems that with map_image I need to reposition to use corner grid cell centres rather than edges, and then I end up losing half a grid cell from each edge. And with map_proj_init, to map the whole thing I'd need to insert a dummy row or column on one edge.

I opened a support ticket with Exelis but didn't hear anything back yet.

Andy

On Thursday, September 26, 2013 12:49:26 PM UTC-4, David Fanning wrote:
> AMS writes:
>
>
>
>> Almost, but not quite. Now, all the grid cells are the same size. But, it only puts 4x4 cells in there (instead of 5x5). It looks like the left column and bottom row are being cut off the image correctly.
>
>
>
> I have to wave my hands a little bit here, but let me try to explain why
>
> I think this might be the correct result.
>
>
>
> We have five pixels covering a range of, say, 47 to 52 degrees. If we
>
> assume the first pixel value represents the bottom edge of the image and
>
> the fifth pixel value represents the top edge of the image, then, in
>
> fact, we have only four values that can go into that range. Remember, we
>
> are interpolating the data into this space. Think of a vertical color
>
> bar. How many horizontal lines would you have to draw to separate four
>
> colors. The answer is five. One at the bottom, three to separate colors,
>
> and one at the top.
>
>
>
> I think that is what is happening here. The five values of our image are
>
> analogous to the locations of five vertical lines that we are using to
>
> "separate" the colors. We can only separate them into four colors with
>
> five lines. So, I think this is just the way interpolation works.
>
>
>
> This example is a bit contrived, of course. With these kinds of map
>
> projections and this image there would be no need to do any
>
> interpolation at all. But, in general, I think the interpolation is
>
> being done correctly by Map_Proj_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: Fri Oct 10 09:37:00 PDT 2025

Total time taken to generate the page: 1.59939 seconds