Skip to main content
Question

Move all data to zero

  • April 17, 2023
  • 6 replies
  • 23 views

jp12212
Contributor
Forum|alt.badge.img+4

I'm new to FME and want to create a workbench that translates 3D data to zero.

 

I have IN (reader) -> CenterPointExtractor -> Affiner -> OUT (writer).

 

Within Affiner have:

1, 0, @mult(@Value(_inside_x),(-1))

0, 1, @mult(@Value(_inside_y),(-1))

 

I've tried a bunch of variants of this but am struggling to get the data to move to zero. Workbench attached.

 

Thanks for the assistance.

6 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • April 17, 2023

Hi @jp12212​,

The Offsetter might be simpler than the Affiner, since you can just us the negatives of the center values as your offsets.


jp12212
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 21 replies
  • April 18, 2023

Hi @daveatsafe​ ,

 

I have modified as per below but it seems to not be working still. Any suggestions.

 

Cheers


david_r
Celebrity
  • 8391 replies
  • April 18, 2023

You'll still need to offset relative to the geometry reference point (in this case it's the center point), otherwise you'll just move the geometry 1 ground unit south-west relative to the original position.

Try this:

image


jp12212
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 21 replies
  • April 18, 2023

You'll still need to offset relative to the geometry reference point (in this case it's the center point), otherwise you'll just move the geometry 1 ground unit south-west relative to the original position.

Try this:

image

Hi David,

 

Thanks for getting back to me - this seem to be working but not all the elements are moving (only the lines, not the solid box). Is this behaving as it should? I will go and test a couple of other files in case. If you see anything incorrect here though please let me know.

 

image.png


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 1637 replies
  • April 18, 2023

Hi David,

 

Thanks for getting back to me - this seem to be working but not all the elements are moving (only the lines, not the solid box). Is this behaving as it should? I will go and test a couple of other files in case. If you see anything incorrect here though please let me know.

 

image.png

Remove the connection between the source feature type and the Offsetter - it is bypassing the CenterPointExtractor, creating a second set of features at the original location.


jp12212
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 21 replies
  • April 18, 2023

Great, thank you!