Skip to content

Matrix distance does not output right fields when using N x T matrix type #29165

Description

@qgib

Author Name: Harrissou Santanna (@DelazJ)
Original Redmine Issue: 21347
Affected QGIS version: 3.5(master)
Redmine category:processing/qgis


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.


Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!ProcessingRelating to QGIS Processing framework or individual Processing algorithms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions