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

Home » Public Forums » archive » Reprojecting
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
Reprojecting [message #38871] Thu, 08 April 2004 07:09 Go to next message
dsteinberg is currently offline  dsteinberg
Messages: 4
Registered: April 2004
Junior Member
I am having trouble reprojecting images within IDL. I want to be able
to reproject the image arrays permanently, i.e. not just for display.
In other words, I would like to be able to read in EOS-HDF or GeoTIFF
files, reproject them into a desired projection and write them out as
new GeoTIFF's (in their new projection). So far I have run into a lot
of problems, and I am a bit stuck. If anyone has any leads (or
ideally .pro's) it would be greatly appreciated. Thanks.

-Dan
Re: Reprojecting [message #39052 is a reply to message #38871] Fri, 09 April 2004 11:32 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Thu, 08 Apr 2004 07:09:36 -0700, Dan Steinberg wrote:

> I am having trouble reprojecting images within IDL. I want to be able
> to reproject the image arrays permanently, i.e. not just for display.
> In other words, I would like to be able to read in EOS-HDF or GeoTIFF
> files, reproject them into a desired projection and write them out as
> new GeoTIFF's (in their new projection). So far I have run into a lot
> of problems, and I am a bit stuck. If anyone has any leads (or
> ideally .pro's) it would be greatly appreciated. Thanks.

As Ben mentioned last week, the MAP_PROJ_* routines let you access the
internal projection code (both forward and in reverse), and I've used
them successfully with INTERPOLATE to construct huge (~1Gpix) tiled
mappings directly with no display device:

...

map=map_proj_init('Aitoff',SPHERE_RADIUS=180.0D/!DPI, $
LIMIT=[quad_lat_min,quad_lon_min, $
quad_lat_max,quad_lon_max])

...

lonlat=map_proj_inverse(x,y,MAP_STRUCTURE=map)
x=reform((lonlat[0,*]-lonmin)/scale,width,height,/OVERWRITE)
y=reform((lonlat[1,*]-latmin)/scale,width,height,/OVERWRITE)
projected_result=interpolate(array,x,y,MISSING=!VALUES.F_NAN )

That particular SPHERE_RADIUS value is set to map x,y coordinates in
degrees of longitude and latitude (as my input images contain).
Otherwise x & y refer to physical coordinates on the surface of the
Earth (which might also be useful to you). See MAP_PROJ_INIT for
more.

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Overlaying contours on an image
Next Topic: resizing image

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

Current Time: Sat Oct 11 09:41:32 PDT 2025

Total time taken to generate the page: 0.80276 seconds