In one of my plugins I would like to use the distance geoprocessing algorithm. When running this algorithm from the menu Vector->Analysis Tools->Distance Matrix I get a different output than running the same function from the Geoprocessing Tools. (I am interested in the k*n matrix)

Unfortunately the output from the Geoprocessing Toolbox has different headers in the output and I need the result from the process run with the vector-analysis tools.

The first row of the processing output is

ID,DIST_1,DIST_2, ...

The Output of the menu-version is:

ID,4711,0815, ...

4711 and 0815 are my idnetifiers choosen in the dialog.

Is there a possibility to run this tool instead of

processing.runalg("qgis:distancematrix" ...

in my python plugin?

  • it seems like "qgis:distancematrix" is sorting the distances but you do not have the chance do identify the reltion between distance and "used points for distance calculation" in the table – Riccardo Jul 10 '15 at 19:28
  • I'm probably using a different QGIS and Processing plugin version than you (QGIS 2.8.2 with Processing 2.10.1) and the first row from both the Vector menu and the Processing Toolbox are the same: InputID, TargetID, Distance. Which versions are you using? – Joseph Jul 13 '15 at 9:27
  • you've choosen the knx3 option which does not produce a quadratic matrix. I am talking about the second option : kn – Riccardo Jul 13 '15 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.