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

Home » Public Forums » archive » Re: Reding data into IDL
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
Re: Reding data into IDL [message #8793] Mon, 21 April 1997 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Richard Hall writes:

> I have a set of co-ordinates (lat,long) containing ca. 800 points.
> I wish to plot these points on a map. My problem is,
> how do I convert the ascii file into a format understood by IDL?

The nice thing about IDL is that no conversion is necessary. This
data is ready to go! Suppose you have 2 columns by 800 rows of
data. Read the ASCII data like this:

data = FltArr(2, 800)
OPENR, lun, filename, /Get_Lun
READF, lun, data
FREE_LUN, lun
lat = REFORM(data(0,*))
lon = REFORM(data(1,*))

If you want to plot these points on a map, you can do it directly
with a routine like PLOTS. If the points are in lat/lon coordinates
nothing needs to be done except to establish a map projection.
For example,

Map_Set, /Orthographic, /Isotropic
PLOTS, lon, lat, PSYM=4

If you wish to plot these points on a map as an image or contour
plot, then you will need to grid the points into a 2D array using
the TRIANGULATE and TRIGRID routines. There is an excellent
article on how to do this in the Map Projection Tips section
of my web page.

> Also, the map data supplied with IDl is a little to coarse for my
requirements.
> How do I go about obtaining a finer set of co-ordinates, and loading them
into
> IDL.

Go back to your installation CD ROM and download the high resolution
CIA database.

Cheers!

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: TIFF header
Next Topic: Reding data into IDL

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

Current Time: Sat Oct 11 10:30:28 PDT 2025

Total time taken to generate the page: 0.95952 seconds