| Re: how to initialize a projection from its specification? [message #83949 is a reply to message #83948] |
Wed, 17 April 2013 09:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nata writes:
> How can I initialize a mapping projection in IDL using the following specification?
> http://www.nco.ncep.noaa.gov/pmb/docs/on388/tableb.html#GRID 130
>
> I want to remap (by bilinear interpolation) one image (that is projected in the specified grid) to another projection, by using MAP_PROJ_IMAGE.
>
> I do have the lat/lon values of the image but it seems that I cannot use MAP_PATCH if my final projection is initialized using MAP_PROJ_INIT.
>
> Any ideas?
Well, you seem to be mixing a couple of things up here. :-)
If you want to take an image in one map projection and re-project it to
another map projection, then MAP_PROJ_IMAGE is exactly what you want:
http://www.idlcoyote.com/map_tips/warpimage.html
You simply create a map structure for the current projection and one for
the desired projection, and Map_Proj_Image does a great job.
On the other hand, if you are considering MAP_PATCH, that is another
problem altogether. Here you have an image and a lat/lon value for each
pixel in the image, and you wish to display this image on a map
projection. This is more of a display solution than an analytical
solution.
I have written the equivalent of Map_Patch for the Map_Proj_*** method
of creating the map projection. It is called cgWarpToMap. You can learn
more about it here:
http://www.idlcoyote.com/idldoc/cg/cgwarptomap.html
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.")
|
|
|
|