[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Formatting strings to coordinates
- Subject: Formatting strings to coordinates
- From: Simon de Vet <simon(at)mathstat.dal.ca>
- Date: Fri, 19 May 2000 13:25:53 -0300
- Newsgroups: comp.lang.idl-pvwave
- Organization: ISINet, Nova Scotia
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:19702
The data analysis adventure continues... I have read in the data, and am
now working on the various plots.
I have a string array, taken from the text file, of coordinates.
However, they are in the form "43.92°S" ,and "176.50°W".
I would like to be able to take this array of strings and convert it to
a numerical array or real latitudes and longitudes, from -90 to 90 and 0
to 360 so that they can eventually be plotted onto a globe.
I've figured out how to use strings to generate numerical values (ie:
'Jan' -> 1, 'Feb' -> 2, etc..), but not how to handle parts of strings
to modify the other parts.
Any suggestions? This group has been a major help so far!
Thanks,
Simon