A GENERAL ANALYTICAL SOLUTION TO THE PROBLEM OF PHOTOGRAMMETRY