When warm, light, air crosses mountains it rises into the upper atmosphere and does not fall back to the ground. In this, and other, ways wind changes with the terrain.
It then became necessary to settle the best route for the line to follow; and that was determined, in the first place, by the shape of the land it had to cross.