Skip to main content
Question

Cluster points based on location (K-MEANS method)

  • March 2, 2016
  • 5 replies
  • 218 views

Forum|alt.badge.img

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • March 2, 2016

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


mark2atsafe
Safer
Forum|alt.badge.img+56
  • Safer
  • 2554 replies
  • March 2, 2016

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.


Forum|alt.badge.img

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


  • 1 reply
  • November 22, 2016

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


helmoet
Forum|alt.badge.img+8
  • 195 replies
  • December 13, 2017

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?