Skip to main content
Hello,

 

 

There is a point data, in which there are many which have identical concatenated attribute value. 

 

Trying to create a polygon of such points which have the identical attribute values and finding the centroid.

 

For which, the HullAccumulator (convex) was tried.

 

However, It does create the polygons but not in the cases where there are two points with identical attribute value it doesn't. requirement being, All the points which have these identical values need to create their respective polygon.

 

 

Regards.
Hi,

 

 

I dont think areabuilder_type transformers can build a area or polygon from just 2 points....

 

 

 

2 points can form a line.

 

Maybe you could use a statisticscalculator to separate those and send them to a 2dPointreplacer/2DPointadder combo to build a line.

 

 

If u insist on forming an area from 2 points you can use a non-oriented boundingboxaccumulator.

 

(mind you, if the points lie on the vertical or horizontal, they will fail).

 

 

 

Gio

 

 


Hi Sani,

 

 

If your final goal is to find centroid (center of mass) of points which have identical attribute value, I think the Aggregator and the CenterOfGravityReplacer can do that.

 

 

Takashi
Thank You for the reply :)

 

 

Regarding seperating only the 2 points having identical attributes,

 

How to go about that?

 

 

 


Hi,

 

 

there are many ways to find the number of points having identical attributes, but it generally involves using the Group By on the shared attributes.

 

 

One way could be to use the StatisticsCalculator (with a Group By), as suggested by Gio.

 

 

David

I've done this with LineCombiner, but my data is structured in such a way that it will come out of the Polygon port of LineCombiner i.e. the last vertexes has identical coordinates to the start vertex.


Reply