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

Home » Public Forums » archive » trouble with map projections
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: trouble with map projections [message #84988 is a reply to message #84986] Thu, 20 June 2013 12:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
chris.orphanides@noaa.gov writes:

> I am trying to take a satellite image of sea surface temperature
(SST), subset it, and then project it, and I can't seem to get it right.
I am able to read the image and subset the area I am interested in
without a problem. Getting it projected and having things line up is
another story.
>
> What makes sense to me is first using the map_proj_init function to create the map projection I want to put the image into (Lambert Conformal Conic), then use the map_proj_image function to warp the image to the proper projection. However, when I do this, the resulting array has lost its SST values and is all 0.0s. Can anyone tell me what I am doing wrong? I have experimented with many of the mapping capabilities in IDL, but I just can't get it right. The code I
described is below Thanks in advance for your help.
>
> range = [-78.1900, 34.0300, -61.8100, 45.4900]
>
> nec_prj = MAP_PROJ_INIT('Lambert Conformal Conic', /GCTP, $
> ELLIPSOID='WGS 84', $
> LIMIT=range, $
> CENTER_LATITUDE=40.00, $
> CENTER_LONGITUDE=-70.00, $
> STANDARD_PAR1 = 36.1667, $
> STANDARD_PAR2 = 43.8333 )
>
> necprj_sst = MAP_PROJ_IMAGE(nec_region, range, MAP_STRUCTURE = nec_prj)
> ; nec_region is the SST data for the region I am interested in,
> ; subset to fit the range in the lines above
>
> A little additional information: The main input image before I subset it is described as being in a Cylindrical Lat-Lon projection with a regular 0.01 degree grid and a WGS 84 Ellipsoid. Since Cylindrical is the default IDL projection I didn't set a map projection for this image. I would prefer to set the ellipsoid to WGS 84 for the Cylindrical projection, though it doesn't appear possible in IDL (I would love it if I was wrong about this). Also, I am working with the
type of images described here: ( http://podaac.jpl.nasa.gov/dataset/JPL_OUROCEAN-L4UHfnd-GLOB -G1SST)

As the Stooges would say, "No, no, no. You're doing it all wrong!"

You need to create a map projection that describes your image as you
downloaded it. I'm not sure why you think IDL can't do a Cylindrical map
projection with a WGS-84 ellipsoid, but this is a VERY common projection
for satellite images and IDL handles it perfectly. Then, you create a
map projection for what you want the image to end up as. Finally, you
use Map_Image to warp the image from one map projection to the other.
Here is an article that describes the process:

http://www.idlcoyote.com/map_tips/warpimage.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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GRID3 Problems
Next Topic: Re: P value for the regression analysis?

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

Current Time: Wed Oct 08 16:04:25 PDT 2025

Total time taken to generate the page: 0.00342 seconds