I've a raster dataset of 20m² cells that show if a cell has been deforested and the year. I need to calculate the distance of each cell from a conservation project boundary, roads, canals (which are vector layers) and assign slope from a DEM to each cell. I will then export this data and use it in a regression in R. I may need to match cells with similar attributes either side of the boundary too.

To do this, is it best to convert the raster dataset into vector? I am using QGIS and am trying to convert the raster to vector but I'm not sure how to do it or if it's necessary.

I since realised the polygonize tool wasn't showing up for me due to an issue with one of the plugins but am still unsure if I should be converting the data to vector.

  • How big is the dataset (cells)? Commented Jun 9, 2023 at 7:18
  • It has 5 million cells. I managed to achieve what I was looking for by converting raster to point, then calculating the distance of each point to the conservation boundary
    – sandy
    Commented Jun 13, 2023 at 14:31
  • If you have a solution, answer your own question. That way if someone else comes looking for the same thing they will have something to refer to. Commented Jun 14, 2023 at 0:11


Your Answer

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

Browse other questions tagged or ask your own question.