[GIS] QGIS Distance Matrix Output

distance matrixqgis

I have a shapefile of points and want to measure the distance between each of them. After running the Distance Matrix command I get a matrix with distances as expected, but have no idea how to match each row (i.e. each point) to each other.

The problem arises because the names of the columns is not informative of which point each distance refers to.
Snapshot of Distance Matrix Output

Clearly the first column refers to the distance between each point and itself. But, for example, how do I know what two points define the distance in row 1, column 2?

Best Answer

Depending on what exactly you want to do with the data once you know the start, end and distance between the points you may find that the "Linear (N*k x 3) distance matrix" output matrix type is sufficient. This option is set within the QGIS Distance Matrix Tool.

The image shows the difference in table layout. As you can see the distances are identical, so the difference is only in the presentation of the data in the table.

enter image description here

The option is available at least from QGIS 2.0 onwards (haven't got any older versions available to check further back right now).

Related Question