Skip to main content

Hi,

I have a problem encoding a text file to the correct format. The below images show:

1) the *.prj document properties of an outputted Terrascan Project from a Matlab programme:

2) the *.prj document properties of an outputted Terrascan Project from an FME Workbench.

Only the file at 1 can be loaded directly in to Terrascan.

If the file at 2 is "Saved as" in Textpad, the option to change the line ending to "PC" is available as shown below.

In doing so, the file will then load in correctly into Terrascan. Please advise where I maybe going wrong.

The template workbench as a small selection of the files is below:

Any assistance the can be offered would be much appreciated!

Hi @danamos,

The FME Text File writer has the parameter Line Termination, which is set to System as default. Please try setting it to Windows instead before running the workspace.


Thanks for your answer @daveatsafe but that still does'nt work, below are the writer parameters:

I've also tried outputting via the CSV writer, but that does'nt work correctly either.

It seems that the only way I can get it to output correctly is connecting the input (header) text file to the writer - but that obviously does'nt really serve a purpose other than for testing. It's the data stream that seems to cause the output to not be provided as required.


Hi @danamos,

Please try disabling Write UTF Byte Order Mark on the Text File writer.

 


Hi @danamos,

The FME Text File writer has the parameter Line Termination, which is set to System as default. Please try setting it to Windows instead before running the workspace.

Thanks again @daveatsafe I've tried this, but still got the same result unfortunately. I also tried changing the Write UTF Byte Order Mark to No - also to no avail :(


Thanks again @daveatsafe I've tried this, but still got the same result unfortunately. I also tried changing the Write UTF Byte Order Mark to No - also to no avail :(

Hi @danamos,

Would you mind posting copies of both your output file and one that works? I would really like to examine the differences between them.


Hi @danamos,

Would you mind posting copies of both your output file and one that works? I would really like to examine the differences between them.

Hi @daveatsafe here are the two text files (zipped up in an archive) you're after... many thanks again for your assistance.Terrascan_Projects.zip


Hi @danamos,

Thank you for the sample files. The problem seems to be a single [cr] rather than [cr][lf] right before the 'Block...' header line. This is created by the AttributeCreator transformer in the workspace, rather than by the Text Line writer.

In the Text Editor in the Attribute Creator Parameters, please choose Options - Show Spaces/Tabs to display the [cr] before the header line. Then add a Newline character before the 'Block...' text form the Special Characters section on the right of the editor. This should give you the correct line feed in the output file.


Reply