[GIS] How to find overlapping points and add their name value to each other

expressionoverlapping-featuresqgis

I'm working on a point-layer where points represent the start and end point of lines (streets). Since some streets are joined to each other at the startpoints/endpoints (because they're next to each other) some points share the same XY-coordinates as they overlap each other.

I would like to find these points and add to a new/empty column the overlapping points' "name" (or "id") value.

Is this possible with an expression in the field calculator? I suppose I should use $x_at(0)/(-1) and $y_at(0)/(-1) but I can't find out that which expression helps finding overlapping features.

Best Answer

Its highly likely that a simple spatial join will miss point pairs where the XY is just minutely different. If you make a very small buffer around the points (within a distance you consider to be "the same place"), then spatial join the points to these, the points which join to more than one buffer ID will are thus the overlapping points. Add a column "count" to this spatial join table and set every row to 1, then sum by point ID, any points with a value greater than 1 for count will be the 'overlapping' points.