I am doing my bachelor thesis with QGIS program and I need some help please. I have tried until now to get the elevation profiles of the bus stops. But these are outside the bus line as shown in the picture. I could only find out the elevation profiles along the bus line and now I want to assign the bus stop (blue point) to the closest point (red point) to find out the elevation profiles of the bus stop?
You might want to check out "Join attributes by nearest" tool in QGIS Processing tools. You can add blue point layer as the input layer and red as the input layer 2. Make sure your elevations are added as an attribute in the red layer. The nearest red point's attribute will be added to each of the blue points.
Apart from the great solution by @Sreya Madhavan, there's also another possibility. To get the value of the attribute
measurement from the nearest point in the layer
elevation, use this expression, e.g. with Field calculator:
array_first (overlay_nearest ('elevation', measurement))