I am relatively new to QGIS and am trying to find a way to calculate the distance of each point in a raster file (1km resolution) to the closest coordinate on a line vector. See green line vector below, and raster layer.

The reason for doing this is the raster layer contains # population in each square km and I want to [eventually] find the amount of population total that are within X distance of this infrastructure.

I've tried converting the line vector to points but the points are so far away that the results I'm seeking won't be accurate unless I interpolate points between the line vertices.

enter image description here

  • 1
    Hi and welcome to GIS.SE. It seems easier to me to build a buffer around your green line and compute the sum of pixels located inside the buffer... – ArMoraer Feb 22 '18 at 9:37
  • Check the Processing toolbox. You could convert your line to a raster layer and use some proximity calculation. Line pixels become targets pixels and then calculate distance from each source pixel to a target. – mixedbredie Feb 22 '18 at 11:05

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.