Revamp segment indexing.
Rename parent -> parentSegment.
lineApproxGenerator