I searched the site very thoroughly but was not able to turn up a fitting answer - most probably I wasn't asking the correct questions.
I have a text-file with up to a several thousand lines of coordinates formatted as in the following example:
[1]
-75.4532 75.8273
-115.00 64.5
-90.00 74.3333
-100.00 72.4167
-110.00 69.00
-120.8 56.284
[2]
-70.00 73.75
-100.00 69.3333
-110.00 65.1533
-90.00 71.5833
-80.00 73.00
[3]
-100.00 67.5
-67.7133 72.6611
-80.00 71.5
-90.00 70.00
-110.00 63.8667
-115.8 60.836
What I'm trying to achieve is to split the file into an array at the numbers in brackets. So that I can use the number in brackets as the arrays index and the following lines as the corresponding value.
The next step would be looping through the array feeding each element to another program. If there is a more elegant approach I'm willing to listen.
All the best!
\n. DO you really want to store several thousand lines in memory at the same time?