I Have two layers, one is a polygon and the other is a polyline. I would like the solution to be using QGIS.
I want to create a new attribute in the polygon layer that take the average of the attribute (e.g., slope) from all of the polyline segments that cross the border &/or lie within the polygon segment.
For example, in the red selected polygon, there may be 10 different polyline segments that either cross it's border or lie completely within the polygon. I want to create a new attribute, slope, in the polygon that is the average of all of the slope attribute values for all of the polyline segments.