Re: importing text data form

Hi John:

Look in visad/data/text/README.text.  I recently released a VisAD file adapter
that does exactly this...and more.  The file types are automatically recognized
if they have a .txt, .csv, .tsv extension (for blank, comma or tab-separated
values).

If you call the TextAdapter directly, there are constructors that allow you to
pass in the MathTypes and "file descriptor"; otherwise, you have to put them
into the file.  In your example, you'd need to have:

(Longitude,Latitude)->(pressure)
Latitude Longitude pressure[unit=hPa]
1 2 3
4 5 6
7 8 9

(one, or more, blanks for the delimeter in ".txt" files).

To my knowledge no one else has used this yet, so if you have
questions/problems, please let me know.

tom


John Stevens wrote:
> 
> Hello everyone,
> 
> I am new to this forum, having explored VisAD I think it is a great piece of
> software (nice documentation too).
> 
> I have a problem I dont know if anyone can help me. I have the following
> type of mapping
> 
> (longitude,latitude -> pressure)
> 
> From a simple data I made up, the example that I am using is:
> 
> long    lat     press
> 1       1       3
> 2       2       5
> 3       3       10
> 4       4       11
> 5       5       15
> 6       6       23
> 7       7       29
> 
> This data is saved as a text file. Now currently I am using SpreadSheet to
> implement my program. Whenever I import this text file into SpreadSheet I
> get a error message saying 'The source cannot be converted into VisAD data'.
> So my question is can VisAD recognise this type of data? Or do I have to
> create my own class to do this. I appreciate it if anyone can help me out,
> 
> Thx,
> 
> John
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

-- 
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Phone/VoiceMail: 608/262-2759
Fax: 608/262-5974


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: