Skip to main content

Hi,

I am trying to do the following:

I have a total number of n adresses (points) spatially divided over a given area.

I want to group them into x clusters using y members per cluster. This has to be as spatially optimal as possible.

As far as I know, it should be something in the lines of a k-means algorithm.

Actually, the Neighbourhood Aggregator comes close, but I want to set a fixed number of members per cluster, not a minimal.

Anyone got any ideas? I already tried working with the cluster modeller, to no avail.

Thanks in advance!

Flip

Hi Flip,

Have you tried creating a pointcloud from the points.

Then use the PointCloudThinner to generate the points in the center of your clusters (thin by Y).

Then use the NeighborFinder to find all points, not in the pointcloud nearest to the selected points.

Erik Jan


Or... as @erik_jan says, convert to a point cloud then use the PointCloudDensityTiler. That will (I think) create features with an equal number of points, which you could then turn back into plain points.


Thanks Erik Jan & Mark, I'll give that a try!


Hi @flipvandervalk, did the above solution work for you?


Hi @flipvandervalk @erik_jan @Mark2AtSafe @bieahart, I posted an idea and a custom transformer to FME Hub. Might be interesting for you? See https://knowledge.safe.com/idea/59941/k-means-point-clustering-using-fme.html?

 


Reply