I would like to have any id field TRAM
, together lines by group between 2 points, names (PE....). The idea is to write an expression using field calculator to get their id.
- The lines are always connected and touch at start/end points. The X,Y coords of the end point of one line is always equal to the X,Y coords of the next line's start point.
- The
fid
field is not necessarily sequential. - The lines can have 0, 1 or 2 intersections with features on my point layer which are labeled PE(...).
Next step is use a dissolve algorithm to merge this "TRAM"
group lines.
This is result I would like.
EDIT 14 APRIL 2023
I have a point layer "PE", with different code, PE1,PE2,PE3 represent boxes. The line layer "OC", with different sections, always then are touching and intersects with point layer boxes.
I would like to add a field "TRAM" (I use field calculator) to create groups code for example (A,B,C... or other like "fid" 11,11,11,11,15,15,15,18,19) see image. I think that need x,y start and end point coordinates to know is a touch line.
How one image is better than my English words, here image:
Here GeoPackage with both layers:
Here similar Question, but not work because I need X,Y start and end points of line for group code
INI_POINT
coordinates... I get a feeling Aggregate tool or Virtual Layers would be a better tool for what you are after