How to measure how curvy the polyline is?

54 Views Asked by At

I'm trying to make curve index which represents how curvy or how edgy the polyline is on the map. For example index might be 0 on straight line and high as line curves. I tried to use sum of absolutes of 2 times differential from Y(latitude)/X(longtitude) which is diff(diff(Y))/diff(X)^2 in R. But I'm not so sure it can really satisfy what I'm trying to achieve. Is there concept which is related to this?

example image