Skip to main content
Question

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


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.

3 replies

takashi
Evangelist
  • 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
takashi wrote:

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.

 

 


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