I have LineLayer with "start_point" and "end_point" field attributes which can snap to either PointLayer1 or PointLayer2.
Using the Field calculator, I would like to make an expression which would take "id" attribute from the point it is snapped, regardless of which point layer it is snapped to.
"start_point":
aggregate(
layer:='PointLayer1 name',
aggregate:='max',
expression:="id",
filter:=intersects(buffer($geometry, 0.05), start_point(geometry(@parent)))
)
"end_point" attribute field is the same with end_point(geometry(@parent)) instead.
I'm just trying to cover PointLayer2 so I get its "id" field value as well. So with line layer having a "start_point" and "end_point" to its geometry, to which can be snapped either a PointLayer1 or PointLayer2 feature, I want the start_point and end_point attribute fields to receive the "id" feature from the point features snapped to them.
I use basic QGIS and I don't use RefFunctions as I need it as simple and reusable as possible for multiple PCs.
if (PointLayer1 feature is snapped to LineLayer's geometry start_point)
{
LineLayer start_point attribute field receives PointLayer1 feature's id value
}
else if (PointLayer2 feature is snapped to LineLayer's geometry start_point)
{
LineLayer start_point attribute field receives PointLayer2 feature's id value
}


LineLayer possesses 2 field attributes (start_point, end_point) which I want to take the id attribute from the point feature which is snapped them.
Do I need to upload the screenshot on a filesharing platform?
– IKindaNeedAHand Aug 25 '21 at 12:23