In this work we develop a geometric approach to the study of rank metric codes. Using this method, we introduce a simpler definition for generalized rank weight of linear codes. We give a complete classification of constant rank weight codes and we give their generalized rank weights.