Hi
I have a polygon with name A and some points around with names A, B , C, D
I would like to calculate the distance between the centerpoint of polygon and the point with the same name of polygon (distance polygon A point A)
Thx
Francesco
Hi
I have a polygon with name A and some points around with names A, B , C, D
I would like to calculate the distance between the centerpoint of polygon and the point with the same name of polygon (distance polygon A point A)
Thx
Francesco
Replace the polygon with the center point (CenterPointReplacer).
Then use the NeighborFinder (group by name) to find the closest point (candidate) to the centerpoint (base).
This will add an attribute _distance, with the requested distance.
@frsisani
Or extract centerpoint (CenterPointReplacer)
FeatureMerge unconditionaly (req = 1 and sup = 1) to points.
Create lines Vertex replace with centerpoint and Vertex add with points.
Function @Length() holds the distance (can ber accesed via Aritmetic Editor in all transformer that provide acces to this editor, for instance tester or Attributecreator).
Alternatively, this procedure is also possible. This is a way to calculate distance literally using attributes.
@hypot((@Value(x1)-@Value(x0)),(@Value(y1)-@Value(y0)))
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.