I have a Vector Layer that is created out of a MySQL database and has the relevant points stored in WGS84 format. The import works well, however, when I try to calculate a distance matrix between all possible combinations of point via Vector->Analysis Tools->Distance Matrix I don't get my desired result. What I get with the "Linear standard matrix" option is a csv-File that contains all possible combinations for two arbitrary chosen fields with all other fields. When I choose "Standard distance matrix" Qgis crashes at 98% but the output file seems to contain the same arbitrary chossen fields in the first column (just multiple times) and all other fields in the first row. What I would like to have is basically:

   ColumnID| Field 1 |Field2            |Field3
   Field1|-          |Dist Field1-Field2|Dist Field1-Field3
   Field2|-          | -                |Dist Field2-Field3
   Field3|           |                  |    -

Any idea how I do that? The format does not need to be in the same style but I need distances for all combinations. Thanks

  • Why not create a geometry field in MySQL and do this straight in the database? The Distance() function in a query which addresses the point layer twice (2 aliases) should be all you need. – Micha Aug 28 '13 at 8:08

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.