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

Home » Public Forums » archive » Re: map_proj_inverse and map_proj_init IDL 6.2
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: map_proj_inverse and map_proj_init IDL 6.2 [message #46603] Sun, 04 December 2005 23:41
Liberum is currently offline  Liberum
Messages: 48
Registered: September 2005
Member
Hi,

Thanks. I think you are right. I will look into that.

Sheldon
Re: map_proj_inverse and map_proj_init IDL 6.2 [message #46609 is a reply to message #46603] Fri, 02 December 2005 23:02 Go to previous message
enod is currently offline  enod
Messages: 41
Registered: November 2004
Member
As far as I know, map_proj_inverse and map_proj_forward functions are
only supposed to derive the longitude and latitude coordinates from map
projection coordinates, and vice versa. I don't think it can be used to
register an image without projection.

Regards,
Tian

Liberum wrote:
> Hi everyone,
>
> I am sure someone has the answer to this question:
> I am trying to georegister an array using map_proj_inverse and
> map_proj_init in IDL 6.2. Since this is the first time I have done
> this, I have made some mistakes but I got IDL to execute the program
> without error. The problem is that the results look, well, wacky. The
> array is a Meteosat 8 image slice in satellite projection. My function
> looks like this:
> ************************************************************ **************
> FUNCTION xy2deg, data
> x = (size(data,/dimensions))[0]
> y = (size(data,/dimensions))[1]
>
> ; map projection info
> map_info = MAP_PROJ_INIT('satellite',datum=8, $
> SPHERE_RADIUS=6378169.0, $
> HEIGHT=42164000.0,SAT_TILT=0, $
> CENTER_LONGITUDE=0,CENTER_LATITUDE=0, $
> ROTATION=0)
> indices = indgen(2,x*y)
> ind = 0L
> for i=0, y-1 do begin
> for j=0, x-1 do begin
> indices[0,ind] = j
> indices[1,ind] = i
> ind = ind + 1
> endfor
> endfor
> result = MAP_PROJ_INVERSE(indices,MAP_STRUCTURE=map_info)
> return, result
> end
> ************************************************************ **************
> IDL> res = xy2deg(data)
> IDL> print, res(*,500) ; for example
> 0.0044915539 0.0000000
> IDL>
> IDL> print, size(res,/dimensions)
> 2 690000
> ------------------------------------------------------------ ------------------------------------------------------------ -----
> Can anyone give me some tips here? I wonder if I need to know more
> about the region the array covers. I am not 100% sure on the SAT_TILT
> nor the ROTATION but these should not have such a large effect.
>
> Sincerely,
> Sheldon
Re: map_proj_inverse and map_proj_init IDL 6.2 [message #46610 is a reply to message #46609] Fri, 02 December 2005 09:08 Go to previous message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
Can you explain what you mean by "wacky"? I'm not sure I see anything
wrong.

I think the problem may be your coordinate units. It looks like
MAP_PROJ_INIT and MAP_PROJ_INVERSE convert to degree coords from meter
coords (not data indices). The result you got was converting the
physical location (500 m, 0 m) to lon/lat, and not the pixel at
[500,0].

Essentially, I think you need to include the spatial resolution of
Meteosat somewhere in your code.

-Dave
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: swf read write
Next Topic: Re: swf read write

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

Current Time: Wed Oct 08 13:42:25 PDT 2025

Total time taken to generate the page: 0.00557 seconds