3

I am a new user of QGIS (version 3.2.3) and I find myself in need to do some calculations. I am trying to find the average distance between two sets of points (i.e. schools and settlements) contained in two different layers within given districts, which comes in polygons.

My ultimate goal is to calculate the average distance traveled to school for each district. I tried to calculate the distance matrix but it didn't yield the results I wanted.

How can I complete this task?

1
  • 2
    By calculating those distances between two sets of points do you mean simply straight lines or some more complex routes based on paths taken from a different line layer?
    – Taras
    Apr 21, 2020 at 5:11

1 Answer 1

3

You could try out processing algorithm Distance to nearest hub (line to hub) and use schools as hubs and settlements as source. This creates you a straight line to the nearest schools and has distance as an attribute. Then from these lines in the resulting layer, you can use Basic statistics for fields to calculate the average distance.

2

Your Answer

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

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