I'm new to GIS and need to create a shortest path avoiding buildings. The buildings are represented as polygons in a shapefile.
In QGIS I created a buffer polygon for each building, corresponding the distance the path have to keep from the buildings. This polygons are overlapping each other a lot by every aglomeration of hauses.
My idea would be to rasterize this overlapping polygons into a DEM layer, so that: the elevation value of each point corresponds to the number of polygons overlapping over this point. And having this, a least cost path algorithm would give me the wanted path.
But... the tools to merge polygons or for rasterization doesn't helped yet.
Isn't this the way how things like this are done? If not with QGIS, maybe with GeoTools or other software running under Linux?
EDIT: an Image to illustrate the problem
I have in mangenta the polygons representing buildings.
In red an approximation of the expected path.
In turquoise the bufferzones around the houses representing the minimal distance the path have to keep from the houses, if possible.
We see: it is impossible to avoid all bufferzones.
The path costs will increase for each buildig it is coming too close. If the path goes between one house and a group of two houses close together, it have to choose violate the buffer zone of the lonely house over the other.
How I'm trying to solve it: add the number of bufferzone polygons at each raster point to a DEM-Layer.
But maybe my approach isn't ideal:
is there a way to create a DEM layer directly from the buildigs, defining a slope aroung them, summing up the slopes elevation values when they are overlapping?