I am lacking the skill of visualizing the problem, picture here, to decide the right intervals. The way I do it currently is to try things but the technique fails with anything more complicated to 2D. So how do you know which angle correspond to which angle range?
[update]
Let's break this into parts. Suppose there are two nodes, one $N$ in the north pole and one $S$ in the south pole. The distance $N-S$ is $\pi$. The distance $N-N$ is either $0$ or $2\pi$. Now, please, break this problem with nodes and graph-theoretically. See the paths are clearly different, the ending points vary: one is even and one is odd (trivially even if $N-N=0$ length accepted).
If you extend it to a globe, $d\theta$ represents the interval between two meridians of longitude, so should go from $0$ to $2\pi$. $d\phi$ represents the interval between two parallels of latitude, so should go over a range of $\pi$. On the globe, it is from $\frac{-\pi}{2}$ to $\frac{\pi}{2}$, but usually we measure from the pole and range over $0$ to $\pi$