1

I have a points layer of about 300 points, and I'm trying to find a way to draw lines between every pair of points (so 44,850 lines in total).

I've thoroughly perused similar questions here and tried all of them no avail. I know R and Python, but have never used packages related to QGIS.

Any suggestions?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Timbo
  • 11
  • 1
  • 2
    Does this answer your question? Creating all possible line segments between all points using QGIS. Here you even do not need scripting – Taras Jun 01 '21 at 07:30
  • Have a read of https://datacarpentry.org/r-raster-vector-geospatial/06-vector-open-shapefile-in-r/ which should help with opening your layers: one for the points and an empty shape for the lines then with a list of XY coordinates iterate and create new lines... however index the list with a range object for startPoint in ListRange: for endPoint in ListRange: if startPoint != endPoint to avoid a 0 length line; this will end up with duplicates in the opposite direction (A to B and B to A also), this may be what you want or it may not, please edit your question to indicate if duplicates are okay – Michael Stimson Jun 01 '21 at 07:31

0 Answers0