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

Home » Public Forums » archive » SHADE_SURF/MAP_SET compatibility
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
SHADE_SURF/MAP_SET compatibility [message #17473] Fri, 22 October 1999 00:00 Go to next message
Donghui Yi is currently offline  Donghui Yi
Messages: 1
Registered: October 1999
Junior Member
I am having a problem getting back to the original lat/lon coordinates
from
device coordinates after mapping geographical data with SHADE_SURF.

In detail...

I am trying to use SHADE_SURF to plot a digital elevation model (DEM) of

Antarctica (and other areas), given as a uniformly spaced lat lon grid.

First, MAP_SET was used to define a projection. Then MAP_IMAGE was used
to
warp the 2d DEM to an image. Then SHADE_SURF was used to plot the image.

THE SEQUENCE OF COMMANDS HERE
map_set, $
/grid, /continent, /cyl, /isotropic, $
latCenter, lonCenter, $
limit=[minLat,minLon,maxLat,maxLon] , $
e_continents={fill:1}; , color:white}

imagedem=map_image(datasmall,startx,starty,latmin=minlat,lat max=maxlat,
$
lonmin=minlon,lonmax=maxlon)

set_shading,light=[0,0,1],value=[100,255]
shade_surf,imagedem, image=testt,ax=90,az=0,zrange=[min(datasmall), $
1.5*max(data small)], xstyle=4,ystyle=4


Once the image is on the screen, we want to use the mouse to select a
region for zooming. Knowledge of the lat/lon bounds of the region is
needed
for selection of ancillary data such as satellite ground tracks that
pass
through the region.

The obvious solution to this is to use TV rather than SHADE_SURF, but
I've been asked specifically to produce a map with shaded relief
rather than an image that would be produced by TV.

PROBLEMS:

1. The resolution of the DEM seems to be severely degraded by MAP_IMAGE.

2. SHADE_SURF overrides the coordinate system set up by MAP_SET, so we
no
longer have a way to relate the device coordinates to lat/lon.
3. The size of the array output by SHADE_SURF is not the same size as
the
size of the array given to it -- i.e., after issuing the command.

IDL>q=dist(200)
IDL> shade_surf,q,image=p,ax=90,az=0
IDL> help,q,p
Q FLOAT = Array[200, 200]
P BYTE = Array[393, 295]

P and Q are not the same size.

QUESTIONS:

1. Are there any other ways to plot lat/lon grid dem using SHADE_SURF
for
different projections?
2. Is there a way to force SHADE_SURF to produce an output that is the
same
size as its input?
3. Is there any way to get lat/lon back after using SHADE_SURF?

Regards,

Donghui


--
Donghui Yi Code 971 (Oceans and Ice Branch)
Raytheon ITSS Goddard Space Flight Center
Phone: 301-614-5877 Greenbelt, MD 20771
Fax: 301-614-5644 Email: donghui@icesat2.gsfc.nasa.gov
Re: shade [message #25156 is a reply to message #17473] Mon, 21 May 2001 08:35 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I'd suggest plotting the polygon first and then overlaying the plot.

Cheers,
Pavel

Amar Nayegandhi wrote:
>
> Hi,
> How do I shade a polygon(rectangle) with a color such that I can plot
> over an existing plot and be able to see the initial plot as well as the
> shaded region.
> thanks,
> amar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: END statement
Next Topic: about memory

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

Current Time: Wed Oct 08 13:49:05 PDT 2025

Total time taken to generate the page: 0.00736 seconds