2

I need to calculate the pairwise distances among 330 points that are in one shapefile and also pairwise distances among 948 points that are also in one shapefile. These points are in shapefiles, each has latitude/longitude coordinates that are in the projection I need to obtain distances in meters. I want the output in list form (n*kx3).

The Distance Matrix operation seemed to work perfectly until I noticed that the two output files based on the different numbers of points both contained 107,910 lines.

The 330 point set should have 54,285 distances and the 948 point set should have 448,878 if only one unique distances are output. However, QGIS is giving both "from A to B" and "from B to A". Given that, the smaller data set should have 108,570 lines and the larger 897,756. Thus, it appears that the output is being truncated. It happens even if I do not open the files in Excel but rather bring them right into R using read.csv. Everything I have read indicates that csv files have no line limits and Excel now has a limit over 1 million lines.

The problem was occurring in Version 2.6.1 and when I realized how far behind I was, I updated to Version 2.10.1 thinking that might help my problem. It made it worse. Now my 330 point data set runs and produces the same truncated 107,910 pairs of distances but the 948 point set crashes QGIS.

Is there a way around this or is there something that I am missing/doing that is causing the truncation and crashing?

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.