Question

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

  • 8 February 2022
  • 6 replies
  • 14 views

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

Userlevel 1
Badge +21

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

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

Userlevel 2
Badge +17

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.

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?

Userlevel 2
Badge +17

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.

Thank you, I'll take a look

Reply