Skip to main content
Solved

How to create a customized writer?

  • November 30, 2017
  • 5 replies
  • 13 views

Forum|alt.badge.img

I need to create a csv-file with a special structure. I 've two problems which I haven't an idea how to solve:

1. How can I add a file-header before the actual content (The yellow part on the picture)?

2. If an element has more than one coordinate pairs (in case of a line) how can I add the vertexes and the end-point on the same row (The part witch is in blue on the picture)?

Yellow: File-header

 

Orange: Column-Header

 

Shades of Blue: Element coordinate(s)

Best answer by takashi

If you create each row including the header as a single text line consisting of required comma separated values, those lines can be written into a file with a Text File writer.

View original
Did this help you find an answer to your question?

5 replies

takashi
Evangelist
  • Best Answer
  • November 30, 2017

If you create each row including the header as a single text line consisting of required comma separated values, those lines can be written into a file with a Text File writer.


Forum|alt.badge.img
  • Author
  • November 30, 2017
takashi wrote:

If you create each row including the header as a single text line consisting of required comma separated values, those lines can be written into a file with a Text File writer.

I think this could be the solution. I will try it and let you know if it worked. Thank you!

 


fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • November 30, 2017

Hi @nindalf You could even use one workspace to first write the header to a text file and then the data to the same file with a CSV writer. Be sure to append with the CSV and not overwrite.


Forum|alt.badge.img
  • Author
  • December 4, 2017
fmelizard wrote:

Hi @nindalf You could even use one workspace to first write the header to a text file and then the data to the same file with a CSV writer. Be sure to append with the CSV and not overwrite.

This is also possible but I think the problem is to write the coordinates of the lines on one row of the csv (the blue part of the example). Am I wrong?

 

 


Forum|alt.badge.img
  • Author
  • December 12, 2017

Could you give me a hint how I can write a text line of feature attributes separated by a semicolon to a text file?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings