I have a DEM and a line vector shapefile (also available in PostGIS) and I need to calculate the mean slope of every line. Direction of the slope (positive or negative) is not important.
That means I should assign the DEM raster values of the start and end vertex to two new attributes (e.g. alti_a and alti_b). Then it would be possible to use field calculator and calculate the slope.
How can I do this? Are there alternative solutions?