title: How to split arbitrary curve into line and arc segments in Python
body: <p>I have a sequence of (x, y) points approximating a road segment, and I would like to identify and split them into groups of two types: </p>
  
  <ol>
  <li>Straight line segments</li>
  <li>Non-straight line segments. At the moment I am not concerned about the parametrization of these. They may be constant curvature arcs, changing curvature clothoids... anything (but simplicity is preferred)</li>
  </ol>
  
  <p>Any hints about how to solve this problem in Python? I can find some academic publications about it, by searching for terms like "curve decomposition into lines and arcs" or similar, but they do not provide any example code, and implementing the entire method from scratch is not feasible for me. Any help is appreciated!</p>
  
  <p>Thanks!</p>