Question

Loop Process

  • 3 October 2018
  • 7 replies
  • 11 views

Userlevel 4
Badge +30

Hi Team,

I have a dynamic CSV file with the following structure:

Day 01102018
Point1
Point2
Point3
Time 01:00
23
40
4
Time 01:30
43
24
21
Time 02:00
130
49
10

Is necessary to identify the lines 1-2-3 and in each node ( 
Time XXXX ) realize the merger with the Points. The Loop process will be
 good in this case?

The Image bellow, is my goal:

Attached my example file - 

Thanks,

Danilo


7 replies

Badge +22

I would personally read it line by line with a text file reader and then use either variables or adjacent features.

 

 

See https://knowledge.safe.com/questions/3346/translating-a-polygon-from-poly-osmosis-polygon-fo.html

 

 

Or https://knowledge.safe.com/questions/65092/connect-lines-without-common-id-by-order-in-file.html?childToView=65116#answer-65116
Userlevel 4
Badge +30

I would personally read it line by line with a text file reader and then use either variables or adjacent features.

 

 

See https://knowledge.safe.com/questions/3346/translating-a-polygon-from-poly-osmosis-polygon-fo.html

 

 

Or https://knowledge.safe.com/questions/65092/connect-lines-without-common-id-by-order-in-file.html?childToView=65116#answer-65116
Hi @jdh

 

, First thanks your attention and answer.

 

I tried to use the transformer AttributeCreator from this Link Attribute Creator but without success.

 

 

Could you help me?

 

 

Thanks, 15379-textlinebreaks.fmwt

 

 

Badge +22
Hi @jdh

 

, First thanks your attention and answer.

 

I tried to use the transformer AttributeCreator from this Link Attribute Creator but without success.

 

 

Could you help me?

 

 

Thanks, 15379-textlinebreaks.fmwt

 

 

Can you repost your goal? I have a broken image.

 

 

Badge +22
Can you repost your goal? I have a broken image.

 

 

Here's a variableSetter/Retriever example. I expanded the data to allow for multiple dates, if that is not the case you can simplify things.

 

 

textlinebreaks.fmwt

 

 

Userlevel 2
Badge +17
The link to your goal image is broken. Please post it again.

 

Userlevel 4
Badge +30
Here's a variableSetter/Retriever example. I expanded the data to allow for multiple dates, if that is not the case you can simplify things.

 

 

textlinebreaks.fmwt

 

 

Thanks your help and attenction in this case. @jdh

 

 

It was perfect.

 

Badge +3

Another (and fun) way to read such a simple structured file would be to realize that you can identify the attributes by using div and mod functions on the txt_line_number.

The first set would then become attribute names and all subsequent sets will be attribute sets.

Reply