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

Home » Public Forums » archive » Read several files into one big data array?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Read several files into one big data array? [message #89523 is a reply to message #89519] Thu, 23 October 2014 00:46 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den torsdagen den 23:e oktober 2014 kl. 01:31:12 UTC+2 skrev luc...@gmail.com:
> On Wednesday, October 22, 2014 4:05:43 PM UTC-7, Craig Markwardt wrote:
>> On Wednesday, October 22, 2014 4:57:12 PM UTC-4, luc...@gmail.com wrote:
>>> I have tons of data files in the same folder. They are named correctly with the last 5 digits representing the order
>> ...
>>> data = FLTARR(nlines)
>>
>> Don't you want a more complex data type there? You are reading at least four numbers (integer, time, two floating point), so either it should be FLTARR(4,nlines), or a structure.
>>
>> Craig
>
> Yes! Craig, thank for catching that!
>
> I was getting only the first column

If you are just reading those files in order to put the contents in another file, why bother parsing the lines and putting them in an array?

It should be enough to just read each line as a string, add the file number to the beginning of that string, and then write it to the output file.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bug in cgHasImageMagic
Next Topic: Fleurdelas - Carbomap's Open Source LiDAR file manipulator - now fully support LAS 1.4 and the Extra Bytes VLR

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

Current Time: Sun Oct 12 04:36:32 PDT 2025

Total time taken to generate the page: 1.44383 seconds