Fixed old issue that only geometry::segment could be used in distance Splitted custom segment, moved to separate header