3

I am using QGIS V3.4. I have over 1000 data points situated between a start and finish point expressing the Depth of coverage (DOC) of a pipeline. I need to identify the places along the pipeline which have a DOC lower than 0.6m to that which has coverage greater than 0.6m. the figure below identifies this, with grey data points identifying DOC greater than 0.6m and blue data points showing less than 0.6m.

enter image description here

it may look like a line (but a closer up image identifies its just multiple dots close together).

enter image description here

I have tried converting the point to line data by using the points to path tool in the toolbox. This creates however a solid line from the start point to the finish point (as seen below) and doesn't include any other points within its attribute table. Additionally, it looks like it is plotted in a straight line rather than following the placement of the points.

enter image description here

I have also tried looking for the points2one plugin, but this doesn't seem to exist on QGIS v3.4.

I need to be able to create this line but identify it as areas lower than 0.6 DOC and areas greater than DOC, highlighted with different colours. Does anyone know how to do this?

Possible suggestion have been to use the points to path tool, however this creates issues as when I calculate it (knowing that it will arrange my data points from lowest to highest), I get as seen in the bottom figure, showing multiple lines.

I still haven't been able to solve my problem

enter image description here enter image description here

2 Answers 2

3

in order to make Points to path tool works properly, you need to identify an order to the points so that the tool can follow the points based on the order you want:

Here is an example:

  • Add field with integer type
  • Add numbers based on the order you want from the start until the end
  • Use point to path tool and order the line based on the field you created in the first step

enter image description here

Here is the output:

enter image description here

4
  • Would Converting points tom line(s) work in the same way?
    – Louis Tate
    Jan 28, 2019 at 11:49
  • Points to path tool easier to use. You need just to identify the Order field without considering the Separation field which is not clear to me what this field means.
    – ahmadhanb
    Jan 28, 2019 at 11:56
  • Ok so using points to path, following your instruction, an example would be to give all the points with a DOC <0.6m and id number e.g 1 - 600, then the remaining points with a DOC > 0.6 and id number 601 - 1000, and then run Points to line twice according to the id number?
    – Louis Tate
    Jan 28, 2019 at 12:00
  • Yes, this is what I will try to do, and I hope you will get the desired results.
    – ahmadhanb
    Jan 28, 2019 at 12:05
2

I found the best way to solve this issue was to take the orginal excel sheet I was using and add two additional columns 1. Group & 2. Order. within the group column I indicated the length of data points used within the spread sheet e.g 1,2,3,4... 600. Within order I would paste 1 (indicating the start) for the whole column. Once completed, I would copy the data and paste it again at the end of the spread sheet. That way my 'group' column would repeat 1,2,3...600 again, but I would change my 'Order column' to consist of 2's (indicating the end of the string). After doing this I would sort the data by group and order (smallest to largest) resulting in my group and order column looking like the figure below. (KP indicates the distance points of the pipeline).

enter image description here

After creating the spreadsheet, I then added it as a delimited text file to QGIS, which created multiple data points. using these data points I ran points to path (situated in the processing toolbox) this then created lines which were seperated between each point (shown below, red line highliting the break between each point).

enter image description here

The attribute table should like like the figure below.

enter image description here

The attribute table as it stands does not have the necessary fields and values to plot DOC, therefore it is necessary to join the pipeline data poitns layer to the newely created line (path) layer. this is done by clicking on the 'Path/line layer' going to layer proprties then joins --> add vector join. then join to the data points layer, with a join field and target field which is a column within the excell sheets which are common in both layers. e.g group

enter image description here

this then will add multiple fields to the new line/path attribute table.

Once created the data points layer can be unselected and using the Expression String Builder rule-based symbology can be used to identify lengths of pipeline which are below DOC (0.60m) and length of pipeline which are above (0.60m).

The figure below indicates this. the red line shows DOC < 0.60M and the green line shows DOC > 0.60M

enter image description here

The final image indicates what the layer should look like in QGIS

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.