2

In QGIS 3.10.4 on Mac, I have two multipoint shapefiles: one is "Start" points, and the other is "To" points. Each layer has "x" and "y" coordinate columns in the attribute table. "Start" points only have "location_name" (string) as IDs, and "To" points have ID numbers as IDs.

I also merged the two layers, so I have a layer that has both sets of points if needed.

My goal is to draw lines between each "start" point and each "to" point. Many plugins in other answers cannot be found now.

I'm wondering how can I do so?

The points look like the picture below, red dots are Start points, and blue ones are Tos.

enter image description here

Taras
  • 32,823
  • 4
  • 66
  • 137
orange
  • 47
  • 6
  • I always suggest Python when it comes to such specific problems. You probably won't find an out of the box solution for this. If you provide me with some more data I can give you a hint on how to write it with PyQGIS. How are we supposed to know which points connect with which? – Leon Powałka Nov 18 '20 at 07:18
  • 3
    Does this answer your question? Generating line segments between all points using QGIS. Additionally you can check this thread Creating all possible line segments between all points using QGIS. Also do not forget about MMQGIS and Shape Tools Plugins. – Taras Nov 18 '20 at 08:13
  • Thank you @LeonPowałka. I'm trying to connect each red dot to each blue dot - there should be a line between each red dot to each blue one. Red dots have "location_name" (string) as IDs in the attribute table, blue dots have ID numbers as IDs in the attribute table. – orange Nov 18 '20 at 17:39
  • Thank you, @Taras! Your answer to the first thread is exactly what I'm looking for. It worked perfectly. To whom may also want to use @Taras' script, if your layer is MultiPart, change it to SingleParts might be helpful. – orange Nov 18 '20 at 18:22
  • @gislearner, please see the https://gis.stackexchange.com/questions/141078/generating-line-segments-between-all-points-using-qgis, i have extended it – Taras Nov 19 '20 at 11:51

0 Answers0