Solved

pass geometry in user parameter

  • 19 December 2018
  • 3 replies
  • 11 views

Badge

I use attribute with extracted geometry in WorkspaceRunner and pass it to another workspace's user parameter. I then use user parameter in GeometryReplacer and get reject.

I asume that problem accours when user parameter changes attribute encoding. I tryed to lab with AttributeEncoder with no success. Every time i use value from user parameter with geometry string, encoding is changed to utf-8 and GeometryReplacer seems to not like that.

Is FME cabable av passing geometry to other worspace as attribute?

icon

Best answer by redgeographics 19 December 2018, 12:29

View original

3 replies

Userlevel 4
Badge +25

Yes, although depending on which type of geometry encoding you pick. I've tried this with OGC Well Known Text and that works fine but a binary type like FME Binary, fails indeed. Hex encoded FME Binary works though. I would recommend sticking to the human-readable forms such as WKT, GML or GeoJSON to be on the safe side.

1_send.fmw

2_receive.fmw

Badge

I now used BinaryEncoder in sender and BinaryDecoder in receiever workspace to pass the geometri. Did the job.

Thanks, @redgeographics

Userlevel 4

Yes, although depending on which type of geometry encoding you pick. I've tried this with OGC Well Known Text and that works fine but a binary type like FME Binary, fails indeed. Hex encoded FME Binary works though. I would recommend sticking to the human-readable forms such as WKT, GML or GeoJSON to be on the safe side.

1_send.fmw

2_receive.fmw

WKT works really well for simple geometries such as points and lines and non-huge polygons.

Hex encoded FME Binary has the upside of being much more compact and also that it supports whatever geometry type FME supports, which is not the case with WKT. It should also be slightly faster to process, although I don't think that would make a measurable difference in this scenario.

Reply