1

I have a number of points with a "time" property. I need a procedure that, given a total time, results in a number of clusters in which the sum of the time property do not exceed the given total time.

Example below shows a clustering when the given total time is 15:
Blue cluster is 15
Green cluster is 15
Yellow cluster is 15
Cyano cluster is 14

enter image description here

  • 1
    ... and what have you tried so far? Show your schema and data please. Edit the question to add more info. – Craig Ringer Oct 1 '15 at 13:35
  • 1
    I tried nothing cause I don't know where to start. Looked at some clustering tools like kmeans-postgresql but it do not completely fit my case since I want a cluster in which the sum of time property for each point in cluster must not exceed the given limit – Tony Oct 1 '15 at 13:43
1

It is duplicate of multiple questions, but I post the answer because it is QGIS and there is not enough room in comments.

The pseudo-code explained here Step by step exercise can be found here

Exercise based on use of ArcGIS and python module called networkx.

It can be modified using QGIS providing it has a capacity of spatial join one to many. The only feature from networkx I've used is shortest path. This can also be replaced by small python function e.g.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.