Skip to main content
Solved

What's the best way to send features to a WorkspaceRunner?

  • November 13, 2017
  • 6 replies
  • 22 views

rbovard
Contributor
Forum|alt.badge.img

The title says all: what's the best way to send features to a WorkspaceRunner?

I tried to use a WKT but for a reason I don't get, it add some `--` in parameters and the WKT received is invalid:

Command line arguments are `C:\Program Files\FME2016\fme.exe' `./pg2dxf_reseau_eau.fmw' `--Perimeter' `POLYGON ((507248 137339' `--507484 137669' `507865 137441' `--507629 137111' `507248 137339))'

...

WARN  |Invalid WKT encountered: POLYGON ((507248 137339

Best answer by takashi

Hi @rbovard, in most cases, you can pass a string value containing commas to a published user parameter with Text (Multiline) type. Try changing the type of the parameter.

"Text: Creates a parameter for entering a text string. Note: Any leading or trailing white space, commas, or other common delimiters are automatically trimmed. To maintain delimiters, use Text (Multiline)." -- Creating and Modifying User Parameters, FME Workbench Help

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

Forum|alt.badge.img
  • November 13, 2017

If your WKT geometry is something like this:

POLYGON((507248 137339,507484 137669,507865 137441,507629 137111,507248 137339))

You have to replace commas by <comma> before sending it to the WorkspaceRunner as in the attached example.

POLYGON((507248 137339<comma>507484 137669<comma>507865 137441<comma>507629 137111<comma>507248 137339))


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • November 13, 2017

You could also write the data first with a FeatureWriter, then read it back in the next workspace with a FeatureReader, optionally sending the file name through the WorkspaceRunner.

It depends on how much data we're talking about. I wouldn't send more than a few coordinate pairs via a published parameter. They just aren't built to handle that kind of activity.


takashi
Celebrity
  • Best Answer
  • November 14, 2017

Hi @rbovard, in most cases, you can pass a string value containing commas to a published user parameter with Text (Multiline) type. Try changing the type of the parameter.

"Text: Creates a parameter for entering a text string. Note: Any leading or trailing white space, commas, or other common delimiters are automatically trimmed. To maintain delimiters, use Text (Multiline)." -- Creating and Modifying User Parameters, FME Workbench Help


rbovard
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • November 14, 2017

Hi @rbovard, in most cases, you can pass a string value containing commas to a published user parameter with Text (Multiline) type. Try changing the type of the parameter.

"Text: Creates a parameter for entering a text string. Note: Any leading or trailing white space, commas, or other common delimiters are automatically trimmed. To maintain delimiters, use Text (Multiline)." -- Creating and Modifying User Parameters, FME Workbench Help

Thanks a lot for the tip @takashi, changing the parameter type solved my issue!

rbovard
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • November 14, 2017

You could also write the data first with a FeatureWriter, then read it back in the next workspace with a FeatureReader, optionally sending the file name through the WorkspaceRunner.

It depends on how much data we're talking about. I wouldn't send more than a few coordinate pairs via a published parameter. They just aren't built to handle that kind of activity.

Thanks for your answer. I wanted to avoid saving the data during my workflow, because I'm handling "simple" geometries.

 

But in more complex cases, using a FeatureWriter is the right solution.

 

 


rbovard
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • November 14, 2017

If your WKT geometry is something like this:

POLYGON((507248 137339,507484 137669,507865 137441,507629 137111,507248 137339))

You have to replace commas by <comma> before sending it to the WorkspaceRunner as in the attached example.

POLYGON((507248 137339<comma>507484 137669<comma>507865 137441<comma>507629 137111<comma>507248 137339))

Thank you for your suggestion, the tip of @takashi is even better because it's handled directly in the parameter type.