I have two polylines shapefiles that I wish to join together spatially. One is a road network and the other consists of bus routes which I have calculated the frequency over a certain period of time. I then wish to change the size of road segments based on this frequency.
I have found a successful way to do it in ArcMap, using the "SHARE_A_LINE_SEGMENT_WITH" option in the Spatial Join tool. Afterwards, I dissolve the joined shapefile based on the road_id column and sum the frequency column, also in ArcMap.
As shown in this great visual example, share a line segment with is quite different from intersect, contains, within or other methods offered in QGIS.
Is there some way to perform this type of spatial join in QGIS, whether with a tool, plugin, or spatial SQL query?
My python knowledge is really poor.
How to find share segments between two shapes (line) using QGIS? seems to be the same question as mine, however I can't comment to ask if there is any update.
Also, I found Understanding Join Attributes by Location in QGIS? for QGIS, where no operation seems to be what I want exactly.
This is the road network:
With bus routes on top:
When I do a simple intersect, i'm left with a bunch of routes (in red) that shouldn't be there (circled in blue). I' guessing because of the segment ends.