Karl Ritter von Ghega or Karl von Ghega (10 January 1802 – 14 March 1860) was an Austrian nobleman and the designer of the Semmering Railway from Gloggnitz to Mürzzuschlag. During his time, he was the most prominent of Austrian-Albanian railway engineers and architects.
Born in Venice as Carlo Ghega to an ethnic Albanian family. His father, Anton Ghega, was an officer in the Austrian navy in the government service. He studied in Padua, where he took the examination for doctor of mathematics at the age of 18. He was attached to the Imperial board of Public Buildings when the railway movement commencing throughout Europe attracted his attention. He began his engineering career with road and hydraulic engineering in Venice. Among other things he contributed to the building of the road over Cortina d'Ampezzo to Toblach. From 1836 to 1840 he was a construction supervisor for the railway track from Brno to Břeclav, the so-called Emperor Ferdinand North Railway. During this time, in 1836 and 37 he studied also the railways in England and other European countries. In 1842, entrusted with the entire planning of the future state railway, he made a study trip to North America.
After his return to the state railway he began with the planning of the railway line to the south, from Mürzzuschlag to Graz and Trieste. The crossing of the Semmering was not believed possible, but as early as 1844 he submitted a plan for the crossing of the Semmering, with locomotives without an extra rail for gear wheels. Before the building was fully decided, he began to enforce the construction of locomotives which could overcome such upward gradients. Construction of the Semmeringbahn was begun in 1848 and completed in 1854. In 1856, the Borovnica viaduct, one of the most imposing railroad bridges of the era, was built upon the plans by von Ghega as part of the Austrian Southern Railway from Vienna to Trieste.
In 1851, Ghega was knighted (Ritter) for his services to the country, and in 1853 he was made chief of planning for the whole railway network of the Austrian Empire.