I've pairs of two nodes which have an offset in between. I need to add in the middle of each pair a new feature (see the left diagram). The first table shows the current list with the node pairs connected by the attribute ID. I like to create a new list with the new created node-features. Is there a way to solve this problem with existing transformers?
Page 1 / 1
Hi @nindalf, a possible way is:
- Use the Aggregator (Group By: ID) to make a MultiPoint from two points belonging to the same ID.
Use the CenterPointReplacer to convert the MultiPoint to the middle point.
If the goal is to extract coordinates as attributes, the CenterPointExtractor can be used instead.
@nindalf, a slight variation - you can use the LineBuilder to create a line per ID, and then use the CentrePointReplacer
capture.png capture.png
Hi @nindalf, a possible way is:
- Use the Aggregator (Group By: ID) to make a MultiPoint from two points belonging to the same ID.
Use the CenterPointReplacer to convert the MultiPoint to the middle point.
If the goal is to extract coordinates as attributes, the CenterPointExtractor can be used instead.
Ok, I will solve it this way. Is there a possibility to save the coordinates of the parent nodes as an attribute on the child node?
Ok, I will solve it this way. Is there a possibility to save the coordinates of the parent nodes as an attribute on the child node?