Dunbar, David, Surveyor General