I work for a survey company and we convert our raw survey data into a GIS format our clients can use and have used MapInfo in the past to achieve basic shapes our clients can use.
I start with 2 CSV files which simply have the attribute data and X, Y values for "Pits"(Points) and "Pipes" (Lines).
The Pits geometry works fine and is just created from the X, Y values, it's when I try to create "Pipes" (line) geometry which has the attribute data attached that I'm having issues.
The Pipes CSV contains 4 Columns labelled US_X, DS_Y, US_X, US_Y these refer to the X & Y of the upstream and downstream. Previously in MapInfo we would use a "CreateLine" command that could reference these 4 Columns and create the linework which also had the attribute data attached.
My attempts to do this in QGIS have involved bringing the CSV in via Data Source Manager -> Delimited Text and then lots of variations to attempt to create the geometry start from here. My closest attempt has been to choose 1 pair of the X,Y co-ordinates for the geometry definition and then create geometry from symbology->geometry generator using an expression that uses "Make_Line" stating the initial points I chose and then referring to the remaining co-ordinates to give it the other end. This worked but has the attribute data attached to either the US or DS depending on which one I chose when I imported the CSV earlier.
The problem with this as well is the linework that does show up won't stay if I need to send the data to the client in .TAB as lots of people request, it will come through as just the initial points.
I have also tried bringing the CSV in with no geometry defined and then trying to use similar expressions to generate the linework to no avail. I have also tried using a plugin called "Shape Tools" that looked very promising as it asked me for 2 sets of co-ordinates but upon running and it seemingly working no linework is generated.
I've also checked my table structure throughout these steps to make sure my CRS is the same at all times GDA2020/PCG2020 so I'm hoping it doesn't have anything to do with this.
points to lines
from the toolbox, and this needs an ID per line and an ascending ID of the points along this line.points to path
, you'll see you have two ID-fields you can use when creating the line(s) - overall sorting of the points, and then grouping the points. So this tool totally can deal with non-continuous networks.