In the following sentence, I can't correctly understand the meaning of "This undertaking led in 1875 to a commission from the railway". By the way, what is the word "commission" here mean? Could you help me clarify this?
This undertaking led in 1875 to a commission from the railway to record the principal structures along the almost-completed line connecting Montreal to Halifax.