4

Is it possible to draw an arc(curve) in QGIS using Python if the following parameters are known?

  1. start point of the arc
  2. end point of the arc
  3. arc length
  4. direction of the arc from start point to end point
  5. Radius (of the circle created from the arc)
  • Perhaps this link might help: Creating ARCs in QGIS: The Python Way – Joseph Sep 8 '16 at 9:42
  • 1
    I think that, the "arc length" is not the best parameter to describe arc. You sholud consider parameters: start, end, radius and center (of the circle). It can be generate with numpy. – dmh126 Sep 8 '16 at 10:23
  • @dmh126 parameters start, end and radius of the circle are known (center point of circle is unkown). If arc can be generated with those parameters? – Sjs Sep 8 '16 at 10:50
  • Center can be calculeted with start, end and radius. I'll try to figure this out later and I'll post the result. – dmh126 Sep 8 '16 at 11:08
3

I have derived center point of the circle (formed by the arc) and then computed the midpoint of the arc. Having traced the midpoint, I have used "QgsCircularStringV2" class which creates the arc from its start point, mid point and end point. Refer the code for arc creation here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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