map_proj_inverse and map_proj_init IDL 6.2 [message #46613] |
Fri, 02 December 2005 08:00 |
Liberum
Messages: 48 Registered: September 2005
|
Member |
|
|
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
|
|
|