Re: Image Warp Success? [message #69792 is a reply to message #69759] |
Fri, 12 February 2010 03:21   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
Thanks for the tips.
So it ends up similar to the way to plot things over imap (first
convert to UV with the map structure). But in the case of imap it
would be much more useful if it it had a way to provide the plot
locations in lat/on, so that it could update the plot when the
projection gets changed on its interface, as it does with the images
it warps.
On Feb 12, 3:52 am, David Fanning <n...@dfanning.com> wrote:
> Yes, my best map projection advice is to STOP thinking in
> latitude/longitude space. It just totally screws you up. :-)
>
> What you want to think about is the map projection grid,
> or what IDL calls UV space, and what almost everyone else
> calls "Cartesian" or XY space. And don't even think about
> using Map_Set. You want to be using the Map_Proj_*** routines.
> And even those won't work worth a damn if you are trying
> to do something interactively. Then I think the only usable
> thing around is the MapCoord object from the Catalyst Library,
> which can work around the problems with Map_Proj_Init and
> it's spooky action-at-a-distance "feature."
>
> The projected grid space is nice because it is regular
> and rectangular, just like a plot! Which means if you
> set your plot data space up to reflect your XY coordinate
> grid, then things just go onto the map or image naturally.
> MapCoord, of course, makes setting all this up extremely
> simple. Just call its draw method and there you have it.
> You use MAP_PROJ_INVERSE and MAP_PROJ_FORWARD to convert
> back and forth from lat/lon to XY coordinates. Easy!
>
> Map_Grid and Map_Continents can also draw onto the XY grid
> if they are given a map structure derived from Map_Proj_Init.
> So you don't have to do anything hard to draw map grids and
> outlines. Station locations or cities or anything else you
> want to draw on the plot are just PLOTS calls (usually
> after converting lat/lon locations to XY with Map_Proj_Forward).
>
> The Coyote routine GeoCoord can read a GeoTIFF image and
> produce a MapCoord object that is all set up for you to
> navigate your image. I'll probably write something similar
> this weekend for netCDF files containing map projection
> information ahead of a map projection talk I am giving at
> the IDL User's Group meeting in a week or so.
>
> I expect the presentation will be available on-line shortly
> after the talk.
>
> Cheers,
>
> David
>
> P.S. And, oh, don't forget to flip your image in the vertical
> direction. Everyone in the world except IDL assumes the (0,0)
> point is in the upper left corner! Use REVERSE for this, not
> !Order or life will never make any sense to you. :-)
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|