Resonance line polarization in spherical atmospheres