|
Re: overlying data on an image [message #25839 is a reply to message #25834] |
Thu, 19 July 2001 15:01  |
deja_jlin
Messages: 12 Registered: February 2001
|
Junior Member |
|
|
hi Jairo,
Jairo Santana <santana@icesat2.gsfc.nasa.gov> wrote in message:
> I have a grid of elevation heights in geo coordinates. Also I have
> points:
> lats, lons, heights. I need to plot the lats, lons, and heights on top
> of the grided image. How can I do that? Do I need to grid the data
> points (lat,lon,h) first? any suggestion/code will help.
>
> Thanks,
> Jairo.
>
do you mean you have a grid of heights and an image of the same
location, and you want to superimpose contours of the heights onto
the image? if so...
David Fanning answers just that question in his excellent book
_IDL Programming Techniques_, which i highly recommend. i've the
feb. 1999 edition, and it's on p. 102 in that version (in a section
entitled "combining simple graphical displays"). the url to his
website:
http://www.dfanning.com/
anyhow, the summary of the method is use TVIMAGE to write the image,
and set the Keep_Aspect_Ratio keyword to 1 to output the position
of the image via the Position keyword. then pass that value into
your call to CONTOUR via its Position keyword, w/ Noerase set.
re gridding, as long as your data is in a grid (even if it's not a
regular grid), then CONTOUR will work fine. if not, then you'll
have to grid it using TRIANGULATE or SPH_SCAT (for spherical triangles).
best,
-Johnny
-------------------------------------------
Johnny Lin
CIRES, University of Colorado
Work Phone: (303) 735-1636
Web: http://cires.colorado.edu/~johnny/
-------------------------------------------
|
|
|
Re: overlying data on an image [message #25840 is a reply to message #25839] |
Thu, 19 July 2001 14:57  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Jairo Santana <santana@icesat2.gsfc.nasa.gov> writes:
> I have a grid of elevation heights in geo coordinates. Also I have
> points:
> lats, lons, heights. I need to plot the lats, lons, and heights on top
> of the grided image. How can I do that? Do I need to grid the data
> points (lat,lon,h) first? any suggestion/code will help.
Short answer (for a hypothetical image from long 30 to 40, lat 15 to 25)
plotimage, img, imgxrange=[30,40], imgyrange=[15,25]
oplot, lon, lat, psym=1
This will overlay the (LON,LAT) symbols on a flat cartesian image map.
You will probably also want to use the RANGE keyword to scale your
image into a 0-255 range.
I think this is what you want. If you need to plot as a 3d relief
surface, then you should investigate the SURFACE command. Liam Gumley
also makes a procedure called IMDISP, but I'm not sure if he can
overlay a coordinate system.
Craig
Download PLOTIMAGE from:
http://cow.physics.wisc.edu/~craigm/idl/idl.html (under graphics)
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|