A geometrical approach to thermodynamics. Uncertainty relations