Triangulation. You measure the distance between two points by conventional means, and then measure the horizontal and vertical angles to a third point (like the peak of a mountain) from both of these points. From that you can then calculate distances and heights.
This can get quite precise; the height of Mount Everest was first measured in 1854, 99 years before someone actually managed to climb it, and the measurements were performed from more than 100km away (Nepal didn’t trust Great Britain enough to let their surveyors into the country), and the calculated height was only around 10 meters less than modern GPS measurements.
Latest Answers