The process of scattering of fast charged particles in thin crystals is considered in the transitional range of thicknesses, between those at which the channeling phenomenon is not developed and those at which it is realized. We demonstrate the possibility of application of the methods of geometrical optics for description of the scattering process. In particular, we study the dependence of the total scattering cross-section of ultrarelativistic positrons on target thickness in this range of crystal thicknesses. In the case of channeling of ultrarelativistic particles we indicate the possibility of the existence of an effect analogical to the Ramsauer-Townsend effect of conversion into zero of the total scattering cross-section at some values of crystal thickness. An important role is noted of the Morse-Maslov index that makes part of the wave function expression in the geometrical optics method.