Let's assume that you want to join a field by location on a segment that has multiple intersections. For example, let's assume the following diagram:
+ D +--------+----------+ A B C
'Point' layer attributes:
| Name | ================ | A | | B | | C | | D | ================
'Line' layer attributes:
| Id | ================ | Line | ================
If you wish to include the points that intersect with the line, create a new field, for example 'Intersec', on the 'Line' layer using the following formula:
array_to_string(overlay_intersects('Point', Name), ',')
| Id | Intersec | ================ ================ | Line | A, B | ================ ================
As you can see, the point C is not detected by the previous formula. When the point is snapped to the edge, you might encounter some issues due to the nature of QGIS. To address this, create a small buffer for the line and then perform the point intersection again.
| Id | Intersec | ================ ================ | Line | A, B, C | ================ ================
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.