I added another comment to my own answer, but it was the sixth, so it has been hidden by the display software; perhaps you didn't notice it, Casebash:
And the latitudinals (did I get that right?) are trivial, as Triathematician explained.
Paraphrasing Triathematician's answer: the nearest point from P = (θ, φ) to the line of latitude given by θ = θ0 θ0 is simply the point (θ0, θ0, φ).

