Gunpowder was used for hydraulic engineering in China by 1541. Gunpowder blasting followed by dredging of the detritus was a technique which Chen Mu employed to improve the Grand Canal at the waterway where it crossed the Yellow River. In Europe, gunpowder was used in the construction of the Canal du Midi in Southern France. It was completed in 1681 and linked the Mediterranean sea with the Atlantic with 240 km of canal and 100 locks. Another noteworthy consumer of black powder was the Erie Canal in New York, which was 585 km long and took eight years to complete, starting in 1817.