  Deformed generalized gauge groups, whch were created from physical
considerations and made it possible to clarify some long-standing problems in
physics, such as the problem of motion and the problem of the energy of the
gravitational field, simultaneously carried out the implementation of the
Klein's Erlangen program for spaces with variable curvature, and for Riemannian
spaces even in two different ways. In this paper, this issue is considered from
a geometric point of view and these two methods of group-theoretical
description of Riemannian spaces are reconciled. The paper deals with the
canonical deformed group of diffeomorphisms with a given length scale which
describes the motion of unit scales in a Riemannian space. This allows one to
measure the lengths of arbitrary curves implementing the length principle which
was laid by B. Riemann at the foundation of geometry. We present a method of
univocal extension of this group to a group which contains gauge rotations of
vectors (the group of parallel transports) whose transformations leave
unchanged the lengths of vectors and the corners between them, implementing for
Riemannian spaces the Klein's principle of equality and matching both
principles of the foundations of geometry, thus overcoming the Riemann-Klein
antagonism.
