Skip to main content
Solved

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


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

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

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+43
  • 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
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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
takashi wrote:

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
mark2atsafe wrote:

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
larry wrote:

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.

 

 


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