2

I'm having issues with the distance matrix tool in QGIS 2.18 giving output distances that do not match the distance using the measuring tool. I've checked previous threads and so far can't find an answer to this problem.

I'm working with several thousand points, distributed over many layers, and want to calculate the distance between the points on each layer as a set of matrices. I've been using the linear distance matrix setting (though I have also tried the standard distance matrix). The data processes with no errors reported but when I come to check the results they are too large by a factor of approx 2.275. (I haven't yet checked to see whether this factor is common across the whole domain)

My data is all in CRS WGS84/Pseudo-Mercator [EPSG:3857] because I've been digitizing my data from Google Earth. I've done a crude check that the 'measure line' tool in QGIS is working correctly by calibrating it against an object of known size and trust the results.

Example: distance between two features

Measure line tool: 18.572m - trusted

Distance matrix result: 42.2596m - NOT trusted, definitely too big

From reading previous threads, I know that the distance matrix tool should output the results in the same measurement units as the layer CRS, which for Pseudo-Mercator should be in metres.

If it were a handful of points, then I'd be happy to use the measure line tool, but it becomes unworkable with the size of my data set. I've tried saving and reloading the data sets from a .csv file, which doesn't make any difference. I've also fiddled with the project and layer CRS to see whether that has an effect, but I keep coming back to the same results from the tool.

Any ideas?

1

Before using the tool, you should transform you data to a "proper" projection, for instance your local UTM projection. The length of one unit in Pseudo Mercator will depend on where on the earth you are. If you are on the equator, the lengths should be OK, but the further away from the equator you are, the more distorted will the unit lengths be. 2.275 indicates that you are quite far from the equator.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.