Skip to main content
Question

How can I copy a template geometry (tree) to eacht point of a list/file?

  • July 20, 2017
  • 3 replies
  • 34 views

I have a template geometry (tree.dae) and like to copy them to different locations. The locations are given with points (x, y, z) including a scale factor as an attribute in a shapefile. My idea was to move the template geometry with "Offsetter" and the parameters from the point geometries. How can I manage that in an FME workbench? I couldn't find a transformer for that until now...

Thank you for your feedback.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • July 20, 2017

Hi @b319, I would try the FeatureMerger in this context.

  • Extract coordinates (x, y, z) of each point with the CoordinateExtractor beforehand, then send the points to the Requestor port of the FeatureMerger.
  • Send the feature containing the template geometry to the Supplier port.
  • Set an identical constant value (e.g. 1) to the Join On parameter for both Requestor and Supplier.
  • Select "Geometry" in the Feature Merge Type parameter.

The FeatureMerger would replace the geometry (point) of every Requestor feature with the template geometry and output them via the Merged port. You can then move and enlarge/shrink the geometry according to the coordinates and scale factor, using the Offsetter and the Scaler.


lars_de_vries
Forum|alt.badge.img+10

You could use a FeatureMerger transformer to do so. You can connect the template to the supplier port and all other features to the requestor port.

Inside the transformer you should set the values for merging both to 1. This way you create an unconditional FeatureMerger.


  • Author
  • July 24, 2017

Hi @b319, I would try the FeatureMerger in this context.

  • Extract coordinates (x, y, z) of each point with the CoordinateExtractor beforehand, then send the points to the Requestor port of the FeatureMerger.
  • Send the feature containing the template geometry to the Supplier port.
  • Set an identical constant value (e.g. 1) to the Join On parameter for both Requestor and Supplier.
  • Select "Geometry" in the Feature Merge Type parameter.

The FeatureMerger would replace the geometry (point) of every Requestor feature with the template geometry and output them via the Merged port. You can then move and enlarge/shrink the geometry according to the coordinates and scale factor, using the Offsetter and the Scaler.

Thank you very much @takashi and @lars_de_vries! It works perfect.