# Connect two points on a map that has the same label/name

We have two sets of coordinates for a list of places and ideally the coordinates should match, but they don't.

We would like to illustrate this on a map to connect pairs of coordinates that have the same place name/label.

If we map all the points, we just get two sets of different colored markers and we do not know which point from one layer corresponds to the same point on the other layer.

Please help! Or, if there is a better idea of how to depict these discrepancies on a map, please let me know.

• Welcome to GIS:SE @TonyAo! Could you please edit your question to include some screenshots of your problem and maybe annotate another to show what you would like to see? Oct 20 '16 at 14:27
• Do you need to show the separate point layer? How many pair/point combinations do you have? Oct 20 '16 at 14:34
• Does each pair of points have a unique, common attribute? If so, you could classify one set of points based on that attribute, then copy the style and paste it onto the other layer. Then each pair of points will be the same color.
– csk
Oct 20 '16 at 21:14

## 1 Answer

If this is only to visually check the displaced points, geometry generator would be a good choice.

Given we do not know which set(s) are displaced points:

(1) Create a copy of Layer_A (by Duplicate)

(2) Open Layer Properties of Layer_A_Copy and select Geometry generator (LineString / MultiLineString) in the Symbology tab.

(3) And the expression is:

make_line(\$geometry, geometry(get_feature('Layer_B', 'label_b', "label_a")))

We will get something like below:

(NB: Labels in this picture are meant just for clarity).