I am very new to working with GIS data. I am currently using the QGIS tool to work with the data.
I have two datasets:
- Buildings - polygon shapefile with information about different buildings in a city. There is a unique column called propertyid.
- Roads - line shapefile with information about different roads in the city. There is no unique column, but we do know that each line item refers to one road, so we have created an index column based on @row_no.
Objective: To find the distance between a given building and the nearest road.
What I have already tried:
- Converted buildings layer to points(centroids) and lines layer to points(extracted vertices) and run a distance matrix using these two layers. But this doesn't give me the desired result for some reason. Since I am very new, I could be doing something wrong.
- Using the same point layers mentioned above, ran the distance to nearest hub algorithm. Again, I may have committed an error in doing this as well.
It would be great if someone could guide me in the right direction and tell me if
- what I'm trying to achieve is possible, and
- if it is, then how would you go about doing it.