Checking for valid LineString in profile (#611)