In 1821 he was appointed to the ordnance survey, and during this and the two following years, assisted by his friends Thomas Drummond and Robert Kearsley Dawson, both of the Royal Engineers, he carried out the triangulation of the Orkney and Shetland islands and of the western islands of Scotland.