Bug report #21347
[Processing] Matrix distance does not output right fields when using N x T matrix type
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||29165|
When running the distance matrix algorithm on all the features using the "Standard (N x T) distance matrix" type, you get columns corresponding to all target features.
When limiting the number of closest features to k, you get k new columns that do not necessarily match the closest features. I would expect to get:
- columns corresponding to each closest point ID (so the number may be different from k, depending on data distribution)
- and calculation between each input feature and the identified closest features
In the attached screenshot, k=1. Instead of a single column (28) corresponding to feature 0 target, I'd expect more to be added (3,6,8,9,10) as closest points to other inputs. So I have for each input its closest point and not the closest point of the first fetched feature which is neither the minimal distance between the layers.