Skip to main content
Solved

Keeping attributes for various feature classes that are run through Clipper

  • September 21, 2022
  • 3 replies
  • 102 views

Forum|alt.badge.img

Hey,

 

I am trying to modify https://community.safe.com/s/article/data-distribution-fme-server-app the data distribution demo script.

 

I am attempting to download 5 different shape files (points, polygons and lines) all with varying attributes. I have the script working and downloading with the exception of the attributes specific to each feature class. Every attribute is blown away.

 

If I change the user attributes to automatic for the output feature class it sort of works except its merging all the attributes together and showing them in every feature class.

 

Ideally I just want to download the 5 shapes and retain their unique attributes. Seems I can either output the shapes with no attributes or output the shapes with attributes from other feature classes merged into it.

 

Right now im running them through their own clipper into a copy paste of the feature output which would mean doing that for every single layer i want to download. Just want to make sure theres no better way of doing this

 

Am I missing something obvious here? Thanks

 

image

Best answer by carmijo

It sounds like you're trying to keep the attributes from the layers that are being clipped by the area of interest. If this is the case, you should be able to leave merge attributes parameter unchecked in the clipper transformer

imageSecondly, you might have a difficult time writing features with different geometries the same output. I would recommend writing to a different dataset for each output, just as you're reading them from different datasets.

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

carmijo
Supporter
Forum|alt.badge.img+11
  • Supporter
  • 135 replies
  • Best Answer
  • September 21, 2022

It sounds like you're trying to keep the attributes from the layers that are being clipped by the area of interest. If this is the case, you should be able to leave merge attributes parameter unchecked in the clipper transformer

imageSecondly, you might have a difficult time writing features with different geometries the same output. I would recommend writing to a different dataset for each output, just as you're reading them from different datasets.


Forum|alt.badge.img
  • Author
  • 19 replies
  • September 21, 2022

Thanks! I've been writing each to its own dataset was just making sure there was not a more efficient way of doing this.


carmijo
Supporter
Forum|alt.badge.img+11
  • Supporter
  • 135 replies
  • September 21, 2022

Thanks! I've been writing each to its own dataset was just making sure there was not a more efficient way of doing this.

Happy to help. You can look into using a dynamic writer to do the same while only using one writer. However, it may be more than you need at this point.

 

https://community.safe.com/s/article/dynamic-workflow-tutorial-introduction

 

Either way, if i've provided an answer that you're happy with, please mark it as 'Best Answer'. If I didn't, please let me know if I can help further. Thanks and take care!