The border effect is one of the problems, which can appear in the application of self-organizing maps (SOM). Different solutions were presented in the literature, but each of them has its drawbacks. In this paper we present a new method for overcoming the border effect - optimized spiral spherical SOM. We also show that standard measure of irregularity is not appropriate and present a modified version - Gaussian measure of irregularity. Our simulations suggest that the new variant of SOM achieves extremely low values of irregularity in comparison to other methods. At the end of the paper we present a software solution for the proposed method.