Skip to main content
Question

Geometry Replacer failing to read FME binary format when used in a workspace called by a workspace runner

  • February 8, 2022
  • 6 replies
  • 143 views

Forum|alt.badge.img

In FME desktop I have a geometry extractor which converts simple polygons to FME binary and stores them in the attribute _geometry. I need to use this geometry in another workspace. I pass the attribute _geometry to the other workspace using a workspace runner and a parameter. In the child workspace the Geometry Replacer fails. The error is INVALID_PARAMETER_GEOMETRY_SOURCE.

 

Does anyone know if it is possible to pass geometry as text from one workspace to another or what I might be doing wrong? I've attached a simple example of the problem.

6 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • February 8, 2022

If you want to pass geometry as text you need to extract the geometry as text, so choose FME xml or WKT or any text based format in your geometry extractor instead of FME binary


Forum|alt.badge.img
  • Author
  • February 8, 2022

Ah brilliant, thank you. Yes the FME xml worked!


takashi
Influencer
  • February 8, 2022

I agree with @ebygomm​ . In addition, I would recommend you to use "Hex Encoded FME Binary" if you need to perform completely loss-less encoding/decoding.


Forum|alt.badge.img
  • Author
  • February 8, 2022

Thank you, that's helpful and works really well. Do you know if it's possible to include the coordinate system within the Hex Encoded FME Binary, or if I will need to pass that as a separate parameter?


takashi
Influencer
  • February 8, 2022
jw4554 wrote:

Thank you, that's helpful and works really well. Do you know if it's possible to include the coordinate system within the Hex Encoded FME Binary, or if I will need to pass that as a separate parameter?

I don't think it's possible to include coordinate system definition within geometry text. You will have to create another user parameter to pass the coordinate system name.

 

Alternatively, a pair of Recorder and Player could be a workaround.

In the main workspace, use a Recorder (Recording Mode: RECORD) to save the feature into a file and pass the file path to the child workspace through the WorkspaceRunner. You can then use a Player to read back the feature in the child workspace.

If you do so, you can restore the whole feature including not only geometry and coordinate system but also all the feature attributes.


Forum|alt.badge.img
  • Author
  • February 8, 2022

Thank you, I'll take a look


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