Added functions that calculate the immediate parents and children of the
polylines.