Some nice API additions have been made to the QgsLineString API:
This feature was funded by North Road
This feature was developed by Nyall Dawson (North Road)
This application was created by Kartoza (Pty) Ltd. Available on GitHub! Version: 2.3.1