1

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?

red point holds the Info (Label - numbers) für the grey points closest to themstrong text

2
  • 2
    Does "Join attributes by nearest" solve your problem? Commented Jan 15 at 9:45
  • Do not know if this a duplicate of this. Commented Jan 15 at 9:48

1 Answer 1

0

Use join by nearest with the correct locations as your first input, and the "data-points" as your second input. Allow only 1 nearest neighbour and if you feel uncertain, add a maximum join distance.

For single powerlines this will work well, in the case of several parallel lines, or junctions, you might have to put in some manual work.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.