2

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?

  • 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 at 5:11
2

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.

| improve this answer | |
  • This was super helpful and worked for me! Thank you very much! – Moome Apr 22 at 1:58

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.