Refactor fetching line string features to common place and use it also from unit tests