A Solution to the Pole Problem for the Shallow Water Equations on a