Find coordinates of contour point with the longest distance to centroid

Hello,
i’m currently searching for a way to find the coordinates of the contour point with the longest distance to the centroid of a segment. I used the “Segment Features” Node with the “Centroid Distance” option to find the right contour point. Now I need the x- and y-coordinates for that point. Is there a way to find those?
Thanks.

Hi @AlexBtt,

Welcome to the KNIME Forum! :wave:

There is no obvious way (as far as I know), so I built a rather manual solution that you can inspect at https://kni.me/w/EqjJNgItnAN6tIvi. It extracts the X,Y coordinates of all the points on the contour (there is potential to speed this part up and/or make it less verbose) and uses generic KNIME functionality in the subsequent steps to find the point that’s farthest away from the centroid.

Hope that helps!

Best,
Stefan

2 Likes

Thank you, that worked!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.