I am working with two point layers in QGIS:
Red point layer: These points come from a CAD DXF export and contain mast numbers in the attribute field TxtString. They represent labels, not actual mast locations.
Gray points: These are the actual mast locations, but their attribute table lacks useful IDs or information.
I want to transfer the mast numbers (TxtString field) from the red points to the nearest gray point, creating a new field in the gray points layer to store this information. The linkage is based on proximity, as the layers don't share a common ID.
My setup:
Both layers are shapefiles. The task should identify the nearest red point to each gray point and copy the mast number (TxtString) into the gray point layer. Steps I've tried: I considered using a spatial join in QGIS, but I am unsure how to Ensure that only the nearest red point to each gray point is used. Create a new field in the gray points layer with the corresponding attribute value. Question: What is the best way to achieve this in QGIS? Are there specific tools or expressions?
