Implemented initial of function createLinesFromXy()