map_proj_init [message #76593] |
Fri, 10 June 2011 12:53 |
jtmcahill
Messages: 26 Registered: October 2007
|
Junior Member |
|
|
Ok, I'm at the end of my rope. I'm trying to take an image that is
already projected in polar stereographic and convey this to IDL so I
can take the cartesian coordinates and have it compute lat/lon so I
can map it in IDL with gridding etc. I'm using map_proj_init where
the limits that go in are [-90, -180, -68.9075, 180]. But, the
limits that come out are [-68.907499, -135.00000,
-68.907499, 45.000004]. Is IDL just incapable of mapping a body
other than Earth? I doubt it, but I've yet to prove otherwise.
; upper-left corner of the image and the image pixel size are in
meters.
proj='stereographic'
ul_map = [-457439.9690636, 457439.9690636]; upper left corner x and
y
pixel_size = [240.0,240.0]; 240 m/pixel
lunar_radius = 1737400.0
; Set up parameters to display image in its native projection.
xsize = n_samples*pixel_size[0]
ysize = n_lines*pixel_size[1]
startx = ul_map[0]
starty = ul_map[1] - ysize
; The corners of the image are determined in their native
projection, then converted from Cartesian to geographic lat-lon
coordinates, which is required for the LIMIT keyword.
limit = [-90, -180, -68.9075, 180]
xyrange = [ul_map[0], ul_map[1]-ysize, ul_map[0]+xsize, ul_map[1]]
map_utm = map_proj_init(proj,limit=limit,sphere_radius=lunar_radius,
$
center_latitude=(-90),ellipsoid=19)
limit = map_proj_inverse(xyrange[[0,2]], xyrange[[1,3]],
map_structure=map_utm)
limit = reform(reverse(limit), n_elements(limit))
I know it's Friday, but if anyone can find a moment to take a look I'd
appreciate it.
Thanks...
|
|
|