I am in an early stage of least cost paths analysis of a wide area. One part of the operation includes simulation of movement across the grid of previously agreed size of cells and extent of the grid (for reference one cell is 5X5 km).
I have easily enough created the grid (as vector - polygon file), however i would now need to provide friction values as a attribute input for each cell (each cell is a separate polygon entry), based on the above the sea level values from an underlying DEM model (SRTM in this case). In short this would, ideally, look like this: - if a 5X5km cell contains more than 50% of surface that is of certain above-the-sea level, i would attribute a value to it from a devised chart of values that describe the friction value for this cell.
Can someone suggest how to proceed with this?
I am quite uncertain how to satisfy the "above 50%" condition. While i expect to be working with raster data, majority of work will be done while working in table format, with values extracted from various cost raster.
UPDATE: Following the comments bellow, i worked through the DEM dataset in the following manner: using answers found here:How to reclass a raster with reclassify grid values in QGIS? i reclassified the dem raster into having a number of classes i needed (0 for elevation <=0, 1 for elevation range from 1 to 499 meters and so on - 4 in total). I had then used gdalwarp to obtain a desired resolution of the raster (equal to the resolution of the vector grid - i kept on to the vector, since it seemed to be good way to get the desired data from .shp attribute table into excel, as i need it to be in that form during one of the process steps). In such way 1 grid cell would get the attribute value of the dominant class i.e. elevation range within its boundaries. I went further with calculations of percentages of each elevation class contained within each grid cell, but i need to work on it further - comments on answers bellow point out to the direction im going. So - in order to get the dataset i need, it is necessary for me to get for an each cell grid (5X5 kilometers size) percentage of each elevation range im having within its boundary (<=0, >= 1 and <=499, >=500 and <=1000m and so on) as a attribute table data, ideally as separate columns. Can this be done?