Bug report #21347

[Processing] Matrix distance does not output right fields when using N x T matrix type

Added by Harrissou Santanna over 5 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/QGIS
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

Description

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.

distancematrix.png - A single column (28) corresponding to feature 0 target is added while more should be added (3,6,8,9,10). Line represents distance nearest to hub. (42.6 KB) Harrissou Santanna, 2019-02-22 08:32 AM

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Open to Feedback

Did it worked as expected for example in 2.18?

#2 Updated by Harrissou Santanna over 5 years ago

  • Status changed from Feedback to Open

Never used it (came across this while documenting the algorithm). And don't have a 2.18 build anymore.

Also available in: Atom PDF