5

I have a polyline made of curves and I would like to know if there is a way in QGIS to calculate the radius of the curves?

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389
M-Rick
  • 476
  • 4
  • 11

1 Answers1

2

It is possible to calculate the radius of a curve in QGIS using the Field Calculator using this expression :

sqrt( 
    ( $x_at(1) - ($x_at(-1) + $x_at(0) )/2 )^2 
    + ( $y_at(1) - ($y_at(-1) + $y_at(0))/2 )^2
     ) /2
+
( ( $x_at(-1) - $x_at(0) )^2   +  ( $y_at(-1) - $y_at(0) )^2 )
/ ( 8 * sqrt(
            ( ($x_at(1) - ($x_at(-1) + $x_at(0) )/2 )^2
            + ( $y_at(1) - ($y_at(-1) + $y_at(0) )/2 )^2
             )))

I have modified and correct the original expression proposed by CM1 in this post QGIS calculate radius of an arc to attributes, where is possible to have a geometry explanation of the used formula.

Val P
  • 3,858
  • 1
  • 8
  • 33