Question

Cluster points based on location (K-MEANS method)

  • 2 March 2016
  • 5 replies
  • 28 views

Badge

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


5 replies

Userlevel 2
Badge +12

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

Userlevel 4
Badge +25

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.

Badge

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

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

Badge +2

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