Gerstner was born in
Chomutov in
Bohemia then part of the
Habsburg monarchy (now in the
Czech Republic). He was the son of Florian Gerstner (1730–1783) and Maria Elisabeth, born Englert. He studied at the
Jesuits gymnasium in Chomutov. After that he studied mathematics and astronomy at the
Faculty of Arts at the
Charles-Ferdinand University in
Prague between 1772 and 1777. In 1781, he started to study medicine at the
University of Vienna, but later decided to quit his studies. Instead, he worked as an assistant at the astronomical observatory in Vienna under supervision of
Maximilian Hell. In 1784 he returned to Prague, where he got a position at the
Clementinum astronomical observatory in Prague. In 1789, he became professor of higher mathematics, mechanics and hydraulics at the university in Prague. In 1792, Gerstner married Gabriele von Mayersbach (died 1808). They had nine children including
Franz Anton von Gerstner (1796–1840). In 1795, Gerstner became a member of the government commission which tried to improve higher technical education in the Habsburg monarchy. Following his suggestion, the old engineering school in Prague () was converted by the decree of Emperor
Joseph I to a polytechnic school in 1803. The new Polytechnic Institute in Prague was officially opened on 10 November 1806, and Gerstner became its first director. In 1811, he was appointed by the Emperor to the position of the Director of
hydraulic engineering in Bohemia. In 1823, due to an illness, he was forced to stop his classes at the university. Gerstner died and was buried in
Mladějov, Bohemia, in 1832. == Work ==