5

Project : footpath going from point to point I have two layers Layer 1 points, each point is corresponding to a stake showing a unique number (the unique id of this layer Layer 2 lines, the route going between each point. Between each point is a single line.

I want to create a field in layer 2 that will be populated with the unique number of the 2 points (start and end) Example: layer points : 3 points 1,2,3 layer line, 3 lines : point 1 to 2, 2 to 3, 3 to 1 the field should be respectively populated with 1-2, 2-3, 3-1

The points are exactly at the start/end of lines, snapping was used to create them

How can I do this using QGIS version 3.16.16? I have no idea how to make this.

Vince
  • 20,017
  • 15
  • 45
  • 64
ClaudeVer
  • 630
  • 2
  • 9
  • 5
    You'll need to [Edit] the Question to indicate what GIS software you are using and give an indication of what you have tried. – Vince Feb 19 '22 at 18:30
  • See here: https://gis.stackexchange.com/a/411938/88814 – Babel Feb 20 '22 at 13:43

1 Answers1

7

You can use Field Calculator.

function aggregate Returns an aggregate value calculated using features from another layer.

aggregate(layer:='checkpoint', aggregate:='concatenate', expression:="checkpointid", filter:=intersects($geometry, geometry(@parent)), concatenator:=',')

enter image description here

BERA
  • 72,339
  • 13
  • 72
  • 161