1

I am trying to use the hierarchical clustering function in the plugin scipy point clustering in order to group individuals that are close to each into populations. Here is a screenshot of my selections:

screenshot hierarchical clustering

But every time I try, I get the following error message in the log:

Algorithm Hierarchical Clustering starting... Extracting geometries

from the input layer

float division by zero See log for details

I checked for duplicates in locations (perhaps there was a problem dividing by a zero distance). I also made sure that the points are not multipart by applying the function : "split multipart features to single part" from digitizing toolbar.

Here is a sample of my shapefile:

>   wkt_geom    name    lat long
>   Point (286556 5028628)  2501    5028628 286556
>   Point (286479 5028418)  2502    5028418 286479
>   Point (286507 5028404)  2503    5028404 286507
>   Point (286516 5028412)  2504    5028413 286516
>   Point (286519 5028417)  2505    5028417 286519
>   Point (286517 5028428)  2506    5028428 286517
>   Point (286518 5028433)  2509    5028433 286518
>   Point (286510 5028426)  2510    5028426 286510
>   Point (286512 5028427)  2511    5028427 286512
>   Point (286503 5028423)  2512    5028423 286503
>   Point (286501 5028429)  2513    5028429 286501
>   Point (286495 5028419)  2514    5028419 286495
>   Point (286509 5028397)  2517    5028397 286509
>   Point (286513 5028392)  2518    5028392 286513
  • try manually installing v0.1 of the plugin from the QGIS Plugins Site (not using the Plugin manager). I remember having similar problems a while back, at least with the k-means algorithm but going back a version worked. Probably best to log as an issue – Steven Kay Sep 14 '17 at 13:10
  • It is a bug. With v0.1, there is no problem at all. Download here: plugins.qgis.org/plugins/ScipyPointClustering/version/0.1 and save to Users/yourname/.qgis2/python/plugins (and extract zip file here). It will show up automatically in plugins manager. I hope to get a more satisfactory answer so I will not post as an answer yet. – user3386170 Sep 15 '17 at 0:51
0

Turns out that it is a bug with the plugin. Bug has been reported but no response yet from developers.

Using v0.1 resolves the issue. Manually install v0.1 of the plugin from the QGIS Plugins Site (not using the Plugin manager). Download here: plugins.qgis.org/plugins/ScipyPointClustering/version/0.1 and save to Users/yourname/.qgis2/python/plugins (and extract zip file here). It will show up automatically in plugins manager.

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.