How to split arbitrary curve into line and arc segments in Python
Use triplets P1,P2,P3  or  P3,P4,P5 or P100,P101,P102  etc.
With three points you can find the circumference going through them. If its radious is too big (say 100 km) it's probably a straight, although it may be also the beginning of a clothoid (R is infinite where a clothoid joins a straight).
So you must test also the fourth point, telling if it belongs to that cicumference or it's in the clothoid. The parameter A of this clothoid knowing 4 points can be calculated by consecutive iterarions.
If you are given with an axis that is not the road axis, but a parallel to it, then remember that the curve parallel to a clothoid is not another clothoid.
Once you have all segments type-defined, you need a fine adjust so all segments are tangent at their end-points. This job can be done by working with triplets of segments, divide the tangent-error value rotating the middle segment or some other method you can think of.
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: 

Straight line segments
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)

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!
Thanks!