2

I am repeatedly getting values in the 1000s for a nearest neighbour analysis in QGIS 3.4.

I've tested a different dataset and getting the expected result (i.e. between 0 and 2.5). But from the dataset I'm using I'm getting huge numbers:

Observed mean distance: 9.579807163911296
Expected mean distance: 0.0002003651354400665
Nearest neighbour index: 47811.747003144774
Number of points: 48
Z-Score: 633690.2583200812

A screenshot of the vector layer's points and the applied filter:

[1]: https://i.sstatic.net/etZkd.png [1]
[2]: https://i.sstatic.net/PEVJA.png [2]

The dataset can be accessed this OneDrive link: https://isbdragons-my.sharepoint.com/:u:/g/personal/ofidler_isb_bj_edu_cn/EXC4adHTCl5KlSP4UQNblYwBFb-7rO9-VLK367Uevgf_pg?e=LShz0z

My suspicion is QGIS isn't bounding the extent of the analysis properly. I've tried 'selected features only', which generated almost the same numbers. When I 'zoom to layer' it's the same extents as shown in the screenshot above.

1 Answer 1

2

Seems like layer extent is computed in degrees and distances in meters, or something else.

Project the layer to a projected CRS, which doesn't distort your distances much, to get reasonable values.

In QGIS 3.10.0 I can't see that behavior, but since QGIS 3.4.13 is the latest long-term release the question seems valid to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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