I have line features (streets) and polygons (air quality raster). I need to transfer the air quality attributes into the lines. However, some lines are part of two or more polygons (e.g. the selected feature below).
I am looking for a way to transfer the attributes of the polygons onto the lines weighted by the length of the part of a line feature within each polygon.
The tool Spatial join only allows for a simple average in its merge rules (mean) giving equal weights for both parts of the selected line in the picture above.
An alternative idea was to split line features at intersections with polygon boundaries and have the air quality attributes assigned to the two or more new features. In a second step, I could then unsplit those split features using an ID. Lastly, I could use the field calculator to calculate a new weighted average air quality field, like: Air Quality = (Shape_Length A * Air Quality A) + (Shape_Length B * Air Quality B)/(Shape_Length A + Shape_Length B)
I am using ArcGIS Desktop 10.5.