At sea distances are traditionally measured using the sextant, essentially a goniometer. If the height of a marked object on shore is known, for example from the sea chart, the height angle is used to determine ones own distance from the object.
The traditional astronomical navigation at sea, for which the sextant is also used, reaches an accuracy of a few kilometres. It is thus feasible for a coarse assessment of position only.