Skip to main content
added 301 characters in body
Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

As far as I can see, there is still no genuine QGIS algorithm to split lines with points (but as mentioned by @jdavid05, you can use GRASS or SAGA tools). However, there is an algorithm for splitting lines with another line. You can use this, converting your points to (very small) lines that are then used to split the line.

  1. Use this expression to create a new layer from the points (see here how to do it)- it basically "extends" the points to become a line: extend( make_line( $geometry, project( $geometry, 1,0 )), 1, 0 )

  2. Use Menu Processing / Toolbox / Split with lines - as input, select your original line, for Split layer select the line layer created in step 1.

  3. Now you can select the line (or lines) between the two points and measure it's lengt using field calculator: length ($geometry) (planimetric measurement) or $length (ellipsoidal measurement).

Screenshot: the black line is split at the points, the section between the points is selected. For this selection, the field calculator measures the length ($length) - see preview of the result at the bottom: enter image description here

As far as I can see, there is still no genuine QGIS algorithm to split lines with points. However, there is an algorithm for splitting lines with another line. You can use this, converting your points to (very small) lines that are then used to split the line.

  1. Use this expression to create a new layer from the points (see here how to do it)- it basically "extends" the points to become a line: extend( make_line( $geometry, project( $geometry, 1,0 )), 1, 0 )

  2. Use Menu Processing / Toolbox / Split with lines - as input, select your original line, for Split layer select the line layer created in step 1.

  3. Now you can select the line (or lines) between the two points and measure it's lengt using field calculator: length ($geometry) (planimetric measurement) or $length (ellipsoidal measurement).

As far as I can see, there is still no genuine QGIS algorithm to split lines with points (but as mentioned by @jdavid05, you can use GRASS or SAGA tools). However, there is an algorithm for splitting lines with another line. You can use this, converting your points to (very small) lines that are then used to split the line.

  1. Use this expression to create a new layer from the points (see here how to do it)- it basically "extends" the points to become a line: extend( make_line( $geometry, project( $geometry, 1,0 )), 1, 0 )

  2. Use Menu Processing / Toolbox / Split with lines - as input, select your original line, for Split layer select the line layer created in step 1.

  3. Now you can select the line (or lines) between the two points and measure it's lengt using field calculator: length ($geometry) (planimetric measurement) or $length (ellipsoidal measurement).

Screenshot: the black line is split at the points, the section between the points is selected. For this selection, the field calculator measures the length ($length) - see preview of the result at the bottom: enter image description here

Source Link
Babel
  • 74.9k
  • 15
  • 87
  • 227

As far as I can see, there is still no genuine QGIS algorithm to split lines with points. However, there is an algorithm for splitting lines with another line. You can use this, converting your points to (very small) lines that are then used to split the line.

  1. Use this expression to create a new layer from the points (see here how to do it)- it basically "extends" the points to become a line: extend( make_line( $geometry, project( $geometry, 1,0 )), 1, 0 )

  2. Use Menu Processing / Toolbox / Split with lines - as input, select your original line, for Split layer select the line layer created in step 1.

  3. Now you can select the line (or lines) between the two points and measure it's lengt using field calculator: length ($geometry) (planimetric measurement) or $length (ellipsoidal measurement).