Long-range isotropic and dipolar spin-spin interactions in the square planar rotator model